 /* --- VARIABLES (DOVE GREEN THEME) --- */
        :root {
            /* Font Family Updated to Lato */
            --font-main: 'Lato', sans-serif;

            /* Palette: Dove Green & Earthy Tones */
            --bg-color: #ffffff;
            --text-color: #333333;
            --text-secondary: #555555;
            --card-bg: #f4f6f4; /* Very light green-grey tint */
            --border-color: #daddd8;
            --placeholder-bg: #e0e0e0;
            --placeholder-text: #999;
            
            /* Main Accent - Dove Green */
            --accent-primary: #556b2f; /* Dark Olive Green / Dove Green */
            --accent-hover: #435525;
            
            /* UI Components */
            --header-bg: rgba(255, 255, 255, 0.98);
            --shadow-soft: 0 10px 40px rgba(85, 107, 47, 0.05);
            --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
            --nav-hover: #e9ece6;
            --section-bg: #ffffff;
        }

        /* Dark Mode Overrides */
        body.dark-mode {
            --bg-color: #1a1c18;
            --text-color: #e2e2e2;
            --text-secondary: #a0a0a0;
            --card-bg: #232620;
            --border-color: #333333;
            --placeholder-bg: #333;
            --header-bg: rgba(26, 28, 24, 0.98);
            --shadow-soft: 0 10px 40px rgba(0,0,0,0.3);
            --nav-hover: #2d3329;
            --section-bg: #1a1c18;
            --accent-primary: #7d9656; /* Lighter Dove Green for Dark Mode */
            --accent-hover: #8ba860;
        }

        /* --- RESET & BASIC SETUP --- */
        * { margin: 0; padding: 0; box-sizing: border-box; }
        
        body {
            font-family: var(--font-main);
            background-color: var(--bg-color);
            color: var(--text-color);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            transition: background-color 0.3s, color 0.3s;
            line-height: 1.6;
        }

        /* --- HEADER NAVIGATION --- */
        header {
            background: var(--header-bg);
            border-bottom: 1px solid var(--border-color);
            position: sticky;
            top: 0;
            z-index: 1000;
            transition: background 0.3s, border-color 0.3s;
        }

        .nav-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
            min-height: 70px;
            display: flex;
            align-items: center;
        }

        .logo {
            font-size: 22px;
            font-weight: 900; /* Lato Black */
            color: var(--accent-primary);
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 8px;
            height: 70px;
            margin-right: 20px;
        }

        .logo span { color: var(--text-color); }

        /* Desktop Menu - Pushed to Right */
        .nav-menu {
            display: flex;
            list-style: none;
            gap: 15px;
            align-items: center;
            margin-left: auto;
            margin-right: 20px;
        }

        .nav-item { position: relative; }

        .nav-link {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 8px 12px;
            text-decoration: none;
            color: var(--text-color);
            font-weight: 700; /* Lato Bold */
            border-radius: 6px;
            transition: all 0.2s;
            font-size: 15px;
            cursor: pointer;
        }

        .nav-link:hover {
            background: var(--nav-hover);
            color: var(--accent-primary);
        }

        /* Submenu & Dropdown */
        .submenu {
            position: absolute;
            top: 100%; right: 0;
            background: var(--card-bg);
            min-width: 200px;
            border-radius: 8px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
            opacity: 0; visibility: hidden;
            transform: translateY(10px);
            transition: all 0.2s;
            list-style: none;
            padding: 8px 0;
            border: 1px solid var(--border-color);
            z-index: 100;
        }

        @media (min-width: 769px) {
            .nav-item:hover > .submenu {
                opacity: 1; visibility: visible; transform: translateY(0);
            }
            .submenu .submenu {
                top: 0; right: 100%; margin-right: 10px; margin-top: -5px;
            }
        }

        .submenu .nav-link {
            padding: 10px 20px;
            border-radius: 0;
            font-size: 14px;
            font-weight: 400; /* Regular weight for submenu */
            justify-content: space-between;
        }

        /* Actions (Toggle & Burger) */
        .nav-actions { display: flex; align-items: center; gap: 10px; }

        .theme-toggle {
            background: none;
            border: 1px solid var(--border-color);
            color: var(--text-color);
            font-size: 20px;
            width: 40px;
            height: 40px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .theme-toggle:hover {
            background: var(--nav-hover);
            border-color: var(--accent-primary);
            color: var(--accent-primary);
        }

        /* Hamburger Menu */
        .hamburger {
            padding: 0;
            display: none;
            cursor: pointer;
            font: inherit;
            color: inherit;
            background-color: transparent;
            border: 0;
            margin: 0;
            overflow: visible;
            width: 40px;
            height: 40px;
        }
        .hamburger-box { width: 30px; height: 24px; display: inline-block; position: relative; top: 8px; }
        .hamburger-inner { display: block; top: 50%; margin-top: -2px; }
        .hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
            width: 30px; height: 2px; background-color: var(--text-color);
            border-radius: 4px; position: absolute; transition-property: transform;
            transition-duration: 0.15s; transition-timing-function: ease;
        }
        .hamburger-inner::before, .hamburger-inner::after { content: ""; display: block; }
        .hamburger-inner::before { top: -8px; }
        .hamburger-inner::after { bottom: -8px; }

        .hamburger--spin .hamburger-inner { transition-duration: 0.22s; transition-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); }
        .hamburger--spin .hamburger-inner::before { transition: top 0.1s 0.25s ease-in, opacity 0.1s ease-in; }
        .hamburger--spin .hamburger-inner::after { transition: bottom 0.1s 0.25s ease-in, transform 0.22s cubic-bezier(0.55, 0.055, 0.675, 0.19); }
        .hamburger--spin.is-active .hamburger-inner { transform: rotate(225deg); transition-delay: 0.12s; transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); }
        .hamburger--spin.is-active .hamburger-inner::before { top: 0; opacity: 0; transition: top 0.1s ease-out, opacity 0.1s 0.12s ease-out; }
        .hamburger--spin.is-active .hamburger-inner::after { bottom: 0; transform: rotate(-90deg); transition: bottom 0.1s ease-out, transform 0.22s 0.12s cubic-bezier(0.215, 0.61, 0.355, 1); }

        @media (max-width: 768px) {
            .nav-container { flex-wrap: wrap; }
            .hamburger { display: block; margin-left: 10px; }
            .nav-actions { margin-left: auto; }
            
            .nav-menu {
                width: 100%; flex-direction: column; display: none;
                padding: 10px 0 20px 0; border-top: 1px solid var(--border-color);
                margin-top: 10px; background: var(--bg-color);
                align-items: flex-start; margin-left: 0; margin-right: 0; order: 3;
            }

            .nav-menu.active { display: flex; }
            .nav-item { width: 100%; }
            .nav-link { padding: 12px 10px; justify-content: space-between; }

            .submenu {
                position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
                width: 100%; background: transparent !important; border: none !important;
                margin-left: 0; padding-left: 15px; display: none;
            }
            .submenu .nav-link { padding: 8px 15px; font-size: 14px; color: var(--text-secondary); justify-content: flex-start; }
            .submenu.open { display: block; }
        }

        /* --- MAIN CONTENT LAYOUT --- */
        main {
            flex: 1; padding: 40px 20px; width: 100%;
            max-width: 1200px; margin: 0 auto;
        }
        
        .container {
            background: var(--bg-color); border: 1px solid var(--border-color);
            border-radius: 16px; box-shadow: var(--shadow-soft);
            padding: 40px; max-width: 800px; width: 100%;
            margin: 0 auto 60px auto; position: relative;
        }

        .container.wide-view {
            max-width: 1200px; background: transparent;
            box-shadow: none; border: none; padding: 0;
        }

        .app-header { text-align: center; margin-bottom: 40px; }
        h1 { color: var(--text-color); margin-bottom: 12px; font-size: 32px; font-weight: 900; letter-spacing: -0.5px; }
        .subtitle { color: var(--text-secondary); font-size: 16px; }

        /* Warning Box */
        .browser-warning {
            background: rgba(255, 193, 7, 0.1); border: 1px solid #ffc107;
            border-radius: 8px; padding: 15px; margin-bottom: 20px;
            display: none; color: #856404;
        }
        .browser-warning.active { display: block; }
        
        /* Upload Area */
        .upload-area {
            border: 2px dashed var(--border-color); border-radius: 16px;
            padding: 60px 20px; text-align: center; cursor: pointer;
            transition: all 0.3s; background: var(--card-bg); margin-bottom: 20px;
        }
        .upload-area:hover { background: var(--nav-hover); border-color: var(--accent-primary); }
        .upload-icon { font-size: 56px; color: var(--accent-primary); margin-bottom: 20px; opacity: 0.8; }
        input[type="file"] { display: none; }
        .upload-text { color: var(--text-color); font-weight: 700; margin-bottom: 8px; font-size: 18px; }
        .upload-hint { color: var(--text-secondary); font-size: 14px; }
        
        /* Preview Section */
        .preview-section { display: none; margin-top: 30px; position: relative; }
        .preview-section.active { display: block; }

        .close-btn {
            position: absolute; top: -50px; right: 0;
            background: var(--card-bg); border: 1px solid var(--border-color);
            color: var(--text-color); width: 36px; height: 36px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            cursor: pointer; transition: all 0.2s; font-size: 18px; z-index: 10;
        }
        .close-btn:hover { background: #d32f2f; color: white; border-color: #d32f2f; }
        
        .preview-box {
            text-align: center; margin-bottom: 20px; background: var(--card-bg);
            padding: 20px; border-radius: 12px; border: 1px solid var(--border-color);
        }
        .preview-box img {
            max-width: 100%; height: auto; border-radius: 8px; box-shadow: var(--shadow-card);
            max-height: 350px; object-fit: contain;
            background-image: linear-gradient(45deg, #ddd 25%, transparent 25%), linear-gradient(-45deg, #ddd 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ddd 75%), linear-gradient(-45deg, transparent 75%, #ddd 75%);
            background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0px; background-color: white;
        }
        
        .file-info {
            display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px;
            margin: 20px 0; padding: 20px; background: var(--card-bg);
            border-radius: 12px; font-size: 14px; border: 1px solid var(--border-color);
        }
        .file-info-item { text-align: center; }
        .file-info-label { color: var(--text-secondary); display: block; margin-bottom: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }
        .file-info-value { color: var(--text-color); font-weight: 700; }
        
        /* Format Selection */
        .format-selection h3 { color: var(--text-color); margin-bottom: 15px; font-size: 16px; font-weight: 700; }
        .format-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 12px; }
        .format-option input[type="checkbox"] { display: none; }
        
        .format-label {
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            padding: 15px 10px; background: var(--bg-color); border: 2px solid var(--border-color);
            border-radius: 10px; cursor: pointer; transition: all 0.2s; font-weight: 700;
            color: var(--text-secondary); font-size: 14px;
        }
        .format-label:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
        .format-option input[type="checkbox"]:checked + .format-label {
            background: var(--accent-primary); color: white; border-color: var(--accent-primary);
            box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        }
        
        /* Quality & Buttons */
        .quality-control { margin: 30px 0; }
        .quality-header { display: flex; justify-content: space-between; margin-bottom: 12px; color: var(--text-color); font-weight: 700; }
        .quality-value { color: var(--accent-primary); }
        .quality-slider {
            width: 100%; height: 6px; border-radius: 5px; background: var(--border-color);
            outline: none; -webkit-appearance: none;
        }
        .quality-slider::-webkit-slider-thumb {
            -webkit-appearance: none; appearance: none; width: 22px; height: 22px;
            border-radius: 50%; background: var(--accent-primary); cursor: pointer; transition: transform 0.1s;
        }
        .quality-slider::-webkit-slider-thumb:hover { transform: scale(1.1); }
        
        .btn-convert {
            width: 100%; padding: 18px; border: none; border-radius: 12px;
            font-weight: 900; font-size: 16px; cursor: pointer; transition: all 0.2s;
            background: var(--accent-primary); color: white; display: flex;
            align-items: center; justify-content: center; gap: 10px;
        }
        .btn-convert:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-1px); }
        .btn-convert:disabled { opacity: 0.6; cursor: not-allowed; }
        
        /* Status */
        .status { margin-top: 20px; padding: 15px; border-radius: 10px; text-align: center; font-weight: 500; display: none; font-size: 14px; }
        .status.active { display: block; }
        .status.error { background: #fee2e2; color: #b91c1c; }

        /* --- LOADING PAGE (Separate Page) --- */
        .loading-page {
            display: none; text-align: center; padding: 80px 20px; animation: fadeIn 0.4s ease;
        }
        .loading-page.active { display: block; }
        
        .loading-spinner {
            display: inline-block; width: 60px; height: 60px;
            border: 4px solid var(--border-color); border-top: 4px solid var(--accent-primary);
            border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 30px;
        }
        .loading-text { font-size: 20px; font-weight: 700; color: var(--text-color); margin-bottom: 10px; }
        .loading-subtext { color: var(--text-secondary); font-size: 14px; }

        /* --- DOWNLOAD PAGE LAYOUT (WITH ADS) --- */
        .download-page { display: none; animation: fadeIn 0.4s ease; width: 100%; }
        .download-page.active { display: block; }

        .download-layout { display: flex; flex-direction: column; gap: 20px; align-items: center; }

        /* Ad Placeholders */
        .ad-unit {
            background: var(--placeholder-bg); color: var(--placeholder-text);
            display: flex; align-items: center; justify-content: center;
            font-weight: 700; font-size: 14px; border: 1px dashed var(--border-color);
            position: relative;
        }
        .ad-unit::after { content: "Advertisement"; }
        .ad-top-728 { width: 728px; height: 90px; max-width: 100%; }
        .ad-side-300 { width: 300px; height: 600px; flex-shrink: 0; }
        @media (max-width: 1100px) { .ad-side-300 { display: none; } }

        .download-content-row { display: flex; width: 100%; justify-content: center; gap: 20px; align-items: flex-start; }
        
        .download-card {
            flex: 1; background: var(--bg-color); border: 1px solid var(--border-color);
            border-radius: 16px; padding: 30px; text-align: center; max-width: 600px;
            box-shadow: var(--shadow-soft);
        }

        .download-timer-banner {
            background: #fdf6b2; color: #723b13; padding: 12px;
            border-radius: 8px; margin-bottom: 25px; font-weight: 700; border: 1px solid #fce96a;
        }

        .download-list { display: flex; flex-direction: column; gap: 15px; margin: 30px 0; }

        .download-item-container {
            display: flex; align-items: center; justify-content: space-between;
            background: white; border: 1px solid var(--border-color);
            border-radius: 12px; padding: 12px 16px; transition: all 0.2s;
            flex-wrap: wrap; gap: 12px;
        }

        .download-file-info { display: flex; align-items: center; gap: 12px; flex: 1; }
        .file-icon-box {
            width: 40px; height: 40px; background: var(--nav-hover); border-radius: 8px;
            display: flex; align-items: center; justify-content: center;
            color: var(--accent-primary); font-size: 20px; flex-shrink: 0;
        }
        .file-details { display: flex; flex-direction: column; text-align: left; }
        .file-name-display { font-weight: 700; color: var(--text-color); font-size: 14px; word-break: break-all; }
        .file-size-display { font-size: 12px; color: var(--text-secondary); }

        .download-action-btn {
            background: var(--accent-primary); color: white; text-decoration: none;
            padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 700;
            display: flex; align-items: center; gap: 6px; transition: all 0.2s;
            border: none; cursor: pointer;
        }
        .download-action-btn:hover:not(.disabled) { background: var(--accent-hover); transform: translateY(-1px); }
        .download-action-btn.disabled { background: #ccc; cursor: not-allowed; pointer-events: none; opacity: 0.7; }

        .btn-outline {
            background: transparent; border: 2px solid var(--border-color); color: var(--text-color);
            padding: 14px 28px; border-radius: 10px; font-weight: 700; cursor: pointer;
            transition: all 0.2s; margin-top: 20px;
        }
        .btn-outline:hover { border-color: var(--accent-primary); color: var(--accent-primary); }

        /* --- INFO SECTIONS --- */
        .info-section { margin-top: 40px; background: var(--bg-color); border-top: 1px solid var(--border-color); padding: 60px 0; }
        .info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 60px; padding: 0 20px; max-width: 1200px; margin: 0 auto; }
        .info-block h2 { color: var(--accent-primary); margin-bottom: 25px; font-size: 24px; font-weight: 900; }
        .info-block h3 { color: var(--text-color); margin: 30px 0 15px 0; font-size: 18px; font-weight: 700; }
        .info-list { list-style: none; }
        .info-list li { position: relative; padding-left: 30px; margin-bottom: 15px; color: var(--text-secondary); }
        .info-list li::before { content: '•'; position: absolute; left: 10px; color: var(--accent-primary); font-weight: bold; font-size: 20px; line-height: 18px; }
        .faq-item { margin-bottom: 25px; }
        .faq-item h4 { color: var(--text-color); margin-bottom: 8px; font-size: 16px; font-weight: 700; }
        .faq-item p { color: var(--text-secondary); font-size: 15px; line-height: 1.7; }

		/* --- COOKIE POPUP --- */
        .cookie-popup {
            position: fixed; bottom: 20px; left: 20px; background: var(--bg-color);
            border: 1px solid var(--border-color); box-shadow: var(--shadow-soft);
            padding: 20px; border-radius: 12px; width: 320px; z-index: 10000;
            display: none; animation: slideUp 0.5s ease-out;
        }
        .cookie-popup.show { display: block; }
        .cookie-content h4 { margin-bottom: 10px; color: var(--text-color); font-weight: 900; }
        .cookie-content p { font-size: 13px; color: var(--text-secondary); margin-bottom: 15px; line-height: 1.5; }
        .cookie-actions { display: flex; gap: 10px; }
        .btn-cookie-accept {
            background: var(--accent-primary); color: white; border: none;
            padding: 8px 16px; border-radius: 6px; font-weight: 700;
            cursor: pointer; font-size: 12px; flex: 1; transition: 0.2s;
        }
        .btn-cookie-reject {
            background: transparent; border: 1px solid var(--border-color);
            color: var(--text-color); padding: 8px 16px; border-radius: 6px;
            font-weight: 700; cursor: pointer; font-size: 12px; flex: 1; transition: 0.2s;
        }
        .btn-cookie-accept:hover { background: var(--accent-hover); }
        .btn-cookie-reject:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
		
        /* --- FOOTER --- */
        footer { background: var(--card-bg); border-top: 1px solid var(--border-color); padding: 60px 20px; margin-top: auto; }
        .footer-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; }
        .footer-col h4 { color: var(--text-color); margin-bottom: 25px; font-size: 16px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.5px; }
        .footer-links { list-style: none; }
        .footer-links li { margin-bottom: 14px; }
        .footer-links a { color: var(--text-secondary); text-decoration: none; transition: color 0.2s; font-size: 14px; display: flex; align-items: center; gap: 8px; }
        .footer-links a:hover { color: var(--accent-primary); }
        .footer-bottom { text-align: center; padding-top: 40px; margin-top: 40px; border-top: 1px solid var(--border-color); color: var(--text-secondary); font-size: 13px; }

        @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
		@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
