:root {
    --bg: #0a0a0a;
    --card: #141414;
    --primary: #3b82f6;
    --text: #ededed;
    --text-muted: #a1a1aa;
    --border: #27272a;
    --toggle-bg: #1e1e1e;
    --toggle-active: #3b82f6;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* 1. The Global Lock */
html, body {
    max-width: 100%;
    overflow-x: hidden; /* Prevents horizontal swiping */
    position: relative;
}

/* 2. The Box Sizing Fix */
/* This ensures padding doesn't add to the width of elements */
*, *::before, *::after {
    box-sizing: border-box;
}

/* 3. The Navbar Check */
nav {
    width: 100%; /* Use 100%, never 100vw */
    left: 0;
    right: 0;
}

/* --- Navbar --- */
/* --- Navbar --- */
nav {
    width: 100%;
    height: 70px; 
    padding: 0 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    will-change: transform; 
}

.logo {
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.5px;
    color: var(--primary);
    text-decoration: none;
    transition: transform 0.2s ease;
    white-space: nowrap;
}

.batch-status {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 12px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    white-space: nowrap;
    transition: all 0.2s ease;
}

/* Tablets and below */
@media (max-width: 768px) {
    nav { padding: 0.9rem 1.5rem; }
    .logo { font-size: 1.2rem; }
}

/* The "Sweet Spot" (Where it usually breaks) */
@media (max-width: 400px) {
    nav {
        flex-direction: row; /* Stay side-by-side */
        padding: 0.8rem 1rem;
        gap: 8px;
    }
    .logo { font-size: 1.05rem; }
    .batch-status { 
        font-size: 0.75rem; 
        padding: 4px 8px;
    }
}

/* Tiny Mobiles (The Wrap Fallback) */
@media (max-width: 350px) {
    nav {
        flex-wrap: wrap; /* Now we wrap only when extremely cramped */
        justify-content: center;
        padding: 0.7rem;
    }
    .logo { 
        flex: 0 0 100%; 
        text-align: center; 
        margin-bottom: 6px;
        font-size: 1.1rem; /* Make it slightly bigger again since it has its own line */
    }
    .batch-status {
        width: auto; /* Don't force full width, keep it a nice pill shape */
    }
}

/* --- Main Tool Area --- */
main {
    max-width: 900px;
    width: 100%;
    padding: 2rem 1rem;
    text-align: center;
}

h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
p.subtitle { color: var(--text-muted); margin-bottom: 1.5rem; }

/* --- Toggle Switch --- */
.mode-toggle-container {
    margin: 2rem 0 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mode-toggle {
    display: flex;
    background: var(--toggle-bg);
    border-radius: 12px;
    padding: 6px;
    position: relative;
    border: 1px solid var(--border);
}

.toggle-option {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
    position: relative;
    white-space: nowrap;
}

.toggle-slider {
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(50% - 6px);
    height: calc(100% - 12px);
    background: var(--toggle-active);
    border-radius: 8px;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.toggle-option.active {
    color: white;
}

.toggle-option.inactive {
    color: var(--text-muted);
}

/* --- Dropzone --- */
.dropzone {
    background: var(--card);
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 4rem 2rem;
    transition: border-color 0.3s ease, background 0.3s ease; /* Optimized transition */
    cursor: pointer;
    position: relative;
    margin-bottom: 2rem;
    min-height: 200px; 
    contain: layout style; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.dropzone:hover {
    border-color: var(--primary);
    background: #1a1a1a;
}

.badge-10k {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #0a1929;
    color: #90cdf4; 
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    border: 1px solid var(--primary);
}

/* --- Manual Input Area --- */
.manual-input-area {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    display: none;
}

.manual-input-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.width-input-container {
    margin-bottom: 2rem;
    text-align: left;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.width-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.width-input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 12px;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    text-align: center;
    outline: none;
}

.width-input:focus {
    border-color: var(--primary);
}

.rgb-data-container {
    text-align: left;
}

.rgb-data-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.rgb-data-box {
    width: 100%;
    min-height: 200px;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: 12px;
    color: var(--text);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    white-space: pre;
    overflow-x: auto;
}

.rgb-data-box:focus {
    border-color: var(--primary);
}

.rgb-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 8px;
    font-style: italic;
}

/* --- Settings Grid --- */
.controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

input, select {
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    padding: 12px;
    border-radius: 8px;
    color: white;
    outline: none;
}

.btn-convert {
    grid-column: 1 / -1;
    background: #1e40af;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: background 0.3s ease;
}

.btn-convert:hover {
    background: #1e3a8a;
}

.btn-download {
    display: none;
    grid-column: 1 / -1;
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: background 0.3s ease;
}

.btn-download:hover {
    background: #2563eb;
}

/* --- SEO Matrix Footer --- */
.footer-matrix {
    margin-top: 6rem;
    width: 100%;
    border-top: 1px solid var(--border);
    padding: 4rem 2rem;
    background: #050505;
}

.matrix-grid {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    /* Perfect 3-column on desktop, 2-column on tablet, 1-column on mobile */
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem 2rem;
}

.matrix-column h4 { 
    color: var(--text-muted); 
    font-size: 0.85rem; 
    text-transform: uppercase; 
    margin-bottom: 1.2rem;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.matrix-column a { 
    display: block; 
    color: var(--text); 
    text-decoration: none; 
    padding: 6px 0;
    margin-bottom: 4px; 
    font-size: 0.9rem; 
    transition: all 0.2s ease;
    opacity: 0.8;
}

.matrix-column a:hover { 
    color: var(--primary);
    opacity: 1;
    transform: translateX(5px);
}

.matrix-column {
    text-align: center;
}

.matrix-column a.active {
    color: #FF8C00; /* Forces the orange color */
    opacity: 1;
    transform: none;
}

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .matrix-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem 2rem;
    }
    
    .matrix-column {
        text-align: center;
    }
}

/* Mobile (480px - 767px) */
@media (max-width: 767px) {
    .matrix-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .matrix-column {
        text-align: center;
        padding: 0 1rem;
    }
    
    .matrix-column h4 {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .matrix-column a {
        font-size: 0.95rem;
        padding: 8px 0;
    }
}

/* Small Mobile (< 480px) */
@media (max-width: 480px) {
    .footer-matrix {
        padding: 3rem 1rem;
    }
    
    .matrix-grid {
        gap: 2rem;
    }
}

/* ===== FILE PREVIEW STYLES ===== */
.preview-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 2rem;
    content-visibility: auto;
    contain-intrinsic-size: 0 300px; 
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translate3d(0, -10px, 0); /* Forces GPU acceleration */
    }
    to { 
        opacity: 1; 
        transform: translate3d(0, 0, 0); 
    }
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.preview-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text);
}

.file-count {
    color: var(--primary);
    font-weight: normal;
}

.clear-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid #ef4444;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-btn:hover {
    background: #ef4444;
    color: white;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.preview-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    position: relative;
    transition: all 0.2s ease;
}

.preview-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.preview-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
    background: linear-gradient(45deg, #1a1a1a, #2a2a2a);
}

.preview-info {
    text-align: left;
}

.file-name {
    font-size: 0.8rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.file-size {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.remove-file {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

.remove-file:hover {
    background: #ef4444;
}

/* Empty state */
.empty-preview {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.empty-preview i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

/* Progress bar */
.progress-container {
    margin-top: 10px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
}

/* Add these to your existing styles.css */

/* Dropzone States */
.dropzone.active-dropzone {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

.dropzone-text.has-files {
    color: var(--primary);
}


/* Quality Toggle Styles */
.quality-toggle-container {
    margin: 2rem auto 3rem;
    max-width: 500px;
    padding: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.quality-toggle-title {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
}

.quality-toggle-description {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.quality-toggle {
    display: flex;
    background: var(--toggle-bg);
    border-radius: 12px;
    padding: 6px;
    position: relative;
    border: 1px solid var(--border);
}

.quality-option {
    flex: 1;
    padding: 14px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
    position: relative;
    text-align: center;
    font-size: 0.95rem;
}

.quality-slider {
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(50% - 6px);
    height: calc(100% - 12px);
    background: var(--toggle-active);
    border-radius: 8px;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.quality-option.active {
    color: white;
}

.quality-option.inactive {
    color: var(--text-muted);
}

.quality-option:hover:not(.active) {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.quality-details {
    margin-top: 1.5rem;
    padding: 15px;
    background: var(--bg);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.quality-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.quality-detail-item:last-child {
    border-bottom: none;
}

.quality-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.quality-value {
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
}

.quality-value.best {
    color: #10b981;
}

.quality-value.good {
    color: #3b82f6;
}

.quality-tip {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
}

/* Responsive adjustments for quality toggle */
@media (max-width: 768px) {
    .quality-toggle-container {
        margin: 1.5rem auto 2rem;
        padding: 15px;
    }
    
    .quality-option {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .quality-details {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .quality-option {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}

/* Preview Card States */
.preview-card.processing {
    border-color: #f59e0b;
}

.preview-card.completed {
    border-color: #10b981;
}

.preview-card.failed {
    border-color: #ef4444;
}

.preview-card.processing .convert-single-btn {
    background: #f59e0b;
    cursor: not-allowed;
}

.preview-card.completed .convert-single-btn {
    background: #10b981;
}

.preview-card.failed .convert-single-btn {
    background: #ef4444;
    cursor: not-allowed;
}

/* Empty Preview */
.empty-preview {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.empty-preview-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* Progress Modal */
.progress-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.progress-modal.active {
    display: flex;
}

.modal-content {
    background: var(--card);
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    color: var(--text);
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: var(--border);
    border-radius: 6px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    border-radius: 6px;
    transition: width 0.3s ease;
}

.progress-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.detail-item {
    background: var(--bg);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.detail-item span:first-child {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.detail-item span:last-child {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text);
}

.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 2rem;
}

.btn-cancel {
    flex: 1;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid #ef4444;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel:hover {
    background: #ef4444;
    color: white;
}

.btn-download {
    flex: 1;
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-download:hover {
    background: #2563eb;
}

.btn-download.hidden {
    display: none;
}

/* Alert System */
.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
}

.alert {
    padding: 16px 20px;
    border-radius: 12px;
    color: white;
    animation: alertSlideIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.alert.slide-out {
    animation: alertSlideOut 0.3s ease forwards;
}

.alert-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-left: 4px solid #b91c1c;
}

.alert-success {
    background: linear-gradient(135deg, #10b981, #059669);
    border-left: 4px solid #047857;
}

.alert-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-left: 4px solid #b45309;
}

.alert-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-left: 4px solid #1d4ed8;
}

.alert-title {
    font-weight: bold;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-message {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.4;
}

@keyframes alertSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes alertSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Convert Single Button */
.convert-single-btn {
    width: 100%;
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.convert-single-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.convert-single-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

/* File Preview Enhancements */
.preview-section {
    display: none;
}

.preview-section.visible {
    display: block;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.preview-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.preview-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Button States */
.btn-convert:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-convert.processing {
    background: #f59e0b;
    position: relative;
    overflow: hidden;
}

.btn-convert.processing::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% {
        left: 100%;
    }
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    .progress-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .alert-container {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .modal-buttons {
        flex-direction: column;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .preview-section {
        padding: 16px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .matrix-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .dropzone, .manual-input-area {
        padding: 3rem 1.5rem;
    }
}

/* Settings Collapse Toggle */
.settings-collapse-btn {
    display: block;
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-collapse-btn:hover {
    background: var(--primary);
    color: white;
}

/* Rotation when settings are open */
.settings-collapse-btn.rotated {
    transform: rotate(90deg);
    background: var(--primary) !important;
    color: white !important;
    border-radius: 4px; /* Becomes more square when active */
    border-color: var(--primary) !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

/* Add !important to override existing styles */
.quality-toggle-container.collapsed {
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    border: none !important;
    pointer-events: none !important;
}

/* When expanded */
.quality-toggle-container:not(.collapsed) {
    max-height: 1000px !important;
    opacity: 1 !important;
    pointer-events: all !important;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin: 2rem auto 3rem !important; /* Restore original margin */
    padding: 20px !important; /* Restore original padding */
    background: var(--card) !important; /* Restore background */
    border: 1px solid var(--border) !important; /* Restore border */
    border-radius: 16px !important; /* Restore border radius */
}


#qualityToggleContainer {
    transition: all 0.3s ease; /* Smooth transition for color and height */
    border: 1px solid transparent; /* Prepare for the border glow */
    border-radius: 12px;
    padding: 10px;
}

/* SEO CONTENT SECTION */
.seo-content-section {
    max-width: 1000px;
    margin: 50px auto;
    padding: 40px;
    background: linear-gradient(135deg, #0a1929 0%, #0c1e32 100%);
    border-radius: 16px;
    border: 1px solid #1a365d;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: #e2e8f0;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.seo-main-heading {
    color: #4fd1c5;
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #2d3748;
    text-shadow: 0 0 10px rgba(79, 209, 197, 0.3);
    letter-spacing: 0.5px;
}

.emoji {
    color: #ffffff;
}

/* CARDS */
.seo-card {
    margin-bottom: 40px;
    padding: 25px;
    background: rgba(26, 54, 93, 0.5);
    border-radius: 12px;
}

.seo-what-is {
    border-left: 4px solid #4fd1c5;
}

.seo-how-to {
    border-left: 4px solid #4299e1;
}

/* HEADINGS */
.seo-subheading {
    color: #90cdf4;
    font-size: 1.5rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.seo-subheading.center {
    text-align: center;
}

.arrow, .icon {
    color: #4fd1c5;
    margin-right: 10px;
}

/* TEXT */
.seo-paragraph {
    line-height: 1.7;
    font-size: 1.05rem;
}

.highlight {
    color: #4fd1c5;
    font-weight: 500;
}

/* FEATURES GRID */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-card {
    background: rgba(45, 55, 72, 0.7);
    padding: 20px;
    border-radius: 10px;
    border-top: 3px solid #4fd1c5;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.feature-card-blue {
    border-top-color: #4299e1;
}

.feature-card-green {
    border-top-color: #68d391;
}

.feature-title {
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.feature-desc {
    color: #cbd5e0;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* STEPS */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.step-number {
    background: #4fd1c5;
    color: #0a1929;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.step-number-blue {
    background: #4299e1;
}

.step-number-green {
    background: #68d391;
}

.step-title {
    color: #ffffff;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.step-desc {
    color: #cbd5e0;
    font-size: 0.95rem;
}

/* FAQ */
.faq-container {
    background: rgba(26, 54, 93, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
}

.faq-item {
    padding: 20px;
    border-bottom: 1px solid #2d3748;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    color: #ffffff;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.faq-answer {
    color: #cbd5e0;
    line-height: 1.6;
}

.text-link {
    color: #4fd1c5;
    text-decoration: none;
    transition: opacity 0.3s;
}

.text-link:hover {
    opacity: 0.8;
}

/* CTA */
.seo-cta {
    text-align: center;
    padding: 30px;
    background: linear-gradient(90deg, #0a1929 0%, #1a365d 100%);
    border-radius: 12px;
    margin-top: 40px;
    border: 1px solid #2d3748;
}

.cta-title {
    color: #ffffff;
    font-size: 1.6rem;
    margin-bottom: 15px;
}

.cta-desc {
    color: #cbd5e0;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(90deg, #4fd1c5 0%, #38b2ac 100%);
    color: #0a1929;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(79, 209, 197, 0.4);
}

/* FOOTER */
.seo-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #2d3748;
    color: #718096;
    font-size: 0.9rem;
}

.footer-links {
    margin-top: 5px;
}

.footer-link {
    color: #4fd1c5;
    text-decoration: none;
    margin: 0 5px;
}

.footer-link:hover {
    text-decoration: underline;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .seo-content-section {
        padding: 25px 20px;
        margin: 30px 15px;
    }
    
    .seo-main-heading {
        font-size: 1.8rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .seo-subheading {
        font-size: 1.3rem;
    }
}

/* USE CASES */
.use-cases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.use-case {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: rgba(45, 55, 72, 0.4);
    border-radius: 8px;
    transition: background 0.3s;
}

.use-case:hover {
    background: rgba(45, 55, 72, 0.7);
}

.use-case-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.use-case-title {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 5px;
}

.use-case-desc {
    color: #cbd5e0;
    font-size: 0.85rem;
    line-height: 1.5;
}