/* ================================
   RESET & BASE
================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f5f7fa;
    color: #1e293b;
    line-height: 1.5;
}

.container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ================================
   NAVBAR - PREMIUM BRANDING
================================ */
.navbar {
    background: #0f172a;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Logo wrapper - premium and prominent */
.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-img {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 4px solid rgba(192, 132, 252, 0.30);
    box-shadow: 0 4px 18px rgba(139, 92, 246, 0.25);
}

.logo-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

/* 3-COLOR FLASHING GRADIENT ANIMATION FOR LOGO NAME
   Purple/Blue → Gold/Pink → Green/Teal */
.logo-name {
    font-size: clamp(2.2rem, 3.5vw, 3.5rem);
    font-weight: 900;
    letter-spacing: -1.5px;
    text-transform: none;
    text-shadow: 0 2px 12px rgba(96, 165, 250, 0.18);
    background: linear-gradient(135deg, #c084fc, #60a5fa);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    white-space: nowrap;
    animation: gradientFlash3Color 10s ease-in-out infinite;
}

@keyframes gradientFlash3Color {
    0% {
        background: linear-gradient(135deg, #c084fc, #60a5fa);
        background-clip: text;
        -webkit-background-clip: text;
    }
    33% {
        background: linear-gradient(135deg, #fbbf24, #ec4899);
        background-clip: text;
        -webkit-background-clip: text;
    }
    66% {
        background: linear-gradient(135deg, #10b981, #06b6d4);
        background-clip: text;
        -webkit-background-clip: text;
    }
    100% {
        background: linear-gradient(135deg, #c084fc, #60a5fa);
        background-clip: text;
        -webkit-background-clip: text;
    }
}

.logo-tagline {
    font-size: clamp(1rem, 1.2vw, 1.3rem);
    font-weight: 800;
    color: #cbd5e1;
    letter-spacing: 0.08em;
    margin-top: 6px;
    white-space: nowrap;
    text-transform: uppercase;
    opacity: 0.92;
}

/* Respect user's preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .logo-name {
        animation: none;
        background: linear-gradient(135deg, #c084fc, #60a5fa);
        background-clip: text;
        -webkit-background-clip: text;
    }
}

/* Navigation links - HORIZONTAL ROW (NO HAMBURGER) */
.nav-links {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    padding: 8px 14px;
    border-radius: 40px;
    font-size: 13px;
}

.nav-links a i {
    font-size: 14px;
}

.nav-links a:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

/* ========================================
   DISTINCT MENU STYLES (Light Purple Base)
   Each menu has unique background color
   Text color matches header (#e2e8f0)
======================================== */

/* HOME + PROFILE */
.nav-dashboard,
.nav-profile {
    background: linear-gradient(135deg, #581c87, #7e22ce);
    border: 1px solid rgba(192, 132, 252, 0.25);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(126, 34, 206, 0.28);
}

.nav-dashboard:hover,
.nav-profile:hover {
    background: linear-gradient(135deg, #6b21a8, #9333ea);
}

/* POLL BALLOTS + WALLET */
.nav-ballots,
.nav-wallet {
    background: linear-gradient(135deg, #92400e, #d97706);
    border: 1px solid rgba(251, 191, 36, 0.25);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.25);
}

.nav-ballots:hover,
.nav-wallet:hover {
    background: linear-gradient(135deg, #b45309, #f59e0b);
}

/* LAUNCH + SPONSOR HUB */
.nav-launch,
.nav-pollhub {
    background: linear-gradient(135deg, #065f46, #059669);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
}

.nav-launch:hover,
.nav-pollhub:hover {
    background: linear-gradient(135deg, #047857, #10b981);
}

/* REFERRAL + LEADERBOARD */
.nav-referral,
.nav-leaderboard {
    background: linear-gradient(135deg, #991b1b, #dc2626);
    border: 1px solid rgba(248, 113, 113, 0.25);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.28);
}

.nav-referral:hover,
.nav-leaderboard:hover {
    background: linear-gradient(135deg, #b91c1c, #ef4444);
}

/* RESULTS + AI */
.nav-results,
.nav-analytics {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    border: 1px solid rgba(96, 165, 250, 0.25);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

.nav-results:hover,
.nav-analytics:hover {
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
}

/* ADMIN */
.nav-admin {
    background: linear-gradient(135deg, #7f1d1d, #581c87);
    border: 1px solid rgba(192, 132, 252, 0.25);
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.30);
}

.nav-admin:hover {
    background: linear-gradient(135deg, #991b1b, #6d28d9);
}

/* LOGOUT */
.nav-logout {
    background: linear-gradient(135deg, #7f1d1d, #581c87);
    border: 1px solid rgba(192, 132, 252, 0.25);
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.30);
}

.nav-logout:hover {
    background: linear-gradient(135deg, #991b1b, #6d28d9);
}

/* ========================================
   LOGIN
======================================== */
.nav-links a[href*="login.php"] {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    border: 1px solid rgba(45, 212, 191, 0.25);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(20, 184, 166, 0.25);
}

.nav-links a[href*="login.php"]:hover {
    background: linear-gradient(135deg, #0d9488, #2dd4bf);
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.08);
}

/* ========================================
   REGISTER
======================================== */
.nav-links a[href*="register.php"] {
    background: linear-gradient(135deg, #4338ca, #6366f1);
    border: 1px solid rgba(129, 140, 248, 0.25);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.28);
}

.nav-links a[href*="register.php"]:hover {
    background: linear-gradient(135deg, #4f46e5, #818cf8);
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.08);
}

/* NOTIFICATIONS - LIGHT PINK PREMIUM STYLE */
.nav-notification a {
    background: linear-gradient(135deg, #f9a8d4, #fbcfe8);
    border: 1px solid rgba(244, 114, 182, 0.35);
    color: #7a284f !important;
    box-shadow: 0 4px 14px rgba(244, 114, 182, 0.22);
    position: relative;
}

/* Keep icon + text darker for contrast */
.nav-notification a i,
.nav-notification a span {
    color: #7a284f !important;
    font-weight: 700;
}

/* Hover = lighter version of same pink */
.nav-notification a:hover {
    background: linear-gradient(135deg, #fbcfe8, #fce7f3);
    border-color: rgba(244, 114, 182, 0.45);
    box-shadow: 0 6px 18px rgba(244, 114, 182, 0.30);
    transform: translateY(-2px);
}

/* Notification badge */
.nav-notification {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-notification .badge {
    position: absolute;
    top: -7px;
    right: -5px;
    background: #dc2626;
    color: #ffffff;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 800;
    min-width: 20px;
    text-align: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 10px rgba(220, 38, 38, 0.45);
    z-index: 5;
}

.nav-links a:hover {
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.08);
}

.nav-links a {
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}

/* ========================================
   GLOBAL PREMIUM MENU EFFECT
======================================== */
.nav-links a {
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.nav-links a i,
.nav-links a span {
    color: #ffffff;
}

.nav-links a:hover {
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.08);
}

/* ========================================
   PREMIUM GLOW EFFECT
======================================== */
.nav-dashboard:hover,
.nav-profile:hover {
    box-shadow: 0 6px 18px rgba(147, 51, 234, 0.38);
}

.nav-ballots:hover,
.nav-wallet:hover {
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35);
}

.nav-launch:hover,
.nav-pollhub:hover {
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}

.nav-referral:hover,
.nav-leaderboard:hover {
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35);
}

.nav-results:hover,
.nav-analytics:hover {
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.35);
}

.nav-notification a:hover {
    box-shadow: 0 6px 18px rgba(249, 115, 22, 0.35);
}

.nav-admin:hover {
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.40);
}

.nav-logout:hover {
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.40);
}

.nav-links a[href*="login.php"]:hover {
    box-shadow: 0 6px 18px rgba(45, 212, 191, 0.35);
}

.nav-links a[href*="register.php"]:hover {
    box-shadow: 0 6px 18px rgba(129, 140, 248, 0.35);
}




/* ================================
   RESPONSIVE BRANDING
================================ */

/* Large Desktop */
@media (min-width: 1400px) {
    .logo-img {
        width: 90px;
        height: 90px;
    }
    .logo-name {
        font-size: 3.8rem;
    }
    .logo-tagline {
        font-size: 1.4rem;
    }
    .nav-links a {
        padding: 10px 18px;
        font-size: 14px;
    }
    .nav-links a i {
        font-size: 14px;
    }
}

/* Desktop */
@media (max-width: 1400px) {
    .logo-img {
        width: 80px;
        height: 80px;
    }
    .logo-name {
        font-size: clamp(2rem, 3.2vw, 3.2rem);
    }
    .logo-tagline {
        font-size: clamp(0.95rem, 1.1vw, 1.2rem);
    }
}

/* Small Desktop / Tablet Landscape */
@media (max-width: 992px) {
    .navbar-inner {
        gap: 12px;
    }
    .nav-links {
        gap: 0.3rem;
    }
    .nav-links a {
        padding: 6px 10px;
        font-size: 12px;
    }
    .nav-links a i {
        font-size: 12px;
    }
    .logo-img {
        width: 72px;
        height: 72px;
    }
    .logo-name {
        font-size: clamp(1.8rem, 2.5vw, 2.5rem);
    }
    .logo-tagline {
        font-size: clamp(0.85rem, 1vw, 1rem);
    }
}

/* Tablet Portrait */
@media (max-width: 768px) {
    .navbar {
        padding: 0.8rem 0;
    }
    .navbar-inner {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    .logo {
        justify-content: center;
        width: 100%;
    }
    .logo-img {
        width: 70px;
        height: 70px;
    }
    .logo-name {
        font-size: 2.2rem;
    }
    .logo-tagline {
        font-size: 0.95rem;
    }
    .nav-links {
        justify-content: center;
        width: 100%;
        gap: 0.4rem;
    }
    .nav-links a {
        padding: 6px 10px;
        font-size: 12px;
    }
    .nav-links a i {
        font-size: 12px;
    }
    .footer-links {
        gap: 1rem;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .dashboard-stats {
        flex-direction: column;
    }
    .footer-links a {
        font-size: 11px;
    }
}

/* Mobile Landscape */
@media (max-width: 576px) {
    .logo-img {
        width: 65px;
        height: 65px;
    }
    .logo-name {
        font-size: 1.8rem;
    }
    .logo-tagline {
        font-size: 0.8rem;
    }
    .nav-links {
        gap: 0.3rem;
    }
    .nav-links a {
        padding: 5px 8px;
        font-size: 12px;
    }
    .nav-links a i {
        font-size: 11px;
        margin-right: 2px;
    }
    .nav-links a span {
        font-size: 11px;
    }
    .nav-notification .badge {
        position: absolute;
        top: -4px;
        right: -4px;
        padding: 1px 5px;
        font-size: 10px;
        min-width: 14px;
    }
    .footer-links a {
        font-size: 9px;
        padding: 4px 8px;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    .logo-img {
        width: 64px;
        height: 64px;
    }
    .logo-name {
        font-size: 1.7rem;
    }
    .logo-tagline {
        font-size: 0.8rem;
        letter-spacing: 0.1rem;
    }
    .nav-links {
        gap: 0.2rem;
    }
    .nav-links a {
        padding: 4px 6px;
        font-size: 12px;
    }
    .nav-links a i {
        font-size: 12px;
    }
    .nav-links a span {
        font-size: 12px;
    }
    .nav-notification .badge {
        top: -3px;
        right: -2px;
        padding: 1px 4px;
        font-size: 10px;
        min-width: 12px;
    }
    .footer-links {
        gap: 0.5rem;
    }
    .footer-links a {
        font-size: 9px;
        padding: 3px 6px;
    }
}

/* ================================
   MAIN & FOOTER
================================ */
main {
    min-height: calc(100vh - 160px);
    margin: 2rem 0;
}

footer {
    background: #0f172a;
    color: #ffffff;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 40px;
}

.footer-links a:hover {
    color: white;
    background: rgba(255,255,255,0.1);
    transform: translateY(-1px);
}

.footer-links svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
}

/* Social links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-links a {
    color: #94a3b8;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.social-links a:hover {
    color: white;
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.social-links svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ================================
   ALERTS
================================ */
.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid;
    position: relative;
}

.alert-success { background: #d4edda; color: #155724; border-left-color: #28a745; }
.alert-danger  { background: #fee2e2; color: #721c24; border-left-color: #ef4444; }
.alert-warning { background: #fff3cd; color: #856404; border-left-color: #ffc107; }
.alert-info    { background: #d1ecf1; color: #0c5460; border-left-color: #17a2b8; }

.alert .close-btn {
    float: right;
    cursor: pointer;
    font-size: 20px;
    opacity: 0.6;
}

.alert .close-btn:hover {
    opacity: 1;
}

/* ================================
   FORMS
================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139,92,246,0.1);
}

/* ================================
   BUTTONS
================================ */
.btn {
    display: inline-block;
    background: #334155;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    font-weight: 500;
}

.btn-primary { background: linear-gradient(135deg, #667eea, #764ba2); }
.btn-danger  { background: #dc3545; }
.btn-secondary { background: #6c757d; }
.btn-sm { padding: 0.25rem 0.75rem; font-size: 12px; }

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(0.95);
}

/* ================================
   TABLES
================================ */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.table th,
.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.table th {
    background: #f8fafc;
    font-weight: 600;
}

/* ================================
   CARDS & DASHBOARD
================================ */
.dashboard-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    flex: 1;
    min-width: 180px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.big-number {
    font-size: 2rem;
    font-weight: 700;
}

/* ================================
   ROUND CARDS
================================ */
.round-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.round-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.round-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

/* ================================
   QUESTION CARDS
================================ */
.question-card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
}

/* ================================
   UTILITIES
================================ */
.text-muted { color: #6c757d; }

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}
.pagination .active {
    background: #8b5cf6;
    color: white;
}
.pagination a {
    padding: 6px 12px;
    border-radius: 8px;
    background: white;
    text-decoration: none;
    color: #1e293b;
}
