:root {
    /* --- Modern Palette --- */
    /* Primary: Indigo/Violet for a modern tech feel */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;

    /* Secondary: Purple/Pink for gradients */
    --secondary: #8b5cf6;
    --accent: #ec4899;

    /* Functional Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Typography */
    --font-main: 'Inter', sans-serif;
    --font-display: 'Outfit', sans-serif;
    --font-ar: 'Tajawal', sans-serif;

    /* Spacing & Radius */
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --header-height: 80px;

    /* --- Theme Variables (Default Dark) --- */
    --bg-body: #0f172a;
    /* Slate 900 */
    --bg-glass: rgba(30, 41, 59, 0.65);
    /* Slate 800 with opacity */
    --bg-glass-hover: rgba(30, 41, 59, 0.8);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-hover: rgba(255, 255, 255, 0.15);

    --text-main: #f8fafc;
    /* Slate 50 */
    --text-muted: #94a3b8;
    /* Slate 400 */

    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.2);
}

[data-theme="light"] {
    /* --- Light Theme (Crystal) --- */
    --bg-body: #f8fafc;
    /* Slate 50 */
    --bg-glass: rgba(255, 255, 255, 0.75);
    --bg-glass-hover: rgba(255, 255, 255, 0.9);
    --border-glass: rgba(255, 255, 255, 0.6);
    --border-glass-hover: rgba(99, 102, 241, 0.3);

    --text-main: #0f172a;
    /* Slate 900 */
    --text-muted: #64748b;
    /* Slate 500 */

    --shadow-glass: 0 8px 32px 0 rgba(99, 102, 241, 0.1);
    /* Indigo tint shadow */
    --shadow-card: 0 4px 6px -1px rgba(148, 163, 184, 0.1);
}

/* RTL Support */
[dir="rtl"] {
    font-family: var(--font-ar);
}

html[lang="ar"] body {
    font-family: var(--font-ar);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* --- Background Effects --- */
.app-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: var(--primary);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: var(--secondary);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 400px;
    height: 400px;
    background: var(--accent);
    opacity: 0.3;
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* --- Utilities --- */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-glass);
    border-radius: var(--radius-lg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
    filter: brightness(1.1);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- Header --- */
.app-header {
    position: sticky;
    top: 20px;
    margin: 0 auto 40px;
    width: calc(100% - 48px);
    max-width: 1200px;
    z-index: 1000;
    padding: 12px 0;
    border-radius: 100px;
}

.app-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    position: relative;
    padding: 4px 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-main);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: rgba(128, 128, 128, 0.1);
    border-color: var(--border-glass);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 8px;
}

/* Theme Icons */
[data-theme="dark"] .sun-icon {
    display: none;
}

[data-theme="dark"] .moon-icon {
    display: block;
}

[data-theme="light"] .sun-icon {
    display: block;
}

[data-theme="light"] .moon-icon {
    display: none;
}

.lang-dropdown select {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.9rem;
    outline: none;
}

.lang-dropdown select:hover {
    border-color: var(--primary);
}

.lang-dropdown select option {
    background: var(--bg-body);
    color: var(--text-main);
}

/* --- Hero Section --- */
.app-main {
    padding-bottom: 80px;
}

.hero-section {
    text-align: center;
    margin: 60px 0 60px;
    padding: 0 20px;
}

.hero-section h1 {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-main) 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-section p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Converter Workspace --- */
.converter-workspace {
    display: flex;
    flex-direction: column;
    gap: 0;
    /* Gap handled by padding/layout */
    max-width: 1000px;
    margin: 0 auto 100px;
    overflow: hidden;
    /* For rounded corners */
}

/* Upload Area */
.upload-area {
    padding: 80px 40px;
    text-align: center;
    border: 2px dashed var(--border-glass);
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.upload-area:hover .upload-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.upload-area h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.upload-area .sub-text {
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* Control Center */
.control-center {
    display: grid;
    grid-template-columns: 350px 1fr;
    border-top: 1px solid var(--border-glass);
    animation: slideDown 0.5s ease;
}

.files-panel {
    border-right: 1px solid var(--border-glass);
    padding: 32px;
    background: rgba(0, 0, 0, 0.05);
    max-height: 600px;
    overflow-y: auto;
}

[dir="rtl"] .files-panel {
    border-right: none;
    border-left: 1px solid var(--border-glass);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.panel-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-text:hover {
    color: var(--danger);
    text-decoration: underline;
}

.file-list-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    transition: transform 0.2s;
}

.file-item:hover {
    transform: translateX(4px);
    border-color: var(--primary-light);
}

.file-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-main);
}

.file-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.remove-file {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
}

.remove-file:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Settings Panel */
.settings-panel {
    padding: 40px;
    background: var(--bg-glass);
}

.settings-panel h3 {
    margin-bottom: 32px;
    font-family: var(--font-display);
    font-size: 1.5rem;
}

.setting-item {
    margin-bottom: 40px;
}

.setting-item label {
    display: block;
    margin-bottom: 16px;
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
}

/* Format Options */
.format-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 16px;
}

.radio-card {
    position: relative;
    cursor: pointer;
}

.radio-card input {
    position: absolute;
    opacity: 0;
}

.radio-card span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--bg-body);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
}

.radio-card:hover span {
    border-color: var(--primary);
    color: var(--text-main);
}

.radio-card input:checked+span {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Sliders & Toggles */
.label-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.value-badge {
    background: var(--primary);
    color: white;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(128, 128, 128, 0.3);
    /* Darker track for visibility */
    border-radius: 3px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
    transition: transform 0.2s;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

/* Switch */
.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.toggle-row label {
    margin-bottom: 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-round {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-glass);
    transition: .4s;
    border-radius: 34px;
}

.slider-round:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider-round {
    background-color: var(--success);
}

input:checked+.slider-round:before {
    transform: translateX(24px);
}

/* Resize Inputs */
.resize-inputs {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    background: rgba(0, 0, 0, 0.1);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-top: 16px;
    animation: fadeIn 0.3s ease;
}

.input-group {
    flex: 1;
}

.input-group label {
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.input-group input,
.unit-select {
    width: 100%;
    background: var(--bg-body);
    border: 1px solid var(--border-glass);
    padding: 12px;
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    outline: none;
}

.input-group input:focus,
.unit-select:focus {
    border-color: var(--primary);
}

.link-icon {
    padding-bottom: 12px;
    color: var(--text-muted);
    cursor: pointer;
}

.link-icon.active {
    color: var(--primary);
}

.btn-lg {
    width: 100%;
    padding: 18px;
    font-size: 1.1rem;
    margin-top: 20px;
}

/* Results Area */
.results-area {
    padding: 40px;
    border-top: 1px solid var(--border-glass);
    background: rgba(0, 0, 0, 0.02);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.result-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform 0.3s;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
}

.result-preview {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.1);
}

.result-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 500;
}

.download-btn-sm {
    display: block;
    width: 100%;
    padding: 10px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.download-btn-sm:hover {
    background: var(--primary);
    color: white;
}

/* --- Info Sections (Features, How-to, FAQ) --- */
.info-section,
.features-section,
.faq-section {
    max-width: 1200px;
    margin: 0 auto 100px;
    padding: 40px;
}

.info-section h2,
.faq-section h2 {
    text-align: center;
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: var(--text-main);
}

/* Steps Grid */
.steps-grid {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    position: relative;
}

.step-card {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
}

.step-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--primary);
    font-size: 1.5rem;
    box-shadow: var(--shadow-card);
}

.step-number {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 800;
    color: var(--border-glass);
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
    opacity: 0.5;
}

.step-content h3 {
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.step-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.step-connector {
    flex: 1;
    height: 2px;
    background: var(--border-glass);
    margin-top: 40px;
    position: relative;
}

.step-connector::after {
    content: '';
    position: absolute;
    right: 0;
    top: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

/* Features Grid */
.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.feature-card {
    padding: 40px;
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.icon-box {
    font-size: 3rem;
    margin-bottom: 24px;
}

/* FAQ Accordion */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-glass);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}

.faq-question:hover {
    color: var(--primary);
}

.chevron {
    transition: transform 0.3s ease;
}

.faq-item.active .chevron {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    /* Approximate max height */
}

.answer-content {
    padding: 0 20px 24px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Ad Banners */
.ad-banner {
    max-width: 1000px;
    margin: 40px auto;
    height: 120px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px dashed var(--border-glass);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-family: var(--font-display);
    letter-spacing: 1px;
}

/* Footer */
.app-footer {
    border-top: 1px solid var(--border-glass);
    padding: 60px 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.1);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--primary);
}

/* Scroll to Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    transform: translateY(-5px);
    background: var(--primary-dark);
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }

    .control-center {
        grid-template-columns: 1fr;
    }

    .files-panel {
        border-right: none;
        border-bottom: 1px solid var(--border-glass);
        max-height: 300px;
    }

    .steps-grid {
        flex-direction: column;
        gap: 40px;
    }

    .step-connector {
        width: 2px;
        height: 40px;
        margin: 0 auto;
    }

    .step-connector::after {
        top: auto;
        bottom: -4px;
        left: -4px;
    }

    /* Mobile Menu */
    .mobile-menu-btn {
        display: block;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-body);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        transition: right 0.3s ease;
        z-index: 1000;
        font-size: 1.5rem;
    }

    .nav-links.active {
        right: 0;
    }

    .app-header .container {
        position: relative;
    }
}

/* --- Contact Page --- */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 14px;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

[data-theme="light"] .form-input {
    background: rgba(255, 255, 255, 0.5);
}

.form-input:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.05);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

[data-theme="light"] .form-input:focus {
    background: white;
}

.full-width {
    width: 100%;
    margin-top: 10px;
}

/* --- New Features Styling --- */

/* Current Dimensions Badge */
.current-dimensions-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    border: 1px solid var(--border-glass);
}

.dim-label {
    font-weight: 600;
}

.dim-value {
    font-family: monospace;
    color: var(--primary-light);
}

/* Metadata Editor */
.metadata-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.btn-xs {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-xs:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.btn-xs.danger {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-xs.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
}

.metadata-editor {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-glass);
    max-height: 300px;
    overflow-y: auto;
}

.meta-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.meta-table th,
.meta-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid var(--border-glass);
}

.meta-table th {
    color: var(--text-muted);
    font-weight: 500;
    width: 35%;
}

.meta-table td {
    color: var(--text-main);
}

.meta-input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: inherit;
    font-size: inherit;
    padding: 4px;
    border-radius: 4px;
}

.meta-input:focus {
    background: rgba(255, 255, 255, 0.05);
    outline: 1px solid var(--primary);
}

.empty-meta {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
    font-style: italic;
}

/* --- Cookie Consent Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    width: calc(100% - 40px);
    max-width: 600px;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glass);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 16px;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.cookie-content {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.cookie-icon {
    font-size: 24px;
}

.cookie-text h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-main);
}

.cookie-text p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.cookie-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
}

@media (max-width: 600px) {
    .cookie-banner {
        bottom: 0;
        left: 0;
        width: 100%;
        transform: translateY(100%);
        border-radius: 24px 24px 0 0;
        border-bottom: none;
    }

    .cookie-banner.visible {
        transform: translateY(0);
    }
}