/* =========================================
   SHARED VARIABLES & RESET
   ========================================= */
:root {
    /* Colors from Gallery Page */
    --maroon: #800000;
    --gold: #D4AF37;
    --light-gold: #fcf4dd;
    --dark-gray: #333;
    --white: #ffffff;

    /* Colors from Leaderboard Page */
    --mehroon: #800000;
    --dark-mehroon: #600000;
    --bg-light: #fdfaf6;
    --live-green: #4CAF50;

    /* Colors from Voting Page (Premium Darker Shades) */
    --v-maroon: #5D001E;
    --v-gold: #C5A059;
    --v-light-gold: #f4e8d1;
    --glass: rgba(255, 255, 255, 0.95);
}

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light); 
    color: var(--dark-gray);
}

/* =========================================
   PAGE 1: GALLERY STYLES
   ========================================= */

header {
    background: var(--maroon);
    color: var(--white);
    padding: 0.5rem 0;
    border-bottom: 4px solid var(--gold);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 15px;
}

.company-logo {
    height: 60px;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.3));
}

.app-title {
    font-family: 'Georgia', serif;
    font-size: 1.8rem;
    margin: 0;
    color: var(--gold);
    letter-spacing: 1px;
    text-align: center;
}

/* Promo Banner */
.promo-banner {
    background: linear-gradient(135deg, var(--maroon) 0%, #a00000 100%);
    color: white;
    padding: 15px;
    border-radius: 12px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 2px solid var(--gold);
}

.promo-text h2 { margin: 0; font-size: 1.2rem; color: var(--gold); }
.promo-text p { margin: 5px 0 0 0; font-size: 0.9rem; }
.promo-btn {
    background: var(--gold);
    color: var(--maroon);
    padding: 8px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: 0.3s;
}
.promo-btn:hover { background: var(--white); transform: scale(1.05); }

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-bar input, .filter-bar select {
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--gold);
    outline: none;
    background: var(--white);
}

.live-vote-btn {
    background: #ffd600;
    color: #43326b;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.live-wrapper {
    position: relative;
    display: inline-block;
}

.live-dot {
    position: absolute;
    top: 5px;      /* upar adjust karne ke liye */
    left: 7px;    /* side adjust */
    width: 10px;
    height: 10px;
    background-color: red;
    border-radius: 50%;
    animation: blink 1s infinite;
}

/* Blink animation */
@keyframes blink {
    0%   { opacity: 1; }
    50%  { opacity: 0; }
    100% { opacity: 1; }
}

/* Cards Design */
.student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    padding: 30px 0;
}

.card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #eee;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: all 0.4s ease;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 5px;
    background: var(--gold);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(128, 0, 0, 0.15);
}

.art-preview {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.art-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.6s;
}

.card:hover .art-preview img { transform: scale(1.1); }

.rank-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.rank-1 { background: var(--gold); color: var(--maroon); border: 1px solid var(--white); }
.rank-other { background: rgba(0,0,0,0.7); color: white; }

.info { padding: 15px; text-align: center; }
.info h3 { margin: 0; font-size: 1.1rem; color: var(--maroon); font-family: 'Georgia', serif; }
.info p { margin: 5px 0; font-size: 0.85rem; color: #666; }

.stats {
    display: flex;
    border-top: 1px solid #f0f0f0;
    background: #fffcf8;
}

.stat-item {
    flex: 1;
    padding: 12px;
    text-align: center;
    font-size: 0.8rem;
    color: #888;
}

.stat-item span {
    display: block;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--maroon);
}

.vote-btn-container { padding: 15px; background: #fdfdfd; }

.vote-btn {
    display: block;
    text-align: center;
    background: var(--maroon);
    color: var(--white);
    text-decoration: none;
    padding: 12px;
    border-radius: 10px;
    font-weight: bold;
    transition: 0.3s;
    border: 1px solid var(--maroon);
}

.vote-btn:hover {
    background: transparent;
    color: var(--maroon);
}

.vote-btn.disabled {
    background: #ccc;
    border-color: #ccc;
    color: #666;
    pointer-events: none;
}

/* Lightbox */
.modal { 
    display: none; position: fixed; z-index: 10000; left: 0; top: 0; 
    width: 100%; height: 100%; background: rgba(0,0,0,0.95); 
    align-items: center; justify-content: center;
}
.modal-content { max-width: 90%; max-height: 80vh; border: 3px solid var(--gold); border-radius: 8px; }

.loader {
    display: none; width: 50px; height: 50px; border: 5px solid #f3f3f3;
    border-top: 5px solid var(--maroon); border-radius: 50%;
    animation: spin 1s linear infinite; margin: 20px auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }


/* =========================================
   PAGE 2: LEADERBOARD STYLES
   ========================================= */

/* Royal Header (Leaderboard Specific) */
.ss-header {
    background: var(--mehroon);
    color: #f3c927;
    padding: 8px 69px 35px;
    text-align: center;
    border-bottom: 5px solid var(--gold);
    position: relative;
}

.ss-header .brand-logo {
    height: 60px;
    margin-bottom: -11px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.ss-header h1 {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    color: #fbf5b7;
    margin: 5px 0;
    text-transform: uppercase;
}

/* Live Badge & Pulse Animation */
.live-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-left: 10px;
    position: relative;
    top: -5px;
}


@keyframes pulse-animation {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(0, 255, 0, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 0, 0); }
}

/* Mobile Friendly Podium */
.podium-section {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 10px;
    margin: -50px auto 30px;
    max-width: 900px;
    padding: 0 10px;
}

.podium-card {
    background: var(--white);
    border-radius: 15px;
    padding: 20px 10px;
    text-align: center;
    flex: 1;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 1px solid #eee;
    position: relative;
}

.podium-card.rank-1 { 
    height: 260px; 
    border: 2px solid var(--gold); 
    z-index: 2;
    background: linear-gradient(to bottom, var(--white), #fff9e6);
}
.podium-card.rank-2 { height: 220px; }
.podium-card.rank-3 { height: 200px; }

.medal-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.p-name {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--mehroon);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.p-score {
    font-size: 1.5rem;
    font-weight: 900;
    color: #333;
    margin: 5px 0;
}

/* Promo Card */
.promo-card {
    background: var(--white);
    max-width: 900px;
    margin: 20px auto;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 6px solid var(--mehroon);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.promo-card .promo-text h3 { margin: 0; color: var(--mehroon); font-family: 'Cinzel', serif; }
.promo-card .promo-text p { margin: 5px 0 0; font-size: 0.85rem; color: #666; }

.promo-link {
    background: var(--mehroon);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    transition: 0.3s;
}

/* Controls */
.controls {
    max-width: 900px;
    margin: 0 auto;
    padding: 15px;
}

.tabs {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 10px;
    scrollbar-width: none;
}

.tab {
    white-space: nowrap;
    padding: 10px 20px;
    background: #eee;
    border-radius: 10px;
    font-weight: 700;
    color: #666;
    cursor: pointer;
    border: none;
}

.tab.active {
    background: var(--mehroon);
    color: var(--gold);
}

.search-input {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 2px solid #eee;
    font-size: 1rem;
    margin-top: 10px;
    outline: none;
    box-sizing: border-box;
}

/* Leaderboard Table */
.lb-container {
    max-width: 900px;
    margin: 0 auto 50px;
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.lb-row {
    display: grid;
    grid-template-columns: 60px 1fr 100px;
    padding: 15px;
    border-bottom: 1px solid #f9f9f9;
    align-items: center;
}

.lb-row.header {
    background: #f1f1f1;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--mehroon);
}

.r-rank { font-weight: 800; color: #999; }
.r-info { display: flex; align-items: center; gap: 12px; }
.r-img { 
    width: 40px; height: 40px; background: var(--bg-light); 
    border-radius: 50%; display: flex; align-items: center; 
    justify-content: center; font-weight: 800; color: var(--mehroon);
    border: 1px solid var(--gold);
}
.r-score { text-align: right; font-weight: 800; color: var(--mehroon); font-size: 1.1rem; }


/* =========================================
   PAGE 3: VOTING PAGE STYLES (PREMIUM)
   ========================================= */

body.voting-page {
    background: #fdfaf6 url('https://www.transparenttextures.com/patterns/cream-paper.png');
}

/* Premium Header */
.royal-header {
    background: var(--v-maroon);
    padding: 15px;
    text-align: center;
    border-bottom: 4px solid var(--v-gold);
    position: sticky; top: 0; z-index: 1000;
}

.main-wrapper { max-width: 480px; margin: 0 auto; padding: 15px; }

/* Artwork Showcase */
.artwork-container {
    position: relative;
    border-radius: 25px;
    overflow: hidden;
    border: 3px solid var(--v-gold);
    background: #000;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    margin-bottom: -40px; /* Overlap effect */
    z-index: 5;
}

.mySlides { display: none; }
.mySlides img { width: 100%; height: 320px; object-fit: contain; }

/* Interactive Voting Panel */
.voting-panel {
    background: var(--glass);
    border-radius: 35px;
    padding: 50px 25px 30px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.1);
    position: relative;
    z-index: 2;
    border: 1px solid var(--v-light-gold);
}

.artist-title {
    text-align: center;
    font-family: 'Cinzel', serif;
    color: var(--v-maroon);
    font-size: 1.6rem;
    margin-bottom: 5px;
}

/* Point Selector */
.point-selector-wrapper {
    background: #fff;
    padding: 25px 15px;
    border-radius: 20px;
    margin: 20px 0;
    text-align: center;
    border: 1px solid #eee;
}

.score-circle {
    width: 100px;
    height: 100px;
    background: var(--v-maroon);
    color: var(--v-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 3.5rem;
    font-weight: 800;
    border: 5px solid var(--v-light-gold);
    box-shadow: 0 10px 20px rgba(93, 0, 30, 0.2);
    transition: transform 0.2s;
}

input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 10px;
    outline: none;
    margin-top: 20px;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 30px;
    height: 30px;
    background: var(--v-gold);
    border: 4px solid var(--v-maroon);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

/* Auth Box */
/* Full screen center */
.auth-wrapper {
    min-height: 20vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: #f4f6f9; /* optional */
}

/* Card design */
.auth-card {
    width: 100%;
    max-width: 380px;
    background: #ffffff;
    padding: 25px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

/* Title */
.auth-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

/* Icon spacing */
.auth-title i {
    color: #4CAF50;
    margin-right: 8px;
}

/* Phone/email login button center */
.pe_signin_button {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

/* Status text */
#pe_status {
    font-size: 14px;
    color: #555;
    margin-top: 10px;
}

/* Mobile tweak */
@media (max-width: 480px) {
    .auth-card {
        padding: 20px 15px;
    }

    .auth-title {
        font-size: 18px;
    }
}


/* Final Vote Button */
.final-vote-btn {
    width: 100%;
    padding: 20px;
    border: none;
    border-radius: 18px;
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.4s;
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
}

.btn-ready {
    background: linear-gradient(135deg, var(--v-maroon) 0%, #8b002d 100%);
    color: var(--v-gold);
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(93, 0, 30, 0.4);
}
.btn-ready:active { transform: scale(0.97); }

/* Shaadi Sansar Ad */
.ad-banner {
    background: var(--v-maroon);
    border-radius: 20px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    margin-top: 25px;
    border: 2px solid var(--v-gold);
}
.ad-icon {
    background: var(--v-gold);
    width: 50px; height: 50px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: var(--v-maroon); font-size: 1.5rem;
}
.ad-content b { color: var(--v-gold); display: block; font-size: 1rem; }
.ad-content span { color: #fff; font-size: 0.8rem; opacity: 0.8; }

/* Navigation Arrows */
.nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.2); border: none; color: white;
    padding: 10px 15px; border-radius: 50%; cursor: pointer;
}
.next { right: 10px; } .prev { left: 10px; }


/* Responsive Media Queries */
/* Responsive Media Queries */
@media (max-width: 600px) {

    /* Gallery Responsive */
    .promo-banner {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .header-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* Leaderboard Responsive */

    .podium-section{
        display: flex;
        flex-direction: column;   /* ek ke niche ek */
        align-items: center;
        gap: 15px;
    }

    .podium-card{
        width: 100%;              /* full width */
        max-width: 320px;
    }

    /* Rank order */
    .podium-card.rank-1{
        order: 1;
        height: auto;
    }

    .podium-card.rank-2{
        order: 2;
        height: auto;
    }

    .podium-card.rank-3{
        order: 3;
        height: auto;
    }

    /* Promo Card Responsive */
    .promo-card{
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}
