/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Theme Colors */
    --primary-color: #2563eb;
    --secondary-color: #3b82f6;
    --accent-color: #1d4ed8;
    --background-gradient: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #bae6fd 100%);
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.3);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --shadow-light: rgba(59, 130, 246, 0.1);
    --shadow-medium: rgba(59, 130, 246, 0.2);
    --shadow-heavy: rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --background-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    --glass-bg: rgba(15, 23, 42, 0.4);
    --glass-border: rgba(148, 163, 184, 0.2);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --shadow-light: rgba(0, 0, 0, 0.2);
    --shadow-medium: rgba(0, 0, 0, 0.3);
    --shadow-heavy: rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--background-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* Glass Effect Utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px var(--shadow-light);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 12px 40px var(--shadow-medium), 0 4px 16px var(--shadow-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px var(--shadow-heavy), 0 8px 24px var(--shadow-medium);
    border-color: var(--primary-color);
}

.card-header {
    margin-bottom: 2rem;
    text-align: center;
}

.card-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    font-weight: 400;
}

/* Header Styles */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    border-radius: 0 0 20px 20px;
    box-shadow: 0 8px 32px var(--shadow-light);
}

.navbar {
    padding: 1rem 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 0;
    flex-shrink: 0;
}

.logo i {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-right: 2rem;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    background: var(--glass-bg);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

.language-switcher {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.lang-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    min-width: 0;
    white-space: nowrap;
}

.lang-btn:hover,
.lang-btn.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.theme-toggle button {
    padding: 0.6rem;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.theme-toggle button:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(180deg);
}

.mobile-menu-toggle {
    display: none;
}

.mobile-menu-btn {
    padding: 0.6rem;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mobile-menu-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

/* Main Content */
.main-content {
    margin-top: 100px;
    padding-bottom: 2rem;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 4rem 2rem;
    margin-bottom: 3rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s both;
}

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

/* Location Section */
.location-section {
    margin-bottom: 3rem;
}

.location-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.map-card h3,
.city-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

/* Map Styles */
#map {
    height: 450px;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.coordinates-panel {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.coordinates-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.coordinate-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.coordinate-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.coordinate-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.coordinate-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.coordinate-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.coordinate-value {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Ensure coordinate values are visible on initial load */
.coordinate-value {
    color: #1e293b !important; /* Default to dark text for light theme */
}

.coordinate-label {
    color: rgba(30, 41, 59, 0.7) !important; /* Default to dark text for light theme */
}

/* Light theme coordinate values */
[data-theme="light"] .coordinate-value {
    color: #1e293b !important;
}

[data-theme="light"] .coordinate-label {
    color: rgba(30, 41, 59, 0.7) !important;
}

/* Dark theme coordinate values */
[data-theme="dark"] .coordinate-value {
    color: #f1f5f9 !important;
}

[data-theme="dark"] .coordinate-label {
    color: rgba(255, 255, 255, 0.7) !important;
}

.btn-map {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-map:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.4);
}

.btn-map:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* City Selection */
.city-selection {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.select-wrapper i {
    position: absolute;
    left: 1rem;
    color: var(--primary-color);
    font-size: 1.1rem;
    z-index: 2;
    pointer-events: none;
}

.select-wrapper select {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    appearance: none;
    cursor: pointer;
}

.select-wrapper select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.select-wrapper select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 1rem;
    color: var(--primary-color);
    pointer-events: none;
    font-size: 0.8rem;
}

.btn-city {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-city:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(52, 152, 219, 0.4);
}

.btn-city:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--shadow-medium);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Prayer Times Section */
.prayer-times-section {
    margin-bottom: 3rem;
}

.prayer-card h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--primary-color);
}

.date-display {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Local Time Box */
.local-time-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    margin: 1.5rem 0;
    backdrop-filter: blur(15px);
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.local-time-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 16px 16px 0 0;
}

.local-time-box:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 35px var(--shadow-medium);
    border-color: var(--primary-color);
}

.local-time-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.local-time-icon {
    font-size: 3rem;
    color: var(--primary-color);
    opacity: 0.9;
    text-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.local-time-info {
    flex: 1;
}

.local-time-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.local-time-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gmt-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.8;
    font-style: italic;
    font-weight: 500;
}

/* Responsive design for local time box */
@media (max-width: 768px) {
    .local-time-box {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .local-time-content {
        gap: 1rem;
    }
    
    .local-time-icon {
        font-size: 2.5rem;
    }
    
    .local-time-value {
        font-size: 2rem;
    }
}

.prayer-times-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
}

.prayer-time-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(15px);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.prayer-time-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 16px 16px 0 0;
}

.prayer-time-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 35px var(--shadow-medium);
    border-color: var(--primary-color);
}

.prayer-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    text-transform: capitalize;
}

.prayer-time {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Calculation Settings Section */
.calculation-settings-section {
    padding: 2rem 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
}

.calculation-card {
    margin-bottom: 2rem;
}

.calculation-settings {
    padding: 1.5rem;
}

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

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

.setting-group label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.select-wrapper i {
    position: absolute;
    left: 1rem;
    color: var(--primary-color);
    z-index: 2;
    pointer-events: none;
}

.select-wrapper select {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    appearance: none;
    cursor: pointer;
}

.select-wrapper select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.select-wrapper select:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

.select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 1rem;
    color: var(--primary-color);
    pointer-events: none;
    font-size: 0.8rem;
}

/* Hide mobile menu on desktop */
@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .nav-links {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: relative;
    }
    
    .nav-menu.mobile-menu-open {
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        border: 1px solid var(--glass-border);
        border-radius: 16px;
        padding: 1rem;
        gap: 1rem;
        flex-direction: column;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        z-index: 1000;
        min-width: 250px;
    }
    
    .nav-menu.mobile-menu-open .nav-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-right: 0;
        width: 100%;
    }
    
    .nav-menu.mobile-menu-open .nav-link {
        padding: 0.75rem 1rem;
        border-radius: 8px;
        text-align: center;
        width: 100%;
    }
    
    .nav-menu.mobile-menu-open .language-switcher {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .nav-menu.mobile-menu-open .lang-btn {
        width: 100%;
        justify-content: center;
    }
    
    .nav-menu.mobile-menu-open .theme-toggle {
        width: 100%;
    }
    
    .nav-menu.mobile-menu-open .theme-toggle button {
        width: 100%;
        border-radius: 8px;
        height: auto;
        padding: 0.75rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .calculation-settings {
        padding: 1rem;
    }
    
    .prayer-times-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
        padding: 0.5rem;
    }
    
    .prayer-time-item {
        padding: 1.5rem 1rem;
        min-height: 100px;
    }
    
    .prayer-name {
        font-size: 1.1rem;
        margin-bottom: 0.6rem;
    }
    
    .prayer-time {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .prayer-times-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        padding: 0.25rem;
    }
    
    .prayer-time-item {
        padding: 1.2rem 0.8rem;
        min-height: 90px;
    }
    
    .prayer-name {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .prayer-time {
        font-size: 1.4rem;
    }
}

/* Muezzin Section */
.muezzin-section {
    margin-bottom: 3rem;
}

.muezzin-card h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--primary-color);
}

/* Muezzin Settings */
.muezzin-settings {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.prayer-muezzin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.prayer-muezzin-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.prayer-muezzin-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.prayer-muezzin-item label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.muezzin-control {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.control-buttons {
    display: flex;
    gap: 0.5rem;
}

.prayer-muezzin-select {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    appearance: none;
}

.prayer-muezzin-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

/* Enhanced Muezzin Control Buttons */
.muezzin-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
}

.play-muezzin-btn, .stop-muezzin-btn, .confirm-muezzin-btn {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.play-muezzin-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.stop-muezzin-btn {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
}

.confirm-muezzin-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.play-muezzin-btn::before, .stop-muezzin-btn::before, .confirm-muezzin-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.play-muezzin-btn:hover {
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.stop-muezzin-btn:hover {
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 12px 35px rgba(220, 38, 38, 0.5);
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
}

.confirm-muezzin-btn:hover {
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.play-muezzin-btn:hover::before, .stop-muezzin-btn:hover::before, .confirm-muezzin-btn:hover::before {
    left: 100%;
}

.play-muezzin-btn:active {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.stop-muezzin-btn:active {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.confirm-muezzin-btn:active {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
.play-muezzin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.stop-muezzin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}    animation: pulse-playing 2s infinite;
}

.preview-muezzin-btn[data-playing="true"]:hover {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
}

.confirm-muezzin-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.confirm-muezzin-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.5);
}

.confirm-muezzin-btn.confirmed {
    background: linear-gradient(135deg, #10b981, #34d399);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.8);
    animation: confirm-pulse 0.6s ease-out;
}

@keyframes confirm-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1.1); }
}

@keyframes pulse-playing {
    0%, 100% { box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3); }
    50% { box-shadow: 0 8px 25px rgba(220, 38, 38, 0.6); }
}



.enable-muezzin-btn {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.enable-muezzin-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, #059669, #047857);
}

.enable-muezzin-btn:hover::before {
    left: 100%;
}

.enable-muezzin-btn[data-enabled="false"] {
    background: linear-gradient(135deg, #6b7280, #9ca3af);
    opacity: 0.6;
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.3);
}

.enable-muezzin-btn[data-enabled="false"]:hover {
    background: linear-gradient(135deg, #4b5563, #6b7280);
    opacity: 0.8;
    box-shadow: 0 12px 35px rgba(107, 114, 128, 0.5);
}

/* Muezzin Button Labels */
.muezzin-btn-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    text-align: center;
    font-weight: 500;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.muezzin-controls:hover .muezzin-btn-label {
    opacity: 1;
}

/* Smart Azan Ad Styles - Enhanced */
.smart-azan-ad {
    margin: 4rem 0;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.smart-azan-ad::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    animation: float 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(2deg); }
    66% { transform: translateY(8px) rotate(-1deg); }
}

.ad-card {
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 28px;
    overflow: hidden;
    position: relative;
    box-shadow: 
        0 30px 60px rgba(102, 126, 234, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(30px);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    z-index: 1;
}

.ad-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    animation: shimmer 6s infinite;
    z-index: 1;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.ad-card:hover {
    transform: translateY(-20px) rotateX(8deg) rotateY(8deg);
    box-shadow: 
        0 40px 80px rgba(102, 126, 234, 0.3),
        0 0 0 2px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.ad-content {
    display: grid;
    grid-template-columns: 1.3fr 2.2fr;
    gap: 0;
    align-items: stretch;
    min-height: 400px;
    position: relative;
    z-index: 2;
}

.ad-image {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, 
        #667eea 0%, 
        #764ba2 25%,
        #667eea 50%,
        #764ba2 75%,
        #667eea 100%);
    background-size: 400% 400%;
    animation: gradientShift 10s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 28px 0 0 28px;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.ad-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: brightness(1.1) contrast(1.1) saturate(1.1);
}

.ad-card:hover .ad-image img {
    transform: scale(1.1) rotate(3deg);
    filter: brightness(1.3) contrast(1.2) saturate(1.2);
}

.ad-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 215, 0, 0.9);
    color: #1a1a1a;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    backdrop-filter: blur(10px);
}

.ad-text {
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ad-text h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.ad-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    line-height: 1.6;
}

.ad-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.feature i {
    color: #ffd700;
    font-size: 1.2rem;
}

.ad-price {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    font-size: 1.2rem;
}

.price-label {
    opacity: 0.8;
}

.price-value {
    font-weight: 700;
    font-size: 1.4rem;
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn-buy {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border: none;
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-buy::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 ease;
}

.btn-buy:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.6);
}

.btn-buy:hover::before {
    left: 100%;
}

@media (max-width: 768px) {
    .ad-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .ad-features {
        grid-template-columns: 1fr;
    }
    
    .ad-text h3 {
        font-size: 1.5rem;
    }
}

/* All Muezzins Section */
.all-muezzins-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.all-muezzins-section .card-header {
    margin-bottom: 1.5rem;
}

.all-muezzins-section h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.muezzin-global-controls {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.global-muezzin-selection label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.global-control {
    display: flex;
    gap: 1rem;
    align-items: center;
}

#global-muezzin-select {
    flex: 1;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    appearance: none;
}

#global-muezzin-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.notification-settings {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.setting-item:hover {
    background: rgba(255, 255, 255, 0.12);
}

.setting-item span {
    font-weight: 500;
    color: var(--text-primary);
}

/* Switch Styles */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.4s;
    border-radius: 24px;
}

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

input:checked + .slider {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

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

/* Apply to All Button */
.btn-apply-all {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 160px;
}

.btn-apply-all::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;
}

.btn-apply-all:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

.btn-apply-all:hover::before {
    left: 100%;
}

.btn-apply-all:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-apply-all:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.btn-apply-all i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.btn-apply-all:hover i {
    transform: rotate(360deg);
}

.muezzin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.muezzin-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.muezzin-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow-light);
    border-color: var(--primary-color);
}

.muezzin-item.selected {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: var(--primary-color);
}

.muezzin-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.muezzin-controls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.control-btn {
    padding: 0.5rem;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Footer */
.glass-footer {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    border-radius: 20px 20px 0 0;
    margin-top: 4rem;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section p,
.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding: 1.5rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    max-width: 1200px;
    margin: 0 auto;
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Mobile Menu Toggle - Hidden by default */
.mobile-menu-toggle {
    display: none;
}

.mobile-menu-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mobile-menu-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-container {
        padding: 0 1rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        border: 1px solid var(--glass-border);
        border-radius: 12px;
        padding: 1rem;
        gap: 0.5rem;
        flex-direction: column;
        box-shadow: 0 8px 32px var(--shadow-medium);
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1000;
        min-width: 200px;
    }
    
    .nav-menu.mobile-menu-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .location-grid {
        grid-template-columns: 1fr;
    }
    
    .glass-card {
        padding: 1.5rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .main-content {
        margin-top: 140px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .logo {
        font-size: 1.1rem;
        gap: 0.5rem;
    }
    
    .nav-menu {
        gap: 0.5rem;
    }
    
    .lang-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
        gap: 0.3rem;
    }
    
    #theme-toggle {
        width: 36px;
        height: 36px;
        padding: 0.5rem;
    }
    
    .prayer-times-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .muezzin-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .map-container {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .prayer-times-grid {
        grid-template-columns: 1fr;
    }
    
    .muezzin-grid {
        grid-template-columns: 1fr;
    }
    
    .glass-header {
        border-radius: 0 0 15px 15px;
    }
    
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        padding: 0 0.5rem;
    }
    
    .logo {
        font-size: 1rem;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        border: 1px solid var(--glass-border);
        border-radius: 12px;
        padding: 1rem;
        gap: 0.5rem;
        flex-direction: column;
        box-shadow: 0 8px 32px var(--shadow-medium);
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1000;
        min-width: 180px;
    }
    
    .nav-menu.mobile-menu-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .language-switcher {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .lang-btn {
        justify-content: center;
        min-width: 80px;
    }
}

/* RTL Support */
[dir="rtl"] .nav-container {
    direction: rtl;
}

[dir="rtl"] .footer-content {
    direction: rtl;
}

/* Language Direction Adjustments */
[data-lang="en"] {
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

[data-lang="en"] body {
    direction: ltr;
}

[data-lang="ar"] body {
    direction: rtl;
}

[data-lang="fa"] body {
    direction: rtl;
}

/* Prevent header position changes during language switch */
.glass-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    transform: none !important;
    transition: none !important;
}

.nav-container {
    position: relative;
    transform: none !important;
    transition: none !important;
}

/* Ensure consistent header height */
.navbar {
    min-height: 80px;
    display: flex;
    align-items: center;
    transition: none !important;
}

/* Prevent any transform or position changes on language switch */
[data-lang="fa"] .glass-header,
[data-lang="ar"] .glass-header,
[data-lang="en"] .glass-header {
    position: fixed !important;
    top: 0 !important;
    transform: none !important;
    transition: none !important;
}

/* Arabic Language Adjustments */
[data-lang="ar"] {
    font-family: 'Amiri', 'Times New Roman', serif;
}

[data-lang="ar"] body {
    direction: rtl;
}

/* Smooth Transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

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

::-webkit-scrollbar-track {
    background: var(--glass-bg);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Moon Phase Visual Styles */
.moon-phase-visual {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 15px;
    padding: 20px;
    margin: 15px 0;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.moon-phase-visual::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

.moon-phase-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.moon-svg-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    padding: 10px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.moon-info-text {
    color: #e8e8e8;
    text-align: center;
}

.moon-phase-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.moon-phase-name {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 8px;
    color: #f0f0f0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.moon-age {
    font-size: 0.95em;
    color: #c0c0c0;
    margin-bottom: 5px;
    font-weight: 600;
}

.moon-age-text {
    font-size: 0.95em;
    color: #c0c0c0;
    margin-bottom: 5px;
}

.moon-illumination {
    font-size: 0.9em;
    color: #a0a0a0;
    font-style: italic;
    font-weight: 500;
}

/* Dark theme adjustments */
[data-theme="dark"] .moon-phase-visual {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #2a2a2a 100%);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .moon-phase-name {
    color: #ffffff;
}

[data-theme="dark"] .moon-age {
    color: #e0e0e0;
}

[data-theme="dark"] .moon-age-text {
    color: #d0d0d0;
}

[data-theme="dark"] .moon-illumination {
    color: #c0c0c0;
}

/* Light theme adjustments */
[data-theme="light"] .moon-phase-visual {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 50%, #ddeeff 100%);
    border-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

[data-theme="light"] .moon-phase-visual::before {
    background: radial-gradient(circle, rgba(0, 0, 0, 0.05) 0%, transparent 70%);
}

[data-theme="light"] .moon-svg-container {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .moon-phase-name {
    color: #2c3e50;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .moon-age {
    color: #2c3e50;
}

[data-theme="light"] .moon-age-text {
    color: #34495e;
}

[data-theme="light"] .moon-illumination {
    color: #5a6c7d;
}

/* Responsive design for moon phase */
@media (max-width: 768px) {
    .moon-phase-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .moon-phase-visual {
        padding: 15px;
        margin: 10px 0;
    }
    
    .moon-phase-name {
        font-size: 1.1em;
    }
    
    .moon-svg-container {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .moon-phase-visual {
        padding: 12px;
        margin: 8px 0;
    }
    
    .moon-phase-name {
        font-size: 1em;
    }
    
    .moon-age-text,
    .moon-illumination {
        font-size: 0.85em;
    }
}

/* Enhanced Smart Azan Device Advertisement - UX Optimized */
.smart-azan-ad {
    padding: 80px 0;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.08) 0%, 
        rgba(118, 75, 162, 0.08) 25%,
        rgba(16, 185, 129, 0.08) 50%, 
        rgba(245, 158, 11, 0.08) 75%,
        rgba(239, 68, 68, 0.08) 100%);
    position: relative;
    overflow: hidden;
    margin: 4rem 0;
}

.smart-azan-ad::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

.smart-azan-ad::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1.5" fill="%23667eea" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>') repeat;
    animation: sparkle 25s linear infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

@keyframes sparkle {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-20px) translateY(-20px); }
}

.ad-card {
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 24px;
    padding: 0;
    overflow: hidden;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(25px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    transform-style: preserve-3d;
}

.ad-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 24px;
}

.ad-card:hover {
    transform: translateY(-15px) rotateX(5deg) rotateY(5deg);
    box-shadow: 
        0 35px 70px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.ad-card:hover::before {
    opacity: 1;
}

.ad-content {
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 0;
    align-items: stretch;
    min-height: 350px;
    position: relative;
}

.ad-image {
    position: relative;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, 
        #667eea 0%, 
        #764ba2 25%,
        #667eea 50%,
        #764ba2 75%,
        #667eea 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px 0 0 24px;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: brightness(1.1) contrast(1.1);
}

.ad-card:hover .ad-image img {
    transform: scale(1.08) rotate(2deg);
    filter: brightness(1.2) contrast(1.2);
}

.ad-badge {
    position: absolute;
    top: 30px;
    right: 30px;
    background: linear-gradient(135deg, 
        #ff6b6b 0%, 
        #ee5a24 25%,
        #ff6b6b 50%,
        #ee5a24 75%,
        #ff6b6b 100%);
    background-size: 300% 300%;
    animation: gradientPulse 4s ease infinite, bounce 3s ease-in-out infinite;
    color: white;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 0.95em;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 
        0 12px 35px rgba(255, 107, 107, 0.5),
        0 0 0 3px rgba(255, 255, 255, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(15px);
    z-index: 10;
    transform-style: preserve-3d;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ad-badge:hover {
    transform: translateY(-5px) scale(1.1) rotateX(10deg);
    box-shadow: 
        0 20px 50px rgba(255, 107, 107, 0.6),
        0 0 0 4px rgba(255, 255, 255, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.6);
}

@keyframes gradientPulse {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

.ad-text {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.08) 0%, 
        rgba(255, 255, 255, 0.12) 50%, 
        rgba(255, 255, 255, 0.08) 100%);
    border-radius: 0 28px 28px 0;
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    justify-content: center;
}

.ad-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(255, 255, 255, 0.05) 50%, 
        transparent 70%);
    animation: textShimmer 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes textShimmer {
    0%, 100% { transform: translateX(-100%) skewX(-15deg); }
    50% { transform: translateX(200%) skewX(-15deg); }
}

.ad-text h3 {
    font-size: 2.8em;
    font-weight: 900;
    margin: 0;
    background: linear-gradient(135deg, 
        #667eea 0%, 
        #764ba2 20%,
        #10b981 40%,
        #667eea 60%,
        #764ba2 80%,
        #10b981 100%);
    background-size: 400% 400%;
    animation: textGradient 6s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
    line-height: 1.1;
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
}

@keyframes textGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.ad-text p {
    font-size: 1.2em;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
    font-weight: 400;
    opacity: 0.9;
}

.ad-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.6s;
}

.feature:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

.feature:hover::before {
    left: 100%;
}

.feature i {
    color: #667eea;
    font-size: 1.4em;
    transition: all 0.3s ease;
}

.feature:hover i {
    transform: scale(1.2) rotate(10deg);
    color: #764ba2;
}

.feature span {
    font-size: 0.95em;
    font-weight: 600;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.ad-price {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    background: linear-gradient(135deg, 
        #667eea 0%, 
        #764ba2 50%,
        #667eea 100%);
    background-size: 200% 200%;
    animation: priceGradient 4s ease infinite;
    border-radius: 20px;
    color: white;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

@keyframes priceGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.ad-price::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ad-price:hover::before {
    opacity: 1;
}

.price-label {
    font-size: 1.2em;
    opacity: 0.9;
}

.price-value {
    font-size: 1.6em;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 35px;
    background: linear-gradient(135deg, 
        #10b981 0%, 
        #059669 25%,
        #10b981 50%,
        #059669 75%,
        #10b981 100%);
    background-size: 300% 300%;
    animation: buttonGradient 3s ease infinite;
    color: white;
    text-decoration: none;
    border-radius: 60px;
    font-weight: 700;
    font-size: 1.15em;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 10px 30px rgba(16, 185, 129, 0.4),
        0 0 0 2px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
}

@keyframes buttonGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

.btn-buy:hover::before {
    left: 100%;
}

.btn-buy:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 15px 40px rgba(16, 185, 129, 0.5),
        0 0 0 3px rgba(255, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-buy:active {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(16, 185, 129, 0.4),
        0 0 0 2px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-buy i {
    font-size: 1.3em;
    transition: transform 0.3s ease;
}

.btn-buy:hover i {
    transform: rotate(15deg) scale(1.1);
}

/* Dark theme adjustments for advertisement */
[data-theme="dark"] .smart-azan-ad {
    background: linear-gradient(135deg, 
        rgba(74, 144, 226, 0.05) 0%, 
        rgba(80, 200, 120, 0.05) 50%, 
        rgba(255, 193, 7, 0.05) 100%);
}

[data-theme="dark"] .ad-image {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

/* Light theme adjustments for advertisement */
[data-theme="light"] .smart-azan-ad {
    background: linear-gradient(135deg, 
        rgba(74, 144, 226, 0.08) 0%, 
        rgba(80, 200, 120, 0.08) 50%, 
        rgba(255, 193, 7, 0.08) 100%);
}

[data-theme="light"] .ad-image {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

[data-theme="light"] .ad-text h3 {
    color: #2c3e50;
}

[data-theme="light"] .ad-text p {
    color: #5a6c7d;
}

[data-theme="light"] .feature span {
    color: #2c3e50;
}

/* Responsive design for advertisement */
@media (max-width: 768px) {
    .smart-azan-ad {
        margin: 3rem 0;
    }
    
    .ad-content {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .ad-image {
        height: 280px;
        border-radius: 28px 28px 0 0;
        background-size: 300% 300%;
    }
    
    .ad-text {
        padding: 2.5rem 2rem;
        border-radius: 0 0 28px 28px;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .ad-text h3 {
        font-size: 2.2em;
    }
    
    .ad-features {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .ad-badge {
        top: 20px;
        right: 20px;
        padding: 10px 18px;
        font-size: 0.85em;
        transform: none;
    }
    
    .ad-badge:hover {
        transform: translateY(-3px) scale(1.05);
    }
    
    .ad-card:hover {
        transform: translateY(-10px);
    }
}

@media (max-width: 480px) {
    .smart-azan-ad {
        margin: 2rem 0;
    }
    
    .ad-card {
        border-radius: 20px;
    }
    
    .ad-image {
        height: 220px;
        border-radius: 20px 20px 0 0;
    }
    
    .ad-text {
        padding: 2rem 1.5rem;
        gap: 2rem;
        border-radius: 0 0 20px 20px;
    }
    
    .ad-text h3 {
        font-size: 1.8em;
    }
    
    .ad-text p {
        font-size: 1.1em;
    }
    
    .btn-buy {
        padding: 15px 28px;
        font-size: 1.05em;
        border-radius: 50px;
    }
    
    .price-value {
        font-size: 1.4em;
    }
    
    .ad-badge {
        top: 15px;
        right: 15px;
        padding: 8px 15px;
        font-size: 0.8em;
        border-radius: 40px;
    }
    
    .feature {
        padding: 14px 18px;
        border-radius: 12px;
    }
}