/* =====================================================
   Eid Prayer Finder - Main Stylesheet
   Mobile-First Responsive Design
   ===================================================== */

/* CSS Variables for Theming */
:root {
    --primary-color: #1a5f3e;
    --primary-dark: #0d3d28;
    --primary-light: #2d8a5e;
    --primary-gradient: linear-gradient(135deg, #1a5f3e 0%, #2d8a5e 100%);
    --secondary-color: #c9a227;
    --secondary-dark: #a8841f;
    --success-color: #1a5f3e;
    --warning-color: #c9a227;
    --danger-color: #d32f2f;
    --info-color: #1976d2;
    --text-primary: #1a1a1a;
    --text-secondary: #5a5a5a;
    --text-light: #8a8a8a;
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-dark: #f5f5f5;
    --border-color: #e5e5e5;
    --shadow-sm: 0 2px 8px rgba(26, 95, 62, 0.06);
    --shadow-md: 0 4px 16px rgba(26, 95, 62, 0.08);
    --shadow-lg: 0 8px 32px rgba(26, 95, 62, 0.12);
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =====================================================
   Typography
   ===================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* =====================================================
   Layout & Container
   ===================================================== */

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

.container-sm {
    max-width: 800px;
}

.container-fluid {
    width: 100%;
    padding: 0 1rem;
}

.section {
    padding: 2rem 0;
}

@media (min-width: 768px) {
    .section {
        padding: 3rem 0;
    }
}

/* =====================================================
   Header & Navigation
   ===================================================== */

.header {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 999999;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    width: 50%;
}

.logo:hover {
    color: white;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
}

.nav-link {
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    font-weight: 500;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 767px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-gradient);
        padding: 1rem;
        box-shadow: var(--shadow-md);
    }

    .nav-menu.active {
        display: flex;
    }
}

@media (max-width: 580px) {
    .logo img {
    width: 75%;
}
}
/* =====================================================
   Text Rotator
   ===================================================== */

.text-rotator {
    position: relative;
    text-align: center;
    margin-bottom: 1rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rotator-item {
    position: absolute;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
    width: 100%;
    padding: 0 1rem;
}

.rotator-item.active {
    opacity: 1;
    transform: translateY(0);
}

.rotator-item.fade-out {
    opacity: 0;
    transform: translateY(-20px);
}

@media (max-width: 575px) {
    .text-rotator {
        padding: 1rem 0.75rem;
        min-height: 88px;
    }
    
    .rotator-item {
        font-size: 1rem;
        line-height: 20px;
    }
}

/* =====================================================
   Map Section
   ===================================================== */

.map-section {
    position: relative;
    height: 60vh;
    min-height: 400px;
    margin-bottom: 2rem;
}

#map {
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.map-controls {
    margin-bottom: 1rem;
}

.search-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.search-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    transition: var(--transition);
    background-color: var(--bg-primary);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 95, 62, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    gap: 0.5rem;
}

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

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

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

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

.btn-secondary:hover:not(:disabled) {
    background-color: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover:not(:disabled) {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
}

/* =====================================================
   Cards
   ===================================================== */

.card {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.card-body {
    flex: 1;
}

.card-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =====================================================
   Mosque Cards
   ===================================================== */

#mosques-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.mosque-card {
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.mosque-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.mosque-card.active {
    border-color: var(--primary-color);
    background-color: rgba(26, 95, 62, 0.03);
}

.mosque-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.mosque-area {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.mosque-address {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.mosque-distance {
    font-size: 0.875rem;
    color: var(--info-color);
    font-weight: 500;
}

.mosque-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-top: 10px;
}

.mosque-info-grid p {
    margin: 2px 0;
    color: #555;
    font-size: 14px;
}

.mosque-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.mosque-actions .btn {
    flex: 1;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
}

.btn-correct {
    background-color: var(--success-color);
    color: white;
    border: none;
}

.btn-correct:hover:not(:disabled) {
    background-color: #0d3d28;
    transform: translateY(-1px);
}

.btn-incorrect {
    background-color: var(--danger-color);
    color: white;
    border: none;
}

.btn-incorrect:hover:not(:disabled) {
    background-color: #b71c1c;
    transform: translateY(-1px);
}

.btn-request {
    background: var(--primary-gradient);
    color: white;
    border: none;
}

.btn-request:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* =====================================================
   Badges
   ===================================================== */

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background-color: rgba(26, 95, 62, 0.1);
    color: var(--success-color);
}

.badge-warning {
    background-color: rgba(201, 162, 39, 0.1);
    color: var(--warning-color);
}

.badge-danger {
    background-color: rgba(211, 47, 47, 0.1);
    color: var(--danger-color);
}

.badge-info {
    background-color: rgba(25, 118, 210, 0.1);
    color: var(--info-color);
}

.badge-secondary {
    background-color: rgba(90, 90, 90, 0.1);
    color: var(--text-secondary);
}

/* =====================================================
   Mosque Details
   ===================================================== */

.mosque-detail {
    display: grid;
    gap: 1.5rem;
}

.detail-item {
    margin-bottom: 1rem;
}

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

.detail-value {
    font-size: 1rem;
    color: var(--text-primary);
}

.jamaat-list {
    list-style: none;
    margin-top: 0.5rem;
}

.jamaat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
}

.jamaat-number {
    font-weight: 600;
    color: var(--primary-color);
}

.jamaat-time {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* =====================================================
   Forms
   ===================================================== */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    background-color: var(--bg-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 95, 62, 0.1);
}

.form-control:disabled {
    background-color: var(--bg-dark);
    cursor: not-allowed;
}

.form-control::placeholder {
    color: var(--text-light);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231a5f3e'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.5rem;
    padding-right: 3rem;
}

.form-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Form Validation */
.is-invalid {
    border-color: var(--danger-color) !important;
}

.invalid-feedback {
    display: none;
    font-size: 0.875rem;
    color: var(--danger-color);
    margin-top: 0.25rem;
}

.is-invalid + .invalid-feedback {
    display: block;
}

/* =====================================================
   Alerts
   ===================================================== */

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
    border-left: 4px solid transparent;
}

.alert-success {
    background-color: rgba(26, 95, 62, 0.08);
    border-color: var(--success-color);
    color: var(--success-color);
}

.alert-warning {
    background-color: rgba(201, 162, 39, 0.08);
    border-color: var(--warning-color);
    color: var(--warning-color);
}

.alert-danger {
    background-color: rgba(211, 47, 47, 0.08);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.alert-info {
    background-color: rgba(25, 118, 210, 0.08);
    border-color: var(--info-color);
    color: var(--info-color);
}

/* =====================================================
   Admin Panel
   ===================================================== */

.admin-dashboard {
    display: grid;
    gap: 2rem;
}

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

.stat-card {
    background-color: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table thead {
    background: var(--primary-gradient);
    color: white;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table tbody tr:hover {
    background-color: var(--bg-secondary);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Action Buttons */
.action-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: var(--border-radius-sm);
    margin-right: 0.25rem;
}

/* =====================================================
   Pagination
   ===================================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.page-link {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--primary-color);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.page-link:hover:not(.disabled) {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

.page-link.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

.page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.page-ellipsis {
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.page-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-left: 1rem;
    padding: 0.5rem 1rem;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
}

/* Pagination Mobile Responsive */
@media (max-width: 575px) {
    .pagination {
        gap: 0.25rem;
    }
    
    .page-link {
        padding: 0.4rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .page-info {
        width: 100%;
        margin-left: 0;
        margin-top: 0.5rem;
        text-align: center;
    }
}

/* =====================================================
   Footer
   ===================================================== */

.footer {
    background: var(--primary-gradient);
    color: white;
    padding: 1rem 0;
    margin-top: 4rem;
    display: flex;
}

.footer-content {
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9375rem;
    font-weight: 500;
    margin: 0;
}

.footer-developer {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

.footer-developer a {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.footer-developer a:hover {
    color: white;
    text-decoration: underline;
}

/* =====================================================
   Loading States
   ===================================================== */

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

/* =====================================================
   Utilities
   ===================================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-success { color: var(--success-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-danger { color: var(--danger-color) !important; }

.bg-white { background-color: var(--bg-primary) !important; }

/* =====================================================
   Responsive Breakpoints
   ===================================================== */

@media (min-width: 768px) {
    .mosque-detail {
        grid-template-columns: 2fr 1fr;
    }
}

@media (max-width: 842px) {
    #mosques-list {
        display: block;
        gap: 0;
        margin-top: 10px;
    }

    .mosque-card {
    margin-top: 10px;
}
}

@media (max-width: 575px) {
    .search-bar {
        flex-direction: column;
    }

    #mosques-list {
        display: block;
        gap: 0;
        margin-top: 10px;
    }

    .mosque-card {
        margin-bottom: 1rem;
    }

    .mosque-actions {
    display: grid;
    }

    .btn-block-mobile {
        width: 100%;
    }

    .card {
        padding: 1rem;
    }
    .footer-content {
    text-align: center;
    display: block;
}
}

/* =====================================================
   Notification/Toast System
   ===================================================== */

.notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000000;
    max-width: 400px;
    width: 100%;
    pointer-events: none;
}

.notification-toast {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    pointer-events: auto;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.notification-toast.removing {
    animation: slideOutRight 0.3s ease;
}

.notification-toast.success {
    border-left-color: var(--success-color);
}

.notification-toast.error {
    border-left-color: var(--danger-color);
}

.notification-toast.warning {
    border-left-color: var(--warning-color);
}

.notification-toast.info {
    border-left-color: var(--info-color);
}

.notification-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.notification-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
    word-wrap: break-word;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    flex-shrink: 0;
}

.notification-close:hover {
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
}

.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--success-color), 
        var(--warning-color), 
        var(--info-color)
    );
    transform-origin: left;
    animation: progress 5s linear;
}

.notification-toast.success .notification-progress {
    background: var(--success-color);
}

.notification-toast.error .notification-progress {
    background: var(--danger-color);
}

.notification-toast.warning .notification-progress {
    background: var(--warning-color);
}

.notification-toast.info .notification-progress {
    background: var(--info-color);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes progress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* =====================================================
   Searchable Autocomplete Dropdown
   ===================================================== */

.autocomplete-wrapper {
    position: relative;
    width: 100%;
    z-index: 9999;
}

.autocomplete-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    padding-right: 3rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    transition: var(--transition);
    background-color: var(--bg-primary);
    cursor: text;
}

.autocomplete-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 95, 62, 0.1);
}

.autocomplete-input::placeholder {
    color: var(--text-light);
}

.autocomplete-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
    font-size: 1.125rem;
}

.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    z-index: 10000;
    display: none;
    border: 1px solid var(--border-color);
}

.autocomplete-dropdown.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

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

.autocomplete-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.autocomplete-option:last-child {
    border-bottom: none;
}

.autocomplete-option:hover,
.autocomplete-option.highlighted {
    background: var(--primary-gradient);
    color: white;
}

.autocomplete-option:hover .autocomplete-option-subtext,
.autocomplete-option.highlighted .autocomplete-option-subtext {
    color: rgba(255, 255, 255, 0.8);
}

.autocomplete-option-icon {
    color: var(--text-light);
    font-size: 1rem;
}

.autocomplete-option:hover .autocomplete-option-icon,
.autocomplete-option.highlighted .autocomplete-option-icon {
    color: white;
}

.autocomplete-option-text {
    flex: 1;
}

.autocomplete-option-main {
    font-weight: 500;
    font-size: 0.95rem;
}

.autocomplete-option-subtext {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.autocomplete-option-highlight {
    background-color: rgba(255, 235, 59, 0.4);
    padding: 0 2px;
    border-radius: 2px;
}

.autocomplete-option:hover .autocomplete-option-highlight,
.autocomplete-option.highlighted .autocomplete-option-highlight {
    background-color: rgba(255, 255, 255, 0.3);
}

.autocomplete-no-results {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
}

.autocomplete-no-results-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.autocomplete-loading {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.autocomplete-loading .loading {
    width: 16px;
    height: 16px;
}

/* =====================================================
   Print Styles
   ===================================================== */

@media print {
    .header,
    .footer,
    .map-section,
    .btn,
    .search-bar,
    .notification-container,
    .autocomplete-dropdown {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}

/* =====================================================
   Mobile Responsive for Notifications
   ===================================================== */

@media (max-width: 575px) {
    .notification-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .autocomplete-dropdown {
        max-height: 250px;
    }
}

/* =====================================================
   Modal Styles
   ===================================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideInUp 0.3s ease;
}

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

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    font-size: 1.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    z-index: 1;
    line-height: 1;
}

.modal-close:hover {
    background-color: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background-color: var(--bg-secondary);
}

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

/* Modal Responsive */
@media (max-width: 575px) {
    .modal {
        padding: 0.5rem;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* Modal Form Styles */
.modal .form-group {
    margin-bottom: 1rem;
}

.modal .form-group:last-child {
    margin-bottom: 0;
}

.modal h4 {
    margin: 1.5rem 0 0.5rem 0;
    font-size: 1.125rem;
    color: var(--primary-color);
}

.modal h4:first-of-type {
    margin-top: 0;
}

.modal .jamaat-time-row {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.modal .jamaat-time-row h5 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: var(--text-primary);
}

/* =====================================================
   Vote Statistics (for existing functionality)
   ===================================================== */

.vote-stats {
    margin-top: 1rem;
    padding: 0.875rem;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    border-left: 4px solid var(--info-color);
}

.vote-stats-mini {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.vote-stat-text {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-primary);
}

.vote-stat-text.correct {
    color: var(--success-color);
    background-color: rgba(26, 95, 62, 0.08);
}

.vote-stat-text.incorrect {
    color: var(--danger-color);
    background-color: rgba(211, 47, 47, 0.08);
}

.vote-stat-text.total {
    color: var(--info-color);
    background-color: rgba(25, 118, 210, 0.08);
}

/* Mobile responsive for mini vote stats */
@media (max-width: 480px) {
    .vote-stats-mini {
        font-size: 0.75rem;
        gap: 0.5rem;
    }
    
    .vote-stat-text {
        padding: 0.2rem 0.4rem;
    }
}

.vote-stats-container {
    display: flex;
    gap: 1rem;
    justify-content: space-around;
    align-items: center;
}

.vote-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.vote-stat.correct-stat {
    border-right: 2px solid var(--border-color);
}

.vote-stat.incorrect-stat {
    border-right: 2px solid var(--border-color);
}

.vote-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.vote-stat.correct-stat .vote-count {
    color: var(--success-color);
}

.vote-stat.incorrect-stat .vote-count {
    color: var(--danger-color);
}

.vote-stat.total-stat .vote-count {
    color: var(--info-color);
}

.vote-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.vote-percent {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.vote-stat.correct-stat .vote-percent {
    color: var(--success-color);
}

.vote-stat.incorrect-stat .vote-percent {
    color: var(--danger-color);
}

.vote-stat.total-stat .vote-percent {
    color: var(--info-color);
}

/* Mobile responsive for vote stats */
@media (max-width: 480px) {
    .vote-stats-container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .vote-stat {
        width: 100%;
        padding: 0.5rem;
        background-color: var(--bg-primary);
        border-radius: var(--border-radius-sm);
    }
    
    .vote-stat.correct-stat,
    .vote-stat.incorrect-stat {
        border-right: none;
    }
    
    .vote-stat-container {
        flex-direction: row;
        gap: 1rem;
    }
}