/* Enhanced CSS for Ghomashi Dictionary with 4 Language Support */

/* CSS Variables for Warm Color Scheme */
:root {
    --warm-orange: #FF8C42;
    --warm-apricot: #FFB366;
    --warm-yellow: #FFD93D;
    --warm-red: #FF6B6B;
    --warm-peach: #FFAB91;
    --warm-coral: #FF7F7F;
    --warm-gold: #FFD700;
    --warm-salmon: #FFA07A;
    
    /* Gradient backgrounds */
    --gradient-primary: linear-gradient(135deg, var(--warm-orange) 0%, var(--warm-apricot) 50%, var(--warm-peach) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--warm-yellow) 0%, var(--warm-gold) 50%, var(--warm-orange) 100%);
    --gradient-accent: linear-gradient(135deg, var(--warm-red) 0%, var(--warm-coral) 50%, var(--warm-salmon) 100%);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gradient-primary);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* Navigation Styles */
.nav-overlay {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

/* Language Tabs - Updated for 4 buttons */
.language-tab {
    background: rgba(255, 255, 255, 0.9);
    color: #666;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 0.875rem;
    font-weight: 600;
    min-width: 140px;
    text-align: center;
}

.language-tab:hover {
    background: rgba(255, 255, 255, 1);
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.language-tab.active {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.language-tab.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--warm-yellow);
}

/* Responsive language tabs */
@media (max-width: 768px) {
    .language-tab {
        font-size: 0.75rem;
        min-width: 100px;
        padding: 0.5rem 0.25rem;
    }
}

@media (max-width: 640px) {
    .language-tab {
        font-size: 0.7rem;
        min-width: 80px;
        padding: 0.5rem 0.125rem;
    }
}

/* Search Box Styles */
.search-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: all 0.3s ease;
}

.search-box:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

#search-input {
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

#search-input:focus {
    border-color: var(--warm-orange);
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.1);
}

/* Suggestions Dropdown */
#suggestions {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    position: absolute;
    width: 100%;
    top: 100%;
}

.suggestion-item {
    transition: all 0.2s ease;
    cursor: pointer;
}

.suggestion-item:hover,
.suggestion-item.active {
    background: var(--warm-apricot);
    color: white;
}

.suggestion-item strong {
    font-weight: 700;
    color: var(--warm-red);
}

.suggestion-item:hover strong,
.suggestion-item.active strong {
    color: white;
}

/* Slideshow Styles */
.slideshow-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.5s ease;
}

.slide-indicator {
    transition: all 0.3s ease;
    cursor: pointer;
}

.slide-indicator:hover {
    transform: scale(1.2);
}

/* Search Results Styles */
.result-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-secondary);
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 1);
}

/* Translation Text Styles */
.farsi-text {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid var(--warm-orange);
    direction: rtl;
    text-align: right;
    font-family: 'Tahoma', 'Arial Unicode MS', sans-serif;
}

.hindi-text {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid var(--warm-yellow);
    font-family: 'Devanagari Sangam MN', 'Noto Sans Devanagari', sans-serif;
}

.sanskrit-text {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    border-left: 4px solid var(--warm-red);
    font-family: 'Devanagari Sangam MN', 'Noto Sans Devanagari', sans-serif;
}

/* Search Highlighting - Removed blue highlighting */
.search-highlight mark {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-weight: 600;
}

/* Volume Button */
.volume-btn {
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.1);
}

.volume-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: scale(1.1);
}

/* Online Counter */
.online-counter {
    background: var(--gradient-accent);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Welcome Messages Animation */
#welcome-text {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 700;
}

.animate-fade-in-out {
    animation: fadeInOut 3s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.7; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1); }
}

/* Form Styles */
input[type="text"],
input[type="email"],
textarea {
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: var(--warm-orange);
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.1);
}

button[type="submit"] {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

button[type="submit"]:hover::before {
    left: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    #welcome-text {
        font-size: 2rem;
    }
    
    .result-card {
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    .language-tab {
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 640px) {
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
    }
    
    .language-tab {
        padding: 0.75rem 0.5rem;
        font-size: 0.7rem;
        min-width: auto;
    }
    
    #welcome-text {
        font-size: 1.5rem;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.transition-all {
    transition: all 0.3s ease;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--warm-orange);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--warm-red);
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .nav-overlay,
    .online-counter,
    .volume-btn,
    #suggestions {
        display: none;
    }
    
    .result-card {
        background: white;
        border: 1px solid #ccc;
        box-shadow: none;
        page-break-inside: avoid;
    }
}

