@font-face {
    font-family: 'RTA';
    src: url('assets/rta.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Typography Refinement */
:root {
    --primary: #8e71f0;
    --primary-light: rgba(142, 113, 240, 0.08);
    --secondary: #a394ed;
    --accent: #eace67;
    --danger: #ff4757;
    --sidebar-bg: rgba(255, 255, 255, 0.8);
    --workspace-bg: #fdfdfd;
    --text-main: #2d3436;
    --text-muted: #636e72;
    --border-color: rgba(142, 113, 240, 0.15);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, button, input, textarea, select {
    font-family: 'RTA', 'Outfit', 'Inter', 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


body {
    background: var(--workspace-bg);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

.app-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    position: relative;
    z-index: 1;
}

/* Luxury Soft Background */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #ffffff 0%, #f0f0ff 100%);
    pointer-events: none;
}

.bg-blob {
    position: absolute;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(142, 113, 240, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    animation: move 20s infinite alternate;
}

.blob1 { top: -10%; left: -10%; animation-delay: 0s; }
.blob2 { bottom: -10%; right: -10%; background: radial-gradient(circle, rgba(234, 206, 103, 0.08) 0%, transparent 70%); animation-delay: -5s; }

@keyframes move {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 30px) scale(1.1); }
}

/* Layout Structuring - Pillar Sidebar RTL Style */
.app-wrapper {
    display: flex;
    flex-direction: row; /* Sidebar on right (RTL), Main on left */
    height: 100vh;
    width: 100vw;
    position: relative;
    background: var(--workspace-bg);
    overflow: hidden;
}

.main-layout {
    flex: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.workspace {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 60px; /* Better margins for preview focus */
    position: relative;
    background: #f8f9fa;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.02);
}

.canvas-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

/* Shared Header/Footer Bar Style */
.app-bar {
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 500;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-color); /* Added subtle border for definition instead of shadow */
}

.app-header {
    border-bottom: 1px solid var(--border-color);
}

.app-footer {
    border-top: 1px solid var(--border-color);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo-area h1 {
    font-size: 20px;
    font-weight: 500; /* Normal weight */
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.action-group {
    display: flex;
    gap: 12px;
}

.btn-primary-header, .btn-danger-header {
    height: 42px;
    padding: 0 20px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
}

.btn-primary-header {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(142, 113, 240, 0.2);
}

.btn-primary-header:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 6px 15px rgba(142, 113, 240, 0.3);
}

/* Quick Export Tabs Styling */
.quick-export-tabs {
    display: flex;
    background: rgba(142, 113, 240, 0.05);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    gap: 2px;
}

.btn-tab-export {
    height: 38px;
    padding: 0 16px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-tab-export:hover {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.btn-tab-export.highlight {
    background: var(--primary);
    color: #fff;
}

.btn-tab-export.btn-zip {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--primary-light);
    margin-right: 4px;
    font-weight: 500;
}

.btn-tab-export.btn-zip:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

.btn-tab-export.hidden {
    display: none;
}

.btn-danger-header {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--danger);
    border: 1px solid #fee2e2;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-danger-header:hover {
    background: #fef2f2;
    transform: rotate(-10deg) scale(1.05);
}

/* Sidebar Styling - Full Pillar */
.sidebar {
    width: 300px;
    height: 100vh;
    background: var(--sidebar-bg);
    backdrop-filter: blur(30px);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 1000;
    box-shadow: -10px 0 30px rgba(0,0,0,0.04);
}

.sidebar-branding {
    height: 80px; /* Matches Header/Footer Height */
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.sidebar-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(142, 113, 240, 0.1);
    border-radius: 10px;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #ffffff;
    padding: 12px;
    border-radius: var(--radius-lg);
    border: 1px solid #f1f5f9;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-title h3 {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--text-main);
}

.header-title i {
    color: var(--primary);
}

.badge {
    font-size: 10px;
    font-weight: 400;
    padding: 3px 8px;
    border-radius: 20px; /* Pill */
    background: var(--primary-light);
    color: var(--primary);
}

.button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 400;
    color: var(--secondary);
    transition: var(--transition-fast);
}

.btn-secondary:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.icon-sm { font-size: 16px; width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; }
.icon-xs { font-size: 14px; width: 14px; height: 14px; display: inline-flex; align-items: center; justify-content: center; }
i[class*="fa-"] { line-height: 1; font-weight: 900 !important; }

.text-blue { color: #2563eb; }
.text-red { color: var(--danger); }
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }

/* Layout Grid */
.layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.layout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid #f1f5f9;
    border-radius: var(--radius-md);
    background: #ffffff;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: right;
}

.layout-btn:hover {
    border-color: var(--primary-light);
    background: #fafafa;
    transform: translateY(-1px);
}

.layout-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(2, 170, 148, 0.25);
}

.layout-btn .l-label {
    font-size: 10px;
    font-weight: 400;
}

.layout-configs {
    margin-top: 8px;
}

.config-panel {
    background: #f8fafc;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Settings Inputs */
.setting-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.label-tiny {
    font-size: 9px;
    font-weight: 400;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.segmented-control {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: var(--radius-md);
}

.segment {
    flex: 1;
    border: none;
    background: none;
    padding: 8px;
    font-size: 10px;
    font-weight: 400;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.segment.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dim-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

.input-with-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.input-with-label label {
    font-size: 9px;
    font-weight: 400;
    color: var(--text-muted);
}

.input-with-label input, .input-wrapper input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    outline: none;
    transition: var(--transition-fast);
}

.input-with-label input:focus, .input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.segmented-control {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: var(--radius-md);
    width: 100%;
    box-sizing: border-box;
    gap: 4px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
}

.input-wrapper .unit {
    position: absolute;
    left: 12px;
    font-size: 10px;
    font-weight: 400;
    color: var(--text-muted);
}

.flex-row { display: flex; align-items: center; }
.gap-2 { gap: 8px; }

.color-picker-wrapper {
    position: relative;
    flex: 1;
    height: 36px;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
}

.color-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
}

.hex-text {
    font-size: 9px;
    font-weight: 400;
    color: #fff;
    mix-blend-mode: difference;
}

.color-picker-wrapper input[type="color"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.thickness-wrapper {
    width: 80px;
}

.input-minimal {
    border: none;
    background: #f8fafc;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 10px;
    font-weight: 400;
    width: 100%;
    outline: none;
}

.border-top { border-top: 1px solid var(--border-color); padding-top: 20px; }

/* Workspace Area */
.workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Toolbar Removed - Logic moved to Sidebar */

.btn-primary-sidebar, .btn-danger-sidebar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 44px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-fast);
    border: none;
    color: #fff;
}

.btn-primary-sidebar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: 0 6px 15px rgba(142, 113, 240, 0.2);
}

.btn-primary-sidebar:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(2, 170, 148, 0.3);
}

.btn-danger-sidebar {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fee2e2;
}

.btn-danger-sidebar:hover {
    background: var(--danger);
    color: #fff;
    transform: translateY(-2px);
}

/* Footer Logic */
.footer-left, .footer-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.input-glass {
    background: rgba(142, 113, 240, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 20px;
    font-size: 14px;
    width: 320px;
    outline: none;
    transition: var(--transition-fast);
    color: var(--text-main);
    font-weight: 500;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.input-glass:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.footer-stats {
    display: flex;
    gap: 12px;
}

.stat-badge {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-color);
    padding: 0 16px;
    height: 42px; /* Same as header buttons */
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-main);
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    transition: var(--transition-fast);
}

.stat-badge:hover {
    background: #fff;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.stat-badge b {
    color: var(--primary);
    font-weight: 600;
    margin: 0 2px;
}

.stat-badge i {
    color: var(--primary);
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Canvas Area */
.canvas-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-bottom: 40px;
}

.canvas-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 100px; /* Strong gap to ensure they are far from paper */
    width: 100%;
}

.nav-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    transition: all var(--transition-fast);
    z-index: 500;
    color: var(--primary);
    flex-shrink: 0;
}

.nav-btn i {
    font-size: 24px;
}

.nav-btn:not(:disabled) {
    background: #fff;
    color: var(--primary);
    border-color: var(--primary-light);
    opacity: 1;
}

.nav-btn:hover:not(:disabled) {
    transform: scale(1.1);
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(142, 113, 240, 0.2);
}

.nav-btn:disabled {
    opacity: 0.2;
    pointer-events: none;
    filter: grayscale(1);
    border-color: #eee;
}

.page-viewport {
    perspective: 1000px;
}

.printable-page {
    background: #fff;
    box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform var(--transition-slow);
    overflow: hidden;
    box-sizing: border-box; /* Critical for margin logic */
}

/* Image Slot Styling */
.image-slot {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background: rgba(248, 250, 252, 0.1);
}

.slot-empty {
    padding: 0;
    width: 100%;
    height: 100%;
}

.empty-trigger {
    border: 1px solid #e2e8f0;
    border-radius: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
    background: #fff;
}

.empty-trigger:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.empty-trigger i {
    padding: 8px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.empty-trigger span {
    font-size: 8px;
    font-weight: 400;
    text-transform: uppercase;
    text-align: center;
}

.slot-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    position: relative;
}

.slot-image:active {
    cursor: grabbing;
}

.slot-image img, .slot-image-content {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Default */
    transition: opacity 0.4s var(--transition-slow);
}

.slot-image-content.cover { object-fit: cover !important; }
.slot-image-content.contain { object-fit: contain !important; }

.slot-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background var(--transition-fast);
}

.slot-image:hover .slot-overlay {
    background: rgba(0, 0, 0, 0.05);
}

.slot-actions {
    position: absolute;
    bottom: 12px; /* Position moved to bottom for better ergonomics */
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    display: flex;
    gap: 8px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    opacity: 0;
    transition: all var(--transition-fast);
    z-index: 20;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.slot-image:hover .slot-actions {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.action-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.action-btn i {
    font-size: 13px;
    color: var(--text-main);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Specific colors for actions */
.action-btn.btn-fit:hover { background: #10b981; }
.action-btn.btn-fit:hover i { color: #fff; }

.action-btn.btn-rotate:hover { background: #2563eb; }
.action-btn.btn-rotate:hover i { color: #fff; }

.action-btn.btn-delete:hover { background: #ef4444; }
.action-btn.btn-delete:hover i { color: #fff; }

.separator-line {
    position: absolute;
    pointer-events: none;
    z-index: 10;
    transform-origin: center;
}

/* Hide UI elements during export capture */
.is-capturing .placeholder-icon,
.is-capturing .placeholder-text,
.is-capturing .empty-trigger i,
.is-capturing .empty-trigger span,
.is-capturing .slot-actions,
.is-capturing .empty-trigger {
    border: none !important;
    background: none !important;
    color: transparent !important;
    opacity: 0 !important;
}

.is-capturing .empty-trigger {
    background: #fff !important;
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity var(--transition-fast);
}

.modal-card {
    background: #fff;
    width: 90%;
    max-width: 440px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: translateY(0);
    transition: transform var(--transition-slow);
}

.modal-header {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 400;
}

.close-modal {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    padding: 0 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.option-group label {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
}

.modal-footer {
    padding: 16px 24px 24px;
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-primary-large {
    width: 100%;
    height: 48px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
}

.btn-danger-large {
    padding: 0 24px;
    height: 48px;
    background: var(--danger);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
}

.btn-ghost {
    padding: 0 24px;
    height: 48px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
}

.hidden { display: none; }

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }

/* Responsive adjustments */
@media (max-width: 900px) {
    .nav-btn { display: none; }
    .sidebar { width: 280px; }
}
  
/* Modal Refined Style */  
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; z-index: 2000; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }  
.modal-card { background: #fff; width: 400px; border-radius: 28px; box-shadow: 0 30px 60px rgba(0,0,0,0.1); overflow: hidden; animation: modalIn 0.4s cubic-bezier(0.075, 0.82, 0.165, 1); }  
@keyframes modalIn { from { opacity: 0; transform: scale(0.9) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }  
.modal-header { padding: 24px 30px; display: flex; justify-content: space-between; align-items: center; background: #fafafa; }  
.modal-body { padding: 30px; }  
.format-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 20px; }  
.format-btn { height: 56px; border: 1px solid #e2e8f0; border-radius: 16px; background: #fff; display: flex; align-items: center; padding: 0 20px; gap: 16px; cursor: pointer; transition: all 0.2s; font-size: 14px; font-weight: 500; }  
.format-btn:hover { border-color: var(--primary); background: var(--primary-light); transform: translateX(-5px); }  
.format-btn i { font-size: 20px; color: var(--primary); }  
.modal-overlay.hidden { opacity: 0; pointer-events: none; display: none; } 
