       :root {
            --primary: #6c5ce7;
            --primary-light: #a29bfe;
            --primary-dark: #4d44db;
            --accent: #fd79a8;
            --success: #00b894;
            --danger: #d63031;
            --light: #f8f9fa;
            --dark: #2d3436;
            --gray: #636e72;
            --white: #ffffff;
            --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
            --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
            --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
            --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            --border-radius: 8px;
            --border-radius-lg: 16px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Poppins', sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #dfe6f0 100%);
            color: var(--dark);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
            line-height: 1.6;
        }

        .converter-app {
            width: 100%;
            max-width: 900px;
            background: var(--white);
            border-radius: var(--border-radius-lg);
            box-shadow: var(--shadow-lg);
            overflow: hidden;
            transform: translateY(0);
            transition: var(--transition);
            animation: fadeInUp 0.5s ease-out;
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .app-header {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: var(--white);
            padding: 25px;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .app-header h1 {
            font-size: 2rem;
            margin-bottom: 8px;
            position: relative;
            z-index: 1;
            font-weight: 700;
        }

        .app-header p {
            font-size: 0.95rem;
            opacity: 0.9;
            max-width: 500px;
            margin: 0 auto;
            position: relative;
            z-index: 1;
            font-weight: 300;
        }

        .converter-content {
            padding: 25px;
        }

        .upload-area {
            border: 2px dashed var(--primary-light);
            border-radius: var(--border-radius);
            padding: 30px 20px;
            text-align: center;
            cursor: pointer;
            transition: var(--transition);
            margin-bottom: 20px;
            position: relative;
            background: rgba(162, 155, 254, 0.05);
        }

        .upload-area.highlight {
            border-color: var(--primary);
            background: rgba(162, 155, 254, 0.1);
            transform: translateY(-2px);
            box-shadow: var(--shadow-sm);
        }

        .upload-area i {
            font-size: 2.5rem;
            color: var(--primary);
            margin-bottom: 12px;
            transition: var(--transition);
        }

        .upload-area h3 {
            margin-bottom: 8px;
            color: var(--primary);
            font-weight: 600;
            font-size: 1.1rem;
        }

        .upload-area p {
            color: var(--gray);
            margin-bottom: 0;
            font-size: 0.9rem;
        }

        .upload-area .browse-text {
            color: var(--primary);
            font-weight: 500;
            text-decoration: underline;
        }

        #file-input {
            display: none;
        }

        .file-info {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 20px;
            padding: 15px;
            background: rgba(108, 92, 231, 0.05);
            border-radius: var(--border-radius);
            display: none;
        }

        .file-icon {
            color: var(--primary);
            font-size: 1.5rem;
        }

        .file-details {
            flex: 1;
        }

        .file-name {
            font-weight: 500;
            font-size: 0.95rem;
            margin-bottom: 4px;
        }

        .file-count {
            font-size: 0.8rem;
            color: var(--gray);
        }

        .file-action-btn {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 1rem;
            transition: var(--transition);
            color: var(--danger);
        }

        .file-action-btn:hover {
            opacity: 0.8;
        }

        .preview-section {
            margin-top: 20px;
            display: none;
        }

        .thumbnail-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            gap: 15px;
            margin-bottom: 20px;
        }

        @media (max-width: 768px) {
            .thumbnail-container {
                grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
            }
        }

        @media (max-width: 576px) {
            .thumbnail-container {
                grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
            }
        }

        .thumbnail-item {
            position: relative;
            border-radius: var(--border-radius);
            overflow: hidden;
            transition: var(--transition);
            aspect-ratio: 1;
            background: #f5f5f5;
            border: 1px solid #e0e0e0;
        }

        .thumbnail-item:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-sm);
        }

        .thumbnail-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .thumbnail-actions {
            position: absolute;
            top: 5px;
            right: 5px;
            display: flex;
            gap: 5px;
            opacity: 0;
            transition: var(--transition);
        }

        .thumbnail-item:hover .thumbnail-actions {
            opacity: 1;
        }

        .thumbnail-btn {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            background: rgba(0, 0, 0, 0.7);
            color: white;
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 14px;
            transition: var(--transition);
        }

        .thumbnail-btn:hover {
            background: rgba(0, 0, 0, 0.9);
            transform: scale(1.1);
        }

        .options-section {
            margin-top: 20px;
            background: rgba(108, 92, 231, 0.05);
            border-radius: var(--border-radius);
            padding: 20px;
            margin-bottom: 20px;
            border: 1px solid rgba(108, 92, 231, 0.1);
        }

        .options-section h3 {
            margin-bottom: 15px;
            color: var(--primary);
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .options-section h3 i {
            font-size: 1.2rem;
        }

        .option-row {
            display: flex;
            flex-direction: column;
            margin-bottom: 15px;
        }

        @media (min-width: 768px) {
            .option-row {
                flex-direction: row;
                align-items: center;
            }
        }

        .option-row label {
            width: 100%;
            margin-bottom: 8px;
            font-weight: 500;
            color: var(--dark);
            font-size: 0.9rem;
        }

        @media (min-width: 768px) {
            .option-row label {
                width: 180px;
                margin-bottom: 0;
            }
        }

        .option-row select,
        .option-row input {
            flex: 1;
            width: 100%;
            padding: 10px 12px;
            border: 2px solid #e0e0e0;
            border-radius: var(--border-radius);
            font-family: 'Poppins', sans-serif;
            transition: var(--transition);
            font-size: 0.9rem;
        }

        select {
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c5ce7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 12px center;
            background-size: 1em;
            padding-right: 2.5rem !important;
        }

        .option-row select:focus,
        .option-row input:focus {
            outline: none;
            border-color: var(--primary-light);
            box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
        }

        .checkbox-group {
            display: flex;
            flex-direction: column;
            gap: 12px;
            width: 100%;
        }

        @media (min-width: 768px) {
            .checkbox-group {
                flex-direction: row;
                gap: 20px;
            }
        }

        .checkbox-option {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
        }

        .checkbox-option input[type="checkbox"] {
            width: 18px;
            height: 18px;
            border: 2px solid var(--primary);
            border-radius: 4px;
            appearance: none;
            cursor: pointer;
            transition: var(--transition);
            position: relative;
        }

        .checkbox-option input[type="checkbox"]:checked {
            background: var(--primary);
            border-color: var(--primary);
        }

        .checkbox-option input[type="checkbox"]:checked::after {
            content: '✓';
            position: absolute;
            color: white;
            font-size: 12px;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        .checkbox-option label {
            cursor: pointer;
            user-select: none;
            transition: var(--transition);
            font-weight: 400;
            margin: 0;
            font-size: 0.9rem;
        }

        .checkbox-option:hover label {
            color: var(--primary);
        }

        .action-buttons {
            display: flex;
            gap: 12px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .btn {
            padding: 12px 20px;
            border: none;
            border-radius: 50px;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            font-size: 0.9rem;
            flex: 1;
            min-width: 120px;
        }

        .btn-primary {
            background: var(--primary);
            color: var(--white);
            box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
        }

        .btn-primary:hover:not(:disabled) {
            background: var(--primary-dark);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
        }

        .btn-secondary {
            background: var(--white);
            color: var(--primary);
            border: 2px solid var(--primary);
        }

        .btn-secondary:hover:not(:disabled) {
            background: rgba(108, 92, 231, 0.1);
        }

        .btn-danger {
            background: var(--danger);
            color: var(--white);
            box-shadow: 0 4px 15px rgba(214, 48, 49, 0.3);
        }

        .btn-danger:hover:not(:disabled) {
            background: #c0392b;
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(214, 48, 49, 0.4);
        }

        .btn:disabled {
            opacity: 0.7;
            cursor: not-allowed;
        }

        .progress-container {
            width: 100%;
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(8px);
            border-radius: 12px;
            margin: 16px 0;
            overflow: hidden;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            border: 1px solid rgba(255, 255, 255, 0.08);
            display: none;
        }

        .progress-bar {
            height: 8px;
            width: 0%;
            background: linear-gradient(90deg, #8e2de2, #4a00e0);
            box-shadow: 0 0 10px rgba(142, 45, 226, 0.5);
            border-radius: 12px;
            transition: width 0.4s ease-in-out;
        }

        .status-message {
            text-align: center;
            color: var(--gray);
            font-size: 0.85rem;
            margin-bottom: 10px;
        }

        .output-section {
            display: none;
            margin-top: 20px;
            animation: fadeIn 0.5s ease-out;
        }

        .download-container {
            text-align: center;
            padding: 18px;
            background: rgba(0, 184, 148, 0.05);
            border-radius: var(--border-radius);
            border: 1px dashed var(--success);
        }

        .download-title {
            font-size: 1.1rem;
            margin-bottom: 12px;
            color: var(--dark);
            font-weight: 600;
        }

        .download-subtitle {
            color: var(--gray);
            margin-bottom: 16px;
            font-size: 0.85rem;
        }

        .error-message {
            color: var(--danger);
            background: rgba(214, 48, 49, 0.1);
            padding: 10px 12px;
            border-radius: var(--border-radius);
            margin-bottom: 16px;
            display: none;
            animation: fadeIn 0.3s ease-out;
            font-size: 0.85rem;
        }

        .upload-status {
            display: none;
            text-align: center;
            margin: 10px 0;
            color: var(--primary);
            font-size: 0.85rem;
            font-weight: 500;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        /* Responsive Design */
        @media (max-width: 768px) {
            .converter-app {
                max-width: 95%;
            }
            
            .app-header {
                padding: 20px 15px;
            }
            
            .app-header h1 {
                font-size: 1.8rem;
            }
            
            .app-header p {
                font-size: 0.9rem;
            }
            
            .converter-content {
                padding: 20px;
            }
            
            .upload-area {
                padding: 25px 15px;
            }
            
            .action-buttons {
                flex-direction: column;
            }
            
            .btn {
                width: 100%;
            }
        }

        @media (max-width: 480px) {
            .app-header h1 {
                font-size: 1.6rem;
            }
            
            .thumbnail-container {
                grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
            }
        }

        /* Prevent zooming on input focus on mobile */
        @media screen and (max-width: 768px) {
            input, select, textarea {
                font-size: 16px;
            }
        }
/* Mobile-specific fixes */
@media (max-width: 768px) {
    /* Prevent zooming on input focus */
    input, select, textarea {
        font-size: 16px;
    }
    
    /* Better touch targets for mobile */
    .thumbnail-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    /* More padding for better touch */
    .btn {
        padding: 14px 20px;
    }
    
    /* Fix for file input on Android */
    #file-input {
        position: absolute;
        width: 100%;
        height: 100%;
        opacity: 0;
        top: 0;
        left: 0;
    }
    
    /* Prevent double-tap zoom on buttons */
    button {
        touch-action: manipulation;
    }
}

/* Toast notifications for mobile */
.toast {
    position: fixed;
    bottom: 10px;
    left: 70%;
    transform: translateX(-50%);
    background: var(--dark);
    color: white;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 90%;
    animation: slideUp 0.1s ease-out;
}

.toast i {
    font-size: 1.0rem;
}

.toast-success {
    background: var(--success);
}

.toast-error {
    background: var(--danger);
}

.toast-info {
    background: var(--primary);
}

.toast.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}
/* Watermark animation */
@keyframes fadeWatermark {
  0% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; }
}

/* Blocked page styling */
.body-blocked {
  pointer-events: none;
  user-select: none;
}

.blocked-message {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 20px;
  text-align: center;
}

.blocked-message h1 {
  color: red;
}