:root {
    /* Main colors */
    --primary-color: #4F46E5;    /* Deep indigo */
    --secondary-color: #7C3AED;  /* Vibrant purple */
    --accent-color: #F59E0B;     /* Warm amber */
    
    /* Background colors */
    --background-color: #F8FAFC;  /* Light gray-blue */
    --card-background: #FFFFFF;   /* Pure white */
    
    /* Text colors */
    --text-color: #1E293B;       /* Dark slate */
    --text-light: #94A3B8;       /* Light slate */
    --text-white: #FFFFFF;       /* Pure white */
    
    /* UI colors */
    --border-color: #E2E8F0;     /* Light gray */
    --success-color: #10B981;    /* Emerald green */
    --error-color: #EF4444;      /* Red */
    
    /* Gradient colors */
    --gradient-start: #4F46E5;   /* Deep indigo */
    --gradient-end: #7C3AED;     /* Vibrant purple */

    /* Add this new variable for processing state */
    --processing-color: #F59E0B; /* Warm amber/orange color */

    /* Animation Timings */
    --animation-speed-fast: 0.2s;
    --animation-speed-medium: 0.3s;
    --animation-speed-slow: 0.5s;
  
    /* Effects */
    --hover-transform: translateY(-2px);
    --active-transform: scale(0.98);
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

/* Modern CSS Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    max-width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

h1 {
    text-align: center;
    color: var(--primary-color);
}

.upload-section {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    background-color: var(--secondary-color);
    color: white;
    cursor: pointer;
    transition: opacity 0.2s;
}

button:hover {
    opacity: 0.9;
}

.loading {
    text-align: center;
    padding: 2rem;
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 1rem 0;
    width: 100%;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite, glow 2s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.snippet {
    background: var(--card-background);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    transition: all var(--animation-speed-medium);
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.snippet:hover {
    transform: translateY(-2px);
}

.snippet h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.snippet pre {
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    white-space: pre !important; /* Force preserve whitespace */
    tab-size: 4;
    -moz-tab-size: 4;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
}

.snippet code {
    font-family: inherit;
    white-space: inherit !important;
    padding: 0 !important;
    background: none !important;
    font-size: 14px;
    line-height: 1.5;
    display: block;
}

/* Ensure Prism.js doesn't override our formatting */
pre[class*="language-"],
code[class*="language-"] {
    white-space: pre !important;
    word-spacing: normal;
    tab-size: 4;
    -moz-tab-size: 4;
}

/* Update syntax highlighting styles */
pre[class*="language-"] {
    background: #282c34 !important;
    border-radius: 8px;
    margin: 1.5em 0;
    padding: 1em;
    overflow: auto;
}

code[class*="language-"] {
    font-family: 'Fira Code', 'Consolas', Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre;
    word-spacing: normal;
    word-break: normal;
    word-wrap: normal;
    tab-size: 4;
}

/* Line numbers styling */
.line-numbers .line-numbers-rows {
    border-right: 1px solid #999;
    padding-right: 0.8em;
}

/* Token colors */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #7C7C7C;
}

.token.function {
    color: #61AFEF;
}

.token.keyword {
    color: #C678DD;
}

.token.string {
    color: #98C379;
}

.token.number {
    color: #D19A66;
}

.copy-btn {
    margin-top: 1rem;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex: 1;
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.copied {
    background-color: #27ae60;
}

/* Add ripple effect */
.copy-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform .5s, opacity 1s;
}

.copy-btn:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* Add to existing styles */

.camera-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: black;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.camera-controls {
    position: fixed;
    bottom: 2rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 1rem;
    z-index: 1000;
}

.camera-btn {
    padding: 1rem;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: var(--primary-color);
    font-size: 1.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
}

.camera-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
}

.camera-btn:active {
    transform: scale(0.95);
}

.camera-btn:hover {
    transform: scale(1.1);
}

#cameraVideo {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed from cover to contain */
    background: black;
}

/* Remove or comment out switch-camera-btn styles */
/*
.switch-camera-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 50%;
    cursor: pointer;
}
*/

#captureBtn {
    /* background-color: var(--secondary-color); */
    background: linear-gradient(90deg, #6600cc, #9933ff);;
    color: white;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
}

#captureBtn:hover {
    background-color: #0874c7;
}

.capture-photo-btn {
    background-color: var(--secondary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    margin-top: 1rem;
    z-index: 1000;
}

.preview-container {
    margin: 1rem 0;
    text-align: center;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.captured-image {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 4px;
}

/* Add to existing styles */

.share-section {
    margin-top: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.share-section h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 8px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    background-color: var(--secondary-color);
    color: white;
}

.share-btn:active {
    transform: translateY(0);
}

/* Add platform-specific colors on hover */
.share-btn:nth-child(1):hover { /* WhatsApp */
    background-color: #25D366;
}

.share-btn:nth-child(2):hover { /* Email */
    background-color: #EA4335;
}

.share-btn:nth-child(3):hover { /* Messages */
    background-color: #3478F6;
}

.share-btn:nth-child(4):hover { /* Copy Link */
    background-color: #27ae60;
}

/* Add to existing styles */

/* Update the hero section styles */
.hero-section {
    text-align: center;
    padding: 4rem 1rem;
    background: linear-gradient(135deg, 
        var(--primary-color),
        var(--secondary-color)
    );
    border-radius: 16px;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease;
    min-height: auto; /* Remove fixed height if any */
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Remove the shimmering triangle effect */
.hero-section::before {
    display: none; /* Remove the shimmer overlay */
}

/* Update heading styles to ensure visibility */
.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    animation: slideDown 0.5s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text-white);
    z-index: 2; /* Ensure text stays on top */
}

/* Update the subtitle styles */
.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease 0.3s forwards;
    opacity: 0;
    position: relative;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    color: var(--text-white);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    z-index: 2; /* Ensure text stays on top */
}

/* Update features grid to maintain proper spacing */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
    position: relative;
    z-index: 2;
}

/* Action buttons container */
.action-buttons {
    margin-top: 2rem;
    position: relative;
    z-index: 2;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 1rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
}

/* Update feature cards */
.feature-card {
    background: rgba(255, 255, 255, 0.15);
    padding: 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform-origin: center;
    transition: all var(--animation-speed-medium);
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.2);
    transform: var(--hover-transform);
    box-shadow: var(--hover-shadow);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    animation: floatIcon 3s ease-in-out infinite;
}

/* Update buttons */
.main-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 500;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    transition: all var(--animation-speed-medium);
}

.main-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.main-btn:hover::after {
    left: 100%;
}

.main-btn:hover {
    transform: var(--hover-transform);
    box-shadow: var(--hover-shadow);
}

.main-btn:active {
    transform: var(--active-transform);
}

.upload-btn {
    background: var(--text-white);
    color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.capture-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Navbar Styles */
.navbar {
    background: var(--card-background);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: display 0.3s ease;
    animation: slideDown 0.5s ease;
    backdrop-filter: blur(10px);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    transition: transform var(--animation-speed-medium);
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    animation: bounce 2s infinite;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* How It Works Section */
.how-it-works {
    padding: 4rem 0;
    text-align: center;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.step {
    padding: 2rem;
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-weight: bold;
}

/* Footer */
.footer {
    background: var(--card-background);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.community {
    font-size: 0.9rem;
    color: var(--text-light);
}

.community a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.community a:hover {
    color: var(--secondary-color);
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.footer-links .icon {
    font-size: 1.2rem;
}

/* Add to the existing footer-links styles */
.footer-links .copy-email {
    cursor: pointer;
    transition: all 0.3s ease;
}

.footer-links .copy-email:hover {
    color: var(--primary-color);
}

/* Style for the success state */
.footer-links .copy-email .icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.footer-links .copy-email:active .icon {
    transform: scale(0.9);
}

/* Animations */
@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem;
    }
    
    .footer-links {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .footer-links a {
        padding: 0.5rem;
    }
}

/* Mobile responsiveness improvements */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
        padding: 0 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
}

/* Update the action buttons container */
.action-buttons {
    display: flex;
    gap: 2rem; /* Increased gap between buttons */
    justify-content: center;
    align-items: center;
    margin: 3rem auto; /* Add margin top and bottom */
    flex-wrap: wrap; /* Allow wrapping on small screens */
    max-width: 600px; /* Limit maximum width */
}

/* Update main button styles */
.main-btn {
    display: flex;
    align-items: center;
    justify-content: center; /* Center the icon and text */
    gap: 0.75rem;
    padding: 1.2rem 2.5rem; /* Slightly larger padding */
    font-size: 1.1rem;
    font-weight: 500;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    transition: all var(--animation-speed-medium);
    min-width: 200px; /* Set minimum width for consistency */
}

/* Ensure responsiveness */
@media (max-width: 768px) {
    .action-buttons {
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .main-btn {
        width: 100%; /* Full width on mobile */
        min-width: unset;
        padding: 1rem 2rem;
    }
}

/* Add these new styles for mobile navigation */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    position: relative;
    z-index: 1001;
}

.hamburger {
    width: 24px;
    height: 20px;
    position: relative;
    transition: all 0.3s;
}

.hamburger span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:nth-child(3) { top: 18px; }

/* Active state for hamburger */
.mobile-nav-toggle.active .hamburger span:nth-child(1) {
    transform: rotate(45deg);
    top: 9px;
}

.mobile-nav-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.mobile-nav-toggle.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg);
    top: 9px;
}

/* Update the nav-links styles */
@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
    }

    .nav-links {
        /* display: flex; */
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--card-background);
        padding: 80px 2rem 2rem;
        transition: right 0.3s ease;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        z-index: 1000;
        animation: slideIn 0.3s ease;
    }

    .nav-links.active {
        right: 0;
        display: flex;
    }

    .nav-links a {
        font-size: 1.2rem;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
        text-align: left;
    }

    /* Add overlay when menu is open */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        backdrop-filter: blur(4px);
        z-index: 999;
    }

    .nav-overlay.active {
        display: block;
    }

    @keyframes slideIn {
        from {
            transform: translateX(100%);
        }
        to {
            transform: translateX(0);
        }
    }
}

/* Add dropdown styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.chevron {
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.dropdown.active .chevron {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-background);
    min-width: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.8rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.dropdown-menu a:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: modalFadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--card-background);
    width: 90%;
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 16px;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

/* Mobile styles */
@media (max-width: 768px) {
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
        width: calc(100% - 2rem);
    }
    
    .steps-container, .modal-features {
        gap: 1rem;
    }
}

/* Update capture button style */
.capture-btn {
    background: linear-gradient(90deg, #6366f1, #9933ff) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
}

.capture-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4) !important;
}

/* Add to existing styles */

/* Coming Soon Badge */
.coming-soon {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    background: var(--accent-color);
    color: white;
    border-radius: 12px;
    font-weight: 500;
}

/* Update mobile dropdown styles */
@media (max-width: 768px) {
    .dropdown-menu {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 320px;
        background: var(--card-background);
        border-radius: 16px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.2);
        padding: 1rem;
        z-index: 1002;
    }

    .dropdown-menu a {
        padding: 1rem;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }

    .dropdown-menu a:last-child {
        border-bottom: none;
    }

    /* Add overlay for features popup */
    .features-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        backdrop-filter: blur(4px);
        z-index: 1001;
    }

    .features-overlay.active {
        display: block;
    }
}

/* Update modal styles for better mobile scrolling */
.modal {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-content {
    margin: 2rem auto;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    padding-bottom: 3rem;
}

/* Add padding to last step to ensure visibility */
.steps-container .step:last-child {
    margin-bottom: 2rem;
}

.error-message {
    text-align: center;
    padding: 2rem;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 8px;
    margin: 2rem 0;
    animation: fadeIn 0.3s ease;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.1);
}

.error-message h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Features Grid */
.modal-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-item {
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    background: white;
}

.feature-item .feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--primary-color);
}

.feature-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.feature-item p {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.9;
}

/* Features Modal Container */
.features-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.features-modal.active {
    display: flex;
    opacity: 1;
}

.features-modal .modal-content {
    background: var(--card-background);
    width: 90%;
    max-width: 800px;
    margin: auto;
    padding: 2rem;
    border-radius: 16px;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.features-modal.active .modal-content {
    transform: translateY(0);
}

.features-modal .modal-header {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    flex-direction: row-reverse; /* Reverse the order of elements */
    gap: 1rem; /* Add gap between title and close button */
}

.features-modal .modal-header h2 {
    flex: 1; /* Allow title to take remaining space */
    margin: 0;
    color: var(--primary-color);
    font-size: 1.8rem;
    text-align: center; /* Center the title */
}

.features-modal .modal-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Close button styles */
.features-modal .close-modal {
    position: static;
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--text-color);
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 0.5rem;
    z-index: 1;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: auto; /* Push to the right */
}

.features-modal .close-modal:hover {
    opacity: 1;
}

.features-modal .close-modal:active {
    transform: scale(0.95);
}

/* Scrollbar styles for modal content */
.features-modal .modal-content::-webkit-scrollbar {
    width: 8px;
}

.features-modal .modal-content::-webkit-scrollbar-track {
    background: var(--background-color);
    border-radius: 4px;
}

.features-modal .modal-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .modal-features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-item {
        padding: 1.2rem;
    }
    
    .feature-item .feature-icon {
        font-size: 2rem;
    }
    
    .feature-item h3 {
        font-size: 1.1rem;
    }
    
    .features-modal .modal-content {
        padding: 1.5rem;
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .features-modal .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .features-modal .modal-header p {
        font-size: 1rem;
    }
}

/* Animation keyframes */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply animation to modal content */
.features-modal .modal-content {
    animation: modalSlideIn 0.3s ease forwards;
}

/* Add close button styles for camera */
.camera-close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.camera-close::before {
    content: "×";
    color: white;
    font-size: 36px;
    line-height: 1;
    height: 36px;
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -2px; /* Fine-tune vertical alignment */
}

.camera-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.camera-close:active {
    transform: scale(0.95);
}

/* Add subtle box shadow for depth */
.camera-close {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Add glow effect on hover */
.camera-close:hover {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* Update image preview styles */
.image-preview {
    background: var(--card-background);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 100%;
}

.image-preview h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.25rem;
}

.image-preview .image-container {
    width: 90%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-preview img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 500px;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    object-fit: contain;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

/* Add state-based border colors */
.image-preview.processing img {
    border-color: var(--processing-color); /* Orange border while processing */
}

.image-preview.success img {
    border-color: var(--success-color); /* Green border when code found */
}

.image-preview.error img {
    border-color: var(--error-color); /* Red border when no code found */
}

/* Loading indicator styles */
.loading {
    margin-top: 1rem;
    margin-bottom: 2rem;
    text-align: center;
    padding: 1.5rem;
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.loading .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--processing-color); /* Use orange color for spinner */
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

.loading-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .image-preview {
        padding: 1rem;
    }
    
    .image-preview .image-container {
        width: 95%;
    }
    
    .image-preview img {
        max-height: 400px;
    }
}

/* Update modal header styles */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
    flex-direction: row-reverse; /* Reverse the order of elements */
    gap: 1rem; /* Add gap between title and close button */
}

.modal-header h2 {
    flex: 1; /* Allow title to take remaining space */
    margin: 0;
    color: var(--primary-color);
    font-size: 1.8rem;
    text-align: center; /* Center the title */
}

/* Update close button styles */
.modal .close-modal {
    position: static;
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--text-color);
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 0.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: auto; /* Push to the right */
}

/* Responsive styles */
@media (max-width: 768px) {
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .modal .close-modal {
        font-size: 2rem;
        width: 32px;
        height: 32px;
    }
}

/* Zoom controls */
.zoom-controls {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    padding: 1rem;
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    width: 64px;
    align-items: center;
}

.zoom-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%; /* Perfect circle */
    border: none;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    padding: 0; /* Remove any padding that might affect the circular shape */
    line-height: 0; /* Ensure the + and - are properly centered */
    text-align: center; /* Center text */
    aspect-ratio: 1 / 1; /* Force perfect square (circle when border-radius: 50%) */
}

.zoom-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.zoom-btn:active {
    transform: scale(0.95);
    background: var(--primary-color);
}

.zoom-value {
    color: white;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0;
    min-width: 60px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Mobile responsiveness for zoom controls */
@media (max-width: 768px) {
    .zoom-controls {
        right: 1rem;
        padding: 0.8rem;
        width: 56px;
    }

    .zoom-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        aspect-ratio: 1 / 1; /* Maintain aspect ratio on mobile */
    }
}

/* Drop Zone Styles */
.drop-zone {
    width: 100%;
    max-width: 500px;
    min-height: 200px;
    margin: 2rem auto;
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 2rem;
    text-align: center;
    transition: all var(--animation-speed-medium);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.drop-zone-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: white;
}

.drop-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.drop-zone h3 {
    margin: 0;
    color: white;
    font-size: 1.3rem;
    font-weight: 500;
}

.drop-zone p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.8;
}

.browse-btn {
    background-color: white;
    color: var(--primary-color);
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.browse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.browse-btn:active {
    transform: translateY(0);
}

.file-support {
    font-size: 0.8rem !important;
    opacity: 0.6 !important;
    margin-top: 0.5rem !important;
}

.drop-zone-active {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
    animation: pulse 1s infinite;
}

.file-dropped {
    border-style: solid;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.15);
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
}

.file-icon {
    font-size: 2rem;
}

.file-info {
    flex: 1;
    text-align: left;
}

.file-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.file-size {
    font-size: 0.8rem;
    opacity: 0.8;
}

.remove-file {
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 0.5rem;
}

.remove-file:hover {
    opacity: 1;
}

.upload-progress {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: var(--accent-color);
    transition: width 0.1s ease;
}

/* Mobile responsiveness for drop zone */
@media (max-width: 768px) {
    .drop-zone {
        min-height: 180px;
        margin: 1.5rem auto;
        padding: 1.5rem;
    }
    
    .drop-icon {
        font-size: 2.5rem;
    }
    
    .drop-zone h3 {
        font-size: 1.1rem;
    }
    
    .browse-btn {
        padding: 0.7rem 1.2rem;
    }
    
    .file-preview {
        gap: 0.5rem;
    }
    
    .file-name {
        max-width: 150px;
    }
}

/* Hide upload button when drop zone is active */
.drop-zone + .action-buttons .upload-btn {
    display: none;
}

/* Button container for snippet actions */
.button-container {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Copy button styles */
.copy-btn {
    margin-top: 1rem;
    background: linear-gradient(135deg, #22c55e, #059669);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 1rem;
    flex: 1;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.copy-btn.copied {
    background: linear-gradient(135deg, #16a34a, #047857);
}

/* Explain button styles */
.explain-btn {
    margin-top: 1rem;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 1rem;
    flex: 1;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.explain-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.explain-btn.active {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
}

/* Predict button styles */
.predict-btn {
    margin-top: 1rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 1rem;
    flex: 1;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.predict-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.predict-btn.active {
    background: linear-gradient(135deg, #d97706, #b45309);
}

/* Common button hover and active states */
.copy-btn:active,
.explain-btn:active,
.predict-btn:active {
    transform: scale(0.95);
}

/* Shared ripple effect for all buttons */
.copy-btn::after,
.explain-btn::after,
.predict-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.copy-btn:hover::after,
.explain-btn:hover::after,
.predict-btn:hover::after {
    left: 100%;
}

/* Updated explain button to match copy button dimensions */
.explain-btn {
    margin-top: 1rem;
    background-color: var(--secondary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 1rem;
    flex: 1;
}

.explain-btn:active {
    transform: scale(0.95);
}

/* New active state for when explanation is visible */
.explain-btn.active {
    background-color: var(--accent-color);
}

.explain-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform .5s, opacity 1s;
}

.explain-btn:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* Explanation modal */
.explanation-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.explanation-modal.active {
    opacity: 1;
    pointer-events: all;
}

.explanation-content {
    background-color: var(--card-background);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.explanation-modal.active .explanation-content {
    transform: translateY(0);
}

.explanation-text {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    font-size: 1rem;
    line-height: 1.6;
}

.language-badge {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .button-container {
        flex-direction: column;
        gap: 0.7rem;
    }
    
    .explanation-content {
        padding: 1.5rem;
    }
}

/* Add these new styles for the improved explanation UI */
.explanation-section {
    background-color: var(--background-color);
    border-radius: 12px;
    margin: 1rem 0;
    overflow: hidden;
    transition: all 0.3s ease;
    max-height: 0;
    opacity: 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-left: 4px solid var (--secondary-color);
}

.explanation-section.active {
    max-height: 1000px;
    opacity: 1;
    padding: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.explanation-section.loading {
    max-height: 150px;
    opacity: 1;
    padding: 1.5rem;
}

.explanation-section.closing {
    max-height: 0;
    opacity: 0;
    padding: 0;
    margin: 0;
    border: none;
}

.explanation-section.error {
    border-left-color: var(--error-color);
}

.explanation-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.explanation-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--secondary-color);
    border-radius: 50%;
    margin-bottom: 1rem;
    animation: spin 1s linear infinite;
}

.explanation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.explanation-header h4 {
    margin: 0;
    color: var(--secondary-color);
    font-size: 1.1rem;
    font-weight: 500;
}

.explanation-text {
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 1rem;
    white-space: pre-line;
}

.close-explanation {
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-explanation:hover {
    background-color: var(--border-color);
    color: var (--text-color);
}

.explanation-error {
    padding: 1rem;
    background-color: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    color: var(--error-color);
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
}

/* Make sure explanation works well on mobile */
@media (max-width: 768px) {
    .explanation-section.active {
        padding: 0.8rem;
    }
    
    .explanation-text {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
}

/* Enhanced explanation text formatting */
.explanation-text {
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 1rem;
    white-space: normal;
}

/* Code blocks within explanations */
.explanation-code-block {
    background: #282c34;
    border-radius: 6px;
    margin: 1rem 0;
    overflow-x: auto;
}

.explanation-code-block pre {
    margin: 0;
    padding: 1rem;
}

.explanation-code-block code {
    font-family: 'Fira Code', 'Consolas', Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    color: #e6e6e6;
    font-size: 0.9rem;
    white-space: pre;
    word-wrap: normal;
    tab-size: 4;
}

/* Inline code */
.explanation-inline-code {
    font-family: 'Fira Code', 'Consolas', Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* Lists within explanations */
.explanation-text ul, 
.explanation-text ol {
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.explanation-text li {
    margin-bottom: 0.3rem;
}

/* Strong emphasis */
.explanation-text strong {
    color: var(--secondary-color);
    font-weight: 600;
}

/* Italic text */
.explanation-text em {
    font-style: italic;
    opacity: 0.9;
}

/* Fix for nested elements */
.explanation-text br + ul,
.explanation-text br + ol {
    display: block;
    margin-top: 0.5rem;
}

/* Add CSS for the new paste button */
.paste-btn {
    background: linear-gradient(135deg, #9933ff, #7e81fd);
    border-color: #9933ff;
    position: relative;
    overflow: hidden;
    color: white;
    box-shadow: 0 4px 15px rgba(153, 51, 255, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.paste-btn:hover {
    background: linear-gradient(135deg, #aa66ff, #4d4fea);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(153, 51, 255, 0.6);
}

.paste-btn:active {
    transform: translateY(0);
    background: linear-gradient(135deg, #8800cc, #7700bb);
    box-shadow: 0 4px 10px rgba(153, 51, 255, 0.4);
}

.paste-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.5s;
}

.paste-btn:hover::after {
    left: 100%;
}

.paste-btn .icon {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    }
    to {
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    }
}

/* Custom Alert System */
.custom-alert-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none; /* Let clicks pass through the container */
}

.custom-alert {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 0;
    display: flex;
    overflow: hidden;
    pointer-events: auto; /* Make individual alerts clickable */
    cursor: pointer;
    position: relative;
    animation-duration: 0.5s;
    max-width: calc(100% - 40px);
    margin: 0 20px;
    transform-origin: center top;
}

.custom-alert-content {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.custom-alert-icon {
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-alert-message {
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text-color);
    font-weight: 500;
}

.custom-alert-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.5);
    padding: 0 15px;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.custom-alert-close:hover {
    color: rgba(0, 0, 0, 0.8);
}

/* Alert types */
.custom-alert-error {
    background: linear-gradient(135deg, #fff, #fff8f8);
    border-left: 4px solid #e74c3c;
}

.custom-alert-success {
    background: linear-gradient(135deg, #fff, #f8fff8);
    border-left: 4px solid #27ae60;
}

.custom-alert-warning {
    background: linear-gradient(135deg, #fff, #fffdf8);
    border-left: 4px solid #f39c12;
}

.custom-alert-info {
    background: linear-gradient(135deg, #fff, #f8faff);
    border-left: 4px solid #3498db;
}

/* Add responsive styles for small screens */
@media (max-width: 768px) {
    .custom-alert-container {
        bottom: 20px;
        top: auto;
        max-width: 94%;
    }
    
    .custom-alert {
        margin: 0 auto;
        width: 100%;
    }
    
    .custom-alert-message {
        font-size: 0.9rem;
    }
}

/* Add animation classes if not already imported */
.animate__animated {
    animation-duration: 1s;
    animation-fill-mode: both;
}

.animate__fadeInDown {
    animation-name: fadeInDown;
}

.animate__fadeOutUp {
    animation-name: fadeOutUp;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeOutUp {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: translate3d(0, -20px, 0);
    }
}

/* Contact Modal Styles */
.contact-modal .modal-content {
    max-width: 700px;
}

.contact-step {
    display: none;
}

.contact-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.contact-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: var(--background-color);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.category-btn:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-text {
    font-weight: 500;
    color: var(--text-color);
}

.back-btn {
    background: none;
    color: var(--text-color);
    border: none;
    padding: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.back-btn:hover {
    color: var(--primary-color);
    transform: translateX(-2px);
}

#contactForm {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-color);
}

.form-group input, 
.form-group textarea {
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    transition: all var(--animation-speed-medium);
}

.form-group input:focus, 
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(var(--primary-color), 0.2);
}

.file-upload-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.file-upload-btn {
    position: relative;
    overflow: hidden;
    display: inline-block;
    cursor: pointer;
}

.file-upload-btn span {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: var(--background-color);
    color: var(--text-color);
    border-radius: 8px;
    border: 1px dashed var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-upload-btn:hover span {
    background: var(--border-color);
    border-color: var(--primary-color);
}

.file-upload-btn input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Update file list container styles */
.file-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
    width: 100%;
    padding: 1rem;
    background: var(--background-color);
    border-radius: 8px;
    position: relative;
}

.file-count-badge {
    position: relative;
    width: 100%;
    text-align: center;
    padding: 0.5rem;
    background: var(--background-color);
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-color);
    border-top: 1px solid var(--border-color);
}

.file-item {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: var(--card-background);
    animation: fadeInScale 0.3s ease;
}

.file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.file-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-item .remove-file {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.file-item:hover .remove-file {
    opacity: 1;
}

.submit-btn {
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1rem;
    font-size: 1.1rem;
    background: linear-gradient(
        45deg,
        var(--primary-color),
        var(--secondary-color)
    );
    transition: all var(--animation-speed-medium);
    position: relative;
    overflow: hidden;
}

.submit-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.submit-btn:hover::after {
    left: 100%;
}

.submit-btn:hover {
    transform: var(--hover-transform);
    box-shadow: var(--hover-shadow);
}

.submit-btn:active {
    transform: var(--active-transform);
}

.form-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
}

.form-spinner .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
}

.form-spinner p {
    color: var(--text-color);
    font-weight: 500;
}

.hidden {
    display: none;
}

/* Responsive styles for contact form */
@media (max-width: 768px) {
    .contact-categories {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .category-icon {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }
    
    .category-btn {
        padding: 1.5rem 0.8rem;
    }
    
    .file-list {
        justify-content: center;
    }
}

/* Enhance file preview styles */
.file-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: var(--background-color);
}

.file-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.file-item:hover img {
    transform: scale(1.05);
}

.file-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px;
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.file-item:hover .file-info-overlay {
    opacity: 1;
}

.file-name {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* text-align: center; */
}

.file-count-badge {
    width: 100%;
    text-align: center;
    padding: 0.5rem;
    background: var(--background-color);
    border-radius: 8px;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-color);
}

/* Improve remove button visibility */
.file-item .remove-file {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.file-item:hover .remove-file {
    opacity: 1;
}

.file-item .remove-file:hover {
    transform: scale(1.1);
    background: rgba(220, 38, 38, 0.8);
}

/* Enhanced File Item Styles */
.file-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.file-item:hover {
    transform: translateY(-2px);
}

.file-item .remove-file {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 2;
}

.file-item:hover .remove-file {
    opacity: 1;
}

.file-item .remove-file:hover {
    background: rgba(220, 38, 38, 0.9);
    transform: scale(1.1);
}

.file-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 8px;
    color: white;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.file-item:hover .file-info-overlay {
    opacity: 1;
}

/* New Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes floatIcon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(var(--primary-color), 0.4);
    }
    70% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(var(--primary-color), 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(var(--primary-color), 0);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--primary-color);
    }
    50% {
        box-shadow: 0 0 20px var(--primary-color);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Update mobile navigation styles */
@media (max-width: 768px) {
    /* Navigation Container */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; /* Start fully off-screen */
        width: 80vw; /* Viewport width instead of percentage */
        max-width: 400px;
        height: 100vh;
        background: var(--card-background);
        padding: 80px 2rem 2rem;
        transition: right 0.3s ease;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        overflow-y: auto;
    }

    /* Active state */
    .nav-links.active {
        right: 0;
    }

    /* Navigation Links */
    .nav-links a {
        font-size: 1.1rem;
        padding: 1rem;
        width: 100%;
        border-radius: 8px;
        transition: all 0.2s ease;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    /* Body style when nav is open */
    body.nav-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }

    /* Fix container overflow */
    .container {
        width: 100%;
        overflow-x: hidden;
    }
}

/* Update body style when nav is open */
body.nav-open {
    position: fixed;
    width: 100%;
    overflow: hidden;
    touch-action: none;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

/* Predict button styles */
.predict-btn {
    margin-top: 1rem;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 1rem;
    flex: 1;
}

.predict-btn:active {
    transform: scale(0.95);
}

.predict-btn.active {
    background: linear-gradient(135deg, #1e40af, #3730a3);
}

/* Prediction section styles */
.prediction-section {
    background-color: var(--background-color);
    border-radius: 12px;
    margin: 1rem 0;
    overflow: hidden;
    transition: all 0.3s ease;
    max-height: 0;
    opacity: 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-left: 4px solid #2563eb;
}

.prediction-section.active {
    max-height: 1000px;
    opacity: 1;
    padding: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.prediction-section.loading {
    max-height: 150px;
    opacity: 1;
    padding: 1.5rem;
}

.prediction-output {
    background: #1a1a1a;
    padding: 1rem;
    border-radius: 6px;
    color: #464646;
    font-family: 'Fira Code', monospace;
    white-space: pre-wrap;
    margin: 1rem 0;
    overflow-x: auto;
}

.prediction-note {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
    margin: 0.5rem 0;
}

.close-prediction {
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.close-prediction:hover {
    background-color: var(--border-color);
    color: var(--text-color);
}

.prediction-error {
    padding: 1rem;
    background-color: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.prediction-error ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.prediction-error li {
    margin: 0.25rem 0;
    color: var(--text-light);
}

/* Add new styles for prediction warning state */
.prediction-warning {
    padding: 1.5rem;
    background-color: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.prediction-warning h4 {
    color: var(--accent-color);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.prediction-warning ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
    list-style-type: none;
}

.prediction-warning li {
    margin: 0.5rem 0;
    color: var(--text-color);
    position: relative;
    padding-left: 1.5rem;
}

.prediction-warning li::before {
    content: "•";
    color: var(--accent-color);
    font-size: 1.2rem;
    position: absolute;
    left: 0;
    top: -0.1rem;
}

.prediction-warning .suggestion {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(245, 158, 11, 0.2);
    font-style: italic;
    color: var(--text-light);
}

.prediction-section.warning {
    border-left-color: var(--accent-color);
}

/* Cookie Consent Banner Styles */
.cookie-consent-banner {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    z-index: 9999;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.consent-content, .customize-options {
    padding: 1.5rem;
}

.consent-header h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.consent-header p {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.consent-body p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.consent-body a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.consent-body a:hover {
    color: var(--secondary-color);
}

.consent-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

.consent-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.consent-btn.primary {
    background: var(--primary-color);
    color: white;
}

.consent-btn.primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.consent-btn.secondary {
    background: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.consent-btn.secondary:hover {
    background: var(--border-color);
}

/* Customize cookie options section */
.options-header {
    margin-bottom: 1.5rem;
}

.options-header h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.cookie-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cookie-option {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.8rem;
    background: var(--background-color);
    border-radius: 8px;
    transition: background-color 0.2s;
}

.cookie-option:hover {
    background: var(--border-color);
}

.option-info {
    flex: 1;
}

.option-info h5 {
    margin-bottom: 0.2rem;
    font-size: 1rem;
    color: var(--text-color);
}

.option-info p {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* Toggle switch styles */
.toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    flex-shrink: 0;
}

.toggle input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .3s;
    transition: .3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    -webkit-transition: .3s;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

input:focus + .toggle-slider {
    box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .toggle-slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

input:disabled + .toggle-slider {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .cookie-consent-banner {
        bottom: 20px;
        width: calc(100% - 40px);
    }
    
    .consent-buttons {
        flex-direction: column;
    }
    
    .consent-btn {
        width: 100%;
        text-align: center;
    }
}

/* Cookie Consent Banner Styles - Updated for better adaptivity */
.cookie-consent-banner {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    z-index: 9999;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s ease-in-out;
    opacity: 1;
    visibility: visible;
}

.cookie-consent-banner.animate__fadeOutDown {
    opacity: 0;
    transform: translate(-50%, 100px);
    visibility: hidden;
}

.cookie-consent-banner.animate__fadeInUp {
    animation: consentFadeIn 0.5s forwards;
}

@keyframes consentFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 100px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Enhanced responsive adjustments for mobile */
@media (max-width: 768px) {
    .cookie-consent-banner {
        bottom: 20px;
        width: calc(100% - 40px);
        max-width: none;
    }
    
    .consent-buttons {
        flex-direction: column;
        gap: 0.7rem;
    }
    
    .consent-btn {
        width: 100%;
        text-align: center;
        padding: 0.7rem 1rem;
    }
    
    .consent-content, .customize-options {
        padding: 1.2rem;
    }
    
    .cookie-option {
        padding: 0.7rem;
        gap: 0.7rem;
    }
}

/* Tablet-specific adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .cookie-consent-banner {
        max-width: 600px;
        bottom: 25px;
    }
}

/* Landscape orientation on mobile devices */
@media (max-height: 500px) and (orientation: landscape) {
    .cookie-consent-banner {
        bottom: 15px;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .cookie-options {
        max-height: 30vh;
        overflow-y: auto;
    }
}

/* Large screens */
@media (min-width: 1500px) {
    .cookie-consent-banner {
        max-width: 600px;
    }
}

/* Fix cookie consent banner animations */
.cookie-consent-banner {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    z-index: 9999;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 1;
    visibility: visible;
}

/* Remove the transition property to allow animations to work properly */
.cookie-consent-banner.animate__fadeInUp {
    animation: consentFadeIn 0.5s forwards;
}

.cookie-consent-banner.animate__fadeOutDown {
    animation: consentFadeOut 0.5s forwards;
}

@keyframes consentFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 100px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%);
    }
}

@keyframes consentFadeOut {
    from {
        opacity: 1;
        transform: translateX(-50%);
    }
    to {
        opacity: 0;
        transform: translate(-50%, 100px);
        visibility: hidden;
    }
}