/* Base Theme Variables */
:root {
    /* Dictionary Theme (Orange) */
    --dict-primary-color: #bd3400; /* Darker main orange */
    --dict-primary-light: #ff7d66; /* Darker lighter orange */
    --dict-primary-dark: #A44D00; /* Even darker orange */
    --dict-secondary-color: #FF8F33; /* Darker secondary orange */
    --dict-bg-color: #f9e2e2; /* Keep background color as is */
    --dict-card-bg: rgba(255, 255, 255, 0.9);
    --dict-text-color: #1e293b;
    --dict-text-secondary: #64748b;
    --dict-white: #ffffff;
    --dict-card-bg-dark: rgb(242 186 186);
    --dict-error-color: #ef4444;
    --dict-success-color: #CC5500; /* Changed from green to darker orange */
    --dict-gradient-start: #de6868; /* Darker orange start */
    --dict-gradient-end: rgb(242 186 186); /* Darker orange end */
    --dict-primary-rgb: 204, 85, 0; /* Updated RGB values for darker orange */
    --dict-border-color: #c8bfbf;
    /* Shadows */
    --dict-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --dict-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --dict-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --dict-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius */
    --dict-radius-sm: 0.375rem;
    --dict-radius-md: 0.5rem;
    --dict-radius-lg: 1rem;
    --dict-radius-full: 9999px;

    /* Font Sizes */
    --dict-font-size-xl: clamp(1.5rem, 4vw, 2rem);
    --dict-font-size-lg: clamp(1.25rem, 3vw, 1.5rem);
    --dict-font-size-md: clamp(1rem, 2.5vw, 1.125rem);
    --dict-font-size-sm: clamp(0.875rem, 2vw, 1rem);

    /* Add spacing variables */
    --dict-spacing-xs: 0.25rem;
    --dict-spacing-sm: 0.5rem;
    --dict-spacing-md: 1rem;
    --dict-spacing-lg: 1.5rem;
    --dict-spacing-xl: 2rem;
    --dict-spacing-2xl: 3rem;

    /* Container max-widths */
    --dict-container-sm: 640px;
    --dict-container-md: 768px;
    --dict-container-lg: 1024px;

    /* Refined spacing system */
    --dict-space-2xs: 0.375rem; /* 6px */
    --dict-space-xs: 0.5rem; /* 8px */
    --dict-space-sm: 0.75rem; /* 12px */
    --dict-space-md: 1rem; /* 16px */
    --dict-space-lg: 1.25rem; /* 20px */
    --dict-space-xl: 1.75rem; /* 28px */
    --dict-space-2xl: 2.25rem; /* 36px */
    --dict-space-3xl: 3rem; /* 48px */

    /* QuickVerse Theme (Green) */
    --dict-verse-primary: #064e3b;
    --dict-verse-primary-light: #059669;
    --dict-verse-primary-dark: #064e3b;
    --dict-verse-secondary: #34d399;
    --dict-verse-bg: #f0fdf9;
    --dict-verse-surface: rgba(255, 255, 255, 0.9);
    --dict-verse-gradient-start: #064e3b;
    --dict-verse-gradient-end: #059669;
    --dict-verse-rgb: 6, 78, 59;

    /* Common Colors */
    --dict-text-primary: #1f2937;
    --dict-text-secondary: #64748b;
    --dict-white: #ffffff;
    --dict-error: #ef4444;
    --dict-success: #10b981;

    /* Shadows */
    --dict-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --dict-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --dict-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    /* Spacing */
    --dict-spacing-xs: 0.25rem;
    --dict-spacing-sm: 0.5rem;
    --dict-spacing-md: 1rem;
    --dict-spacing-lg: 1.5rem;
    --dict-spacing-xl: 2rem;

    /* Border Radius */
    --dict-radius-sm: 0.375rem;
    --dict-radius-md: 0.5rem;
    --dict-radius-lg: 1rem;
    --dict-radius-full: 9999px;

    /* Font Sizes */
    --dict-font-size-xs: 0.75rem;
    --dict-font-size-sm: 0.875rem;
    --dict-font-size-base: 1rem;
    --dict-font-size-lg: 1.125rem;
    --dict-font-size-xl: 1.25rem;
    --dict-font-size-2xl: 1.5rem;

    /* Professional color palette */
    --verse-primary-color: #064e3b;
    /* Deep emerald */
    --verse-primary-light: #059669;
    /* Emerald */
    --verse-primary-lighter: #34d399;
    /* Light emerald */
    --verse-primary-dark: #064e3b;
    /* Dark emerald */
    --verse-accent-color: #fbbf24;
    /* Warm amber */
    --verse-background: #f0fdf9;
    /* Light mint */
    --verse-surface: #a3c8ba;
    --verse-text-primary: #1f2937;
    /* Near black */
    --verse-text-secondary: #4b5563;
    /* Dark gray */
    --verse-border-color: #e5e7eb;
    --verse-input-background: #ffffff;
    --verse-input-text: #1f2937;
    --verse-shadow: 0 4px 6px rgba(6, 78, 59, 0.1);
    --verse-card-bg: rgba(255, 255, 255, 0.9);
    --verse-card-shadow: 0 8px 16px rgba(6, 78, 59, 0.08);

    /* RGB values for transparency */
    --verse-background-rgb: 240, 253, 249;
    --verse-primary-rgb: 6, 78, 59;
    --verse-surface-rgb: 255, 255, 255;

    /* Skeleton Loading Styles */
    --verse-skeleton-color: rgba(0, 0, 0, 0.1);

    /* Only Noto Sans fonts, no system fonts */
    --verse-font-base: 'Noto Sans', 'Noto Sans Kannada', 'Noto Sans Telugu';
    --verse-font-kannada: 'Noto Sans Kannada', sans-serif;
    --verse-font-telugu: 'Noto Sans Telugu', sans-serif;
}


[data-theme="dark"] {
    --dict-primary-color: #a75846; /* Darker */
    --dict-primary-light: #ffa880; /* Darker */
    --dict-primary-dark: #CC5500; /* Darker */
    --dict-secondary-color: #FFB380; /* Darker */
    --dict-bg-color: #210703; /* Keep dark mode background */
    --dict-card-bg: rgba(59, 47, 30, 0.4);
    --dict-card-bg-dark: rgb(64, 25, 8);
    --dict-text-color: #f8fafc;
    --dict-text-secondary: #cbd5e1;
    --dict-gradient-start: rgb(64, 25, 8); /* Darker */
    --dict-gradient-end: #a75846; /* Darker */
    --dict-border-color: #706868;
    --verse-primary-color: #059669;

    /* Emerald */
    --verse-primary-light: #34d399;
    /* Light emerald */
    --verse-primary-lighter: #6ee7b7;
    /* Lighter emerald */
    --verse-primary-dark: #064e3b;
    /* Dark emerald */
    --verse-accent-color: #fbbf24;
    /* Warm amber */
    --verse-background: #042f2e;
    /* Deep teal */
    --verse-surface: #134e4a;
    /* Dark teal */
    --verse-text-primary: #f0fdfa;
    /* Off white */
    --verse-text-secondary: #99f6e4;
    /* Light teal */
    --verse-border-color: #115e59;
    /* Teal border */
    --verse-input-background: #134e4a;
    /* Dark teal */
    --verse-input-text: #f0fdfa;
    --verse-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --verse-card-bg: rgba(6, 95, 70, 0.7);
    --verse-card-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);

    /* RGB values for dark theme */
    --verse-background-rgb: 4, 47, 46;
    --verse-primary-rgb: 5, 150, 105;
    --verse-surface-rgb: 19, 78, 74;

    /* Skeleton Loading Styles */
    --verse-skeleton-color: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dict-bg-color);
    color: var(--dict-text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;

   
}




.app-section {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.app-section.active {
    display: block;
    opacity: 1;
}

/* Base mobile styles - Add these at the top of the file */
@media (max-width: 768px) {
    .header-logo {
        max-height: 40px !important; /* Force logo size on mobile */
        width: auto;
    }

    .header {
        padding: 0.5rem !important;
        height: auto !important;
    }

    .bottom-nav {
        padding: 0.5rem !important;
        height: 60px !important;
    }

    .nav-item {
        font-size: 0.9rem !important;
    }

    .nav-item .material-icons {
        font-size: 1.25rem !important;
    }
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 0.5rem;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Dictionary section background */
body[data-active-section="dictionary"] .bottom-nav {
    background: var(--dict-card-bg-dark);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] body[data-active-section="dictionary"] .bottom-nav {
    background: var(--dict-card-bg-dark, #280b00) !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

/* QuickVerse section background */
body[data-active-section="verse"] .bottom-nav {
    background: var(--verse-surface, #f0fdf9);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] body[data-active-section="verse"] .bottom-nav {
    background: var(--verse-surface, #042f2e) !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

/* Nav Items */
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
    background: transparent !important;
}

/* Dictionary specific */
.nav-item.dict {
    color: var(--dict-text-color);
}

.nav-item.dict:hover {
    background: rgba(var(--dict-primary-rgb), 0.08) !important;
    color: var(--dict-primary-color);
}

.nav-item.dict.active {
    background: var(--dict-bg-color) !important;
    color: var(--dict-primary-color);
}

/* QuickVerse specific */
.nav-item.verse {
    color: var(--verse-text-primary);
}

.nav-item.verse:hover {
    background: rgba(var(--verse-primary-rgb), 0.08) !important;
    color: var(--verse-primary-color);
}

.nav-item.verse.active {
    background: var(--verse-background) !important;
    color: var(--verse-primary-color);
}

/* Material Icons in nav */
.nav-item .material-icons {
    font-size: 1.3rem;
}

/* Dark theme adjustments */
[data-theme="dark"] .nav-item.dict {
    color: var(--dict-text-color);
}

[data-theme="dark"] .nav-item.dict:hover {
    background: rgba(255, 163, 102, 0.15);
    color: var(--dict-primary-color);
}

[data-theme="dark"] .nav-item.dict.active {
    background: rgba(255, 163, 102, 0.2);
    color: var(--dict-primary-color);
}

[data-theme="dark"] .nav-item.verse {
    color: var(--verse-text-primary);
}

[data-theme="dark"] .nav-item.verse:hover {
    background: rgba(5, 150, 105, 0.15);
    color: var(--verse-primary-lighter);
}

[data-theme="dark"] .nav-item.verse.active {
    background: rgba(5, 150, 105, 0.2);
    color: var(--verse-primary-lighter);
}

/* Google Sign In Button */
.google-sign-in {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.25rem;
    background: white;
    border: 1px solid #dadce0;
    border-radius: 8px;
    color: #3c4043;
    font-family: 'Google Sans', Roboto, Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.google-sign-in:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.12);
}

.google-sign-in img {
    width: 18px;
    height: 18px;
}

/* Dark theme Google button */
[data-theme="dark"] .google-sign-in {
    background: #303134;
    border-color: #5f6368;
    color: #e8eaed;
}

[data-theme="dark"] .google-sign-in:hover {
    background: #353639;
    box-shadow: 0 2px 4px rgba(0,0,0,0.24);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .bottom-nav {
        height: 60px;
        padding: 0.4rem;
        gap: 0.5rem;
    }

    .nav-item {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .nav-item .material-icons {
        font-size: 1.2rem;
    }

    .google-sign-in {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    justify-content: center;
    align-items: center;
    padding: var(--dict-spacing-xl);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--dict-dict-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.welcome-section {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 1;
    transition: all 0.5s ease;
}
.welcome-section-verse {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 1;
    transition: all 0.5s ease;
}

.welcome-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg,
            var(--dict-primary-color),
            var(--dict-primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.welcome-title-verse {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg,
            var(--verse-primary-color),
            var(--verse-primary-light));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
    }
    .welcome-subtitle {
        font-size: 1.2rem;
            margin-top: 0.5rem;
    }
    .welcome-subtitle-verse {
        font-size: 1.2rem;
            margin-top: 0.5rem;
    }

@media (max-width: 768px) {
    .welcome-title {
        font-size: 2rem;
    }
    .welcome-title-verse {
        font-size: 2rem;
    }

    .welcome-subtitle {
        font-size: 1rem;
    }
    .welcome-subtitle-verse {
        font-size: 1rem;
    }

    .search-section.fixed {
        top: 50px;
    }
}



.search-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.search-input {
    padding: 0.75rem;
    border: 2px solid var(--dict-primary-color);
    border-radius: var(--dict-radius-md);
    font-size: 1rem;
    color: var(--dict-text-color);
    width: 70%; /* Adjust width as needed */
    transition: border-color 0.3s;
    background-color:var(--dict-card-bg);
}
.search-input-verse {
    padding: 0.75rem;
    border: 2px solid var(--verse-primary-color);
    border-radius: var(--dict-radius-md);
    font-size: 1rem;
    width: 70%; /* Adjust width as needed */
    transition: border-color 0.3s;
    background-color:var(--dict-card-bg);}
.search-input-verse:focus {
    border-color: #33ff66; /* Change border color on focus */
    outline: none;
}
.search-input:focus {
    border-color: #FF8F33; /* Change border color on focus */
    outline: none;
}

.search-button {
    background: var(--dict-primary-color);
    color: white;
    border: none;
    border-radius: var(--dict-radius-md);
    padding: 0.75rem 1rem;
    margin-left: 0.5rem;
    cursor: pointer;
    transition: background 0.3s;
}
.search-button-verse {
    background: var(--verse-primary-color);
    color: white;
    border: none;
    border-radius: var(--dict-radius-md);
    padding: 0.75rem 1rem;
    margin-left: 0.5rem;
    cursor: pointer;
    transition: background 0.3s;
}


/* Update header z-index */
.header {
    /* ... existing styles ... */
    z-index: 99; /* Between search and dropdown */
}

/* Update dropdown z-index */
.dropdown-menu {
    /* ... existing styles ... */
    z-index: 100; /* Above everything */
}

.theme-toggle-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dict-text-color);
    transition: background-color 0.2s ease;
}

.theme-toggle-button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.theme-toggle-button .material-icons {
    font-size: 24px;
}

.floating-theme-toggle {
    position: fixed;
    bottom: 5rem;
    left: 1rem;
    background: var(--dict-card-bg);
    border: none;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dict-text-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    z-index: 99;
}

.floating-theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.floating-theme-toggle .material-icons {
    font-size: 24px;
}

[data-theme="dark"]  [data-active-section="dictionary"] .floating-theme-toggle {
    background: var(--dict-card-bg-dark);
    color: var(--dict-white);
}
[data-theme="dark"]  [data-active-section="verse"] .floating-theme-toggle {
    background: var(--verse-surface);
    color: var(--verse-white);
}

/* ========================================
   SOPHISTICATED LOGO COLOR SYSTEM
   ======================================== */

/* Base Logo Transitions */
.header-logo .cls-1,
.header-logo .cls-2 {
    transition: fill 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   DICTIONARY SECTION - WARM HARMONY
   ======================================== */

/* Dictionary Light Theme - Warm Copper & Coral */
body[data-active-section="dictionary"] .header-logo .cls-1 {
    fill: #B45309; /* Rich copper that complements orange beautifully */
}

body[data-active-section="dictionary"] .header-logo .cls-2 {
    fill: #DC2626; /* Deep coral-red, harmonizes with dict orange theme */
}

/* Dictionary Dark Theme - Glowing Warmth */
[data-theme="dark"] body[data-active-section="dictionary"] .header-logo .cls-1 {
    fill: #F59E0B; /* Warm amber that glows in dark mode */
}

[data-theme="dark"] body[data-active-section="dictionary"] .header-logo .cls-2 {
    fill: #F97316; /* Bright orange that pops in dark theme */
}

/* ========================================
   QUICKVERSE SECTION - COOL SERENITY
   ======================================== */

/* QuickVerse Light Theme - Ocean Depths */
body[data-active-section="verse"] .header-logo .cls-1 {
    fill: #0F766E; /* Deep teal that matches verse sophistication */
}

body[data-active-section="verse"] .header-logo .cls-2 {
    fill: #047857; /* Forest green, perfectly aligned with verse palette */
}

/* QuickVerse Dark Theme - Luminous Waters */
[data-theme="dark"] body[data-active-section="verse"] .header-logo .cls-1 {
    fill: #14B8A6; /* Bright teal for dark theme visibility */
}

[data-theme="dark"] body[data-active-section="verse"] .header-logo .cls-2 {
    fill: #10B981; /* Emerald green that shines in dark mode */
}

/* ========================================
   ENHANCED VISUAL EFFECTS
   ======================================== */

/* Subtle shadow enhancement for better logo definition */
.header-logo {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    transition: filter 0.3s ease;
}

/* Hover effect for interactive feedback */
.header-logo:hover {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
    transform: scale(1.02);
}

/* Logo brightness adjustment for dark themes */
[data-theme="dark"] .header-logo {
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3)) brightness(1.1);
}

[data-theme="dark"] .header-logo:hover {
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4)) brightness(1.15);
}

/* ========================================
   RESPONSIVE ADAPTATIONS
   ======================================== */

@media (max-width: 768px) {
    .header-logo {
        transition: all 0.3s ease;
    }
    
    .header-logo:hover {
        transform: scale(1.01); /* Reduced scale on mobile */
    }
}

/* ========================================
   ACCESSIBILITY & REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .header-logo .cls-1,
    .header-logo .cls-2,
    .header-logo {
        transition: none;
    }
    
    .header-logo:hover {
        transform: none;
    }
}
