@import url('https://fonts.googleapis.com/css2?family=Yatra+One&family=Marcellus&family=Mukta:wght@300;400;500;600;700;800&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #d35400; /* Deep Saffron */
    --primary-gradient: linear-gradient(135deg, #ff9e22, #d35400);
    --gold: #b89126; /* Metallic Gold */
    --gold-gradient: linear-gradient(135deg, #f1c40f, #b89126);
    --maroon: #800000; /* Deep Sacred Crimson */
    --maroon-gradient: linear-gradient(135deg, #a30000, #600000);
    --secondary: #2c3e50; /* Charcoal Navy */
    --background: #fff9f2; /* Sacred Warm Cream */
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-shadow: 0 15px 35px rgba(211, 84, 0, 0.06);
    --border-color: rgba(211, 84, 0, 0.12);
    --text-color: #2c3e50;
    --text-muted: #6b778c;
    --success: #27ae60;
    --danger: #c0392b;
    --border-radius: 24px;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

body {
    font-family: 'Poppins', 'Mukta', sans-serif;
    background-color: var(--background);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(230, 126, 34, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(212, 175, 55, 0.05) 0%, transparent 40%),
        repeating-linear-gradient(45deg, rgba(211, 84, 0, 0.005) 0px, rgba(211, 84, 0, 0.005) 2px, transparent 2px, transparent 10px);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Section */
header {
    text-align: center;
    background: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 2px solid var(--gold);
    position: relative;
    margin-bottom: 35px;
    overflow: hidden;
}

.header-banner {
    height: 280px;
    position: relative;
    overflow: hidden;
}

.header-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.85);
}

.header-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.5));
    z-index: 1;
}

.logo-container {
    width: 130px;
    height: 130px;
    margin: -65px auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--gold);
    box-shadow: 0 10px 25px rgba(211, 84, 0, 0.15);
    transition: var(--transition);
    position: relative;
    z-index: 10;
    background: #ffffff;
}

.logo-container:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 15px 30px rgba(211, 84, 0, 0.25);
}

.logo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-content {
    padding: 10px 30px 40px;
}

header h1 {
    font-family: 'Yatra One', 'Mukta', sans-serif;
    font-size: 2.8rem;
    background: var(--maroon-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

header .subtitle {
    font-family: 'Marcellus', 'Mukta', sans-serif;
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

header .intro {
    font-size: 0.98rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto;
}

/* Summary Grid */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.summary-card {
    background: var(--card-bg);
    padding: 20px 15px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(211, 84, 0, 0.12);
}

.summary-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--border-color);
}

.summary-card.total-amount::after {
    background: var(--primary-gradient);
}

.summary-card.today-amount::after {
    background: var(--gold-gradient);
}

.summary-card.total-donors::after {
    background: var(--primary-gradient);
}

.summary-card.anonymous-donors::after {
    background: var(--secondary);
}

.summary-card.today-amount .value {
    color: var(--gold);
}

.summary-card h3 {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.summary-card .value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
}

.summary-card.total-amount .value {
    color: var(--primary);
}

/* Main Donation Section */
.donation-section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    padding: 30px;
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-title {
    font-size: 1.4rem;
    color: var(--primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Search Box */
.search-container {
    position: relative;
    max-width: 300px;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    padding-left: 35px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.8);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(211, 84, 0, 0.1);
    background: #fff;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Donation Table */
.donation-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.donation-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.donation-table th {
    background-color: rgba(211, 84, 0, 0.06);
    color: var(--primary);
    font-weight: 600;
    padding: 15px;
    border-bottom: 2px solid var(--border-color);
}

.donation-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-color);
}

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

.donation-table tr {
    transition: var(--transition);
}

.donation-table tr:hover {
    background-color: rgba(211, 84, 0, 0.02);
}

/* Badges */
.badge-amount {
    font-weight: 700;
    color: var(--primary);
    background: rgba(211, 84, 0, 0.08);
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
}

.badge-anonymous {
    color: var(--text-muted);
    font-style: italic;
}

.badge-address {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.03);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Action Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 5px 15px rgba(211, 84, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(211, 84, 0, 0.3);
}

.btn-donate {
    background: var(--maroon-gradient);
    color: white;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 30px;
    border: 2px solid var(--gold);
    box-shadow: 0 6px 20px rgba(211, 84, 0, 0.25);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    animation: pulse 2s infinite;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-family: inherit;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(211, 84, 0, 0.4);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(211, 84, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(211, 84, 0, 0);
    }
}

.btn-donate:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(211, 84, 0, 0.45);
    border-color: #ffffff;
}

/* Stats icons */
.stats-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
    display: inline-block;
    transition: var(--transition);
}

.summary-card:hover .stats-icon {
    transform: scale(1.2) rotate(10deg);
}

.text-saffron {
    color: var(--primary);
}

.text-gold {
    color: #e2a612;
}

.text-navy {
    color: #7f8c8d;
}

/* Gold Divider */
.gold-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px auto;
    max-width: 600px;
    width: 100%;
}

.divider-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.divider-symbol {
    margin: 0 15px;
    font-size: 1.5rem;
    color: var(--gold);
    animation: rotate-om 8s linear infinite;
}

@keyframes rotate-om {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-gold {
    background: var(--gold-gradient);
    color: white;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.2);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

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

.btn-secondary:hover {
    background: #1a252f;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 20px;
}

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

.btn-success:hover {
    background: #219653;
}

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

.btn-danger:hover {
    background: #962d22;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-color);
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 8px rgba(211, 84, 0, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    margin: 15px 0;
}

.checkbox-group input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Modal / Dialog */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.modal {
    background: var(--background);
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 2px solid var(--gold);
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(211, 84, 0, 0.05);
}

.modal-header h2 {
    color: var(--primary);
    font-size: 1.3rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 20px;
}

/* Payment Modal Specific */
.qr-container {
    text-align: center;
    margin-bottom: 20px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px dashed var(--gold);
}

.qr-image {
    max-width: 220px;
    width: 100%;
    margin-bottom: 15px;
    border: 1px solid rgba(0,0,0,0.05);
}

.upi-id-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #f1f2f6;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.upi-id-box code {
    color: var(--primary);
}

.copy-btn {
    background: none;
    border: none;
    color: var(--secondary);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.copy-btn:hover {
    color: var(--primary);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: 50px;
}

footer p {
    margin-bottom: 10px;
}

footer .admin-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

footer .admin-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Admin Dashboard Specific */
.admin-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    padding: 15px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.admin-navbar h2 {
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: 700;
}

.admin-nav-actions {
    display: flex;
    gap: 15px;
}

.admin-section-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    padding: 25px;
    margin-bottom: 30px;
}

.admin-section-card h3 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

/* Login Page Layout */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-card {
    max-width: 400px;
    width: 100%;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 2px solid var(--gold);
    padding: 35px;
}

.login-card h2 {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-danger {
    background: rgba(192, 57, 43, 0.1);
    color: var(--danger);
    border: 1px solid rgba(192, 57, 43, 0.2);
}

.alert-success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success);
    border: 1px solid rgba(39, 174, 96, 0.2);
}

/* Quick amount button styles */
.quick-amounts {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.btn-quick {
    background: rgba(211, 84, 0, 0.05);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-quick:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

/* Responsive queries */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    .search-container {
        max-width: 100%;
    }
}

/* Mobile responsive table to card transformation */
@media (max-width: 600px) {
    .donation-table, 
    .donation-table thead, 
    .donation-table tbody, 
    .donation-table th, 
    .donation-table td, 
    .donation-table tr {
        display: block;
    }
    
    .donation-table thead {
        display: none;
    }
    
    .donation-table tr {
        background: #ffffff;
        border: 1px solid var(--border-color);
        border-radius: 12px;
        margin-bottom: 15px;
        padding: 15px;
        box-shadow: 0 4px 12px rgba(211, 84, 0, 0.04);
        position: relative;
    }
    
    .donation-table td {
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        padding: 10px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
    }
    
    .donation-table td:last-child {
        border-bottom: none;
    }
    
    .donation-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--primary);
        font-size: 0.85rem;
        text-align: left;
        margin-right: 15px;
    }

    /* Admin dashboard adjustments */
    .donation-table td div {
        justify-content: flex-end;
    }
}

/* Bottom Navigation Bar */
.temple-dock {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 450px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid var(--gold);
    border-radius: 40px;
    box-shadow: 0 10px 25px rgba(211, 84, 0, 0.15);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 10px;
    z-index: 1000;
    transition: var(--transition);
}

.temple-dock:hover {
    box-shadow: 0 15px 30px rgba(211, 84, 0, 0.25);
    border-color: var(--primary);
}

.dock-tab {
    background: none;
    border: none;
    outline: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    gap: 4px;
    padding: 6px 0;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    position: relative;
}

.dock-tab i {
    font-size: 1.25rem;
    transition: var(--transition);
}

.dock-tab:hover {
    color: var(--primary);
}

.dock-tab.active {
    color: var(--primary);
    font-weight: 700;
}

.dock-tab.active i {
    transform: scale(1.15) translateY(-2px);
    text-shadow: 0 2px 8px rgba(211, 84, 0, 0.2);
}

.dock-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    width: 15px;
    height: 3px;
    background: var(--primary);
    border-radius: 10px;
}

/* Tab Views Container */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

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

/* Adjust page container bottom padding */
.container {
    padding-bottom: 95px !important;
}
