/* ============================================
   STARLIFE VOTE - Design System
   Aesthetic: Bold Afro-Modern / Award Show Energy
   ============================================ */

:root {
    --red:       #D42B2B;
    --red-dark:  #A01E1E;
    --red-glow:  rgba(212, 43, 43, 0.35);
    --gold:      #F0C040;
    --gold-dark: #C09020;
    --navy:      #0A1628;
    --navy-mid:  #112040;
    --white:     #F8F6F2;
    --gray-100:  #EEE;
    --gray-300:  #BBBBBB;
    --gray-500:  #777;
    --surface:   #FFFFFF;
    --bg:        #F2F0ED;
    --shadow-sm: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 32px rgba(0,0,0,0.13);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.18);
    --radius:    16px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--navy);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── NAVBAR ─────────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--navy);
    border-bottom: 3px solid var(--red);
    box-shadow: 0 4px 24px rgba(10,22,40,0.5);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.logo-star {
    font-size: 28px;
    color: var(--gold);
    filter: drop-shadow(0 0 8px var(--gold));
    animation: starPulse 2s ease-in-out infinite;
}

@keyframes starPulse {
    0%, 100% { filter: drop-shadow(0 0 6px var(--gold)); }
    50%       { filter: drop-shadow(0 0 16px var(--gold)); }
}

.logo-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 28px;
    letter-spacing: 4px;
    color: var(--white);
}

.logo-accent {
    color: var(--gold);
    font-style: italic;
}

.nav-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
    letter-spacing: 3px;
    color: var(--white);
    opacity: 0.85;
    text-align: center;
    flex: 1;
    padding: 0 20px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--white);
    transition: var(--transition);
}

.nav-mobile-menu {
    display: none;
    flex-direction: column;
    background: var(--navy-mid);
    padding: 12px 24px 20px;
    gap: 12px;
}

.nav-mobile-menu a {
    color: var(--white);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

@media (max-width: 640px) {
    .nav-toggle { display: flex; }
    .nav-title { font-size: 15px; }
    .nav-mobile-menu.open { display: flex; }
}

/* ── PAGE HERO ───────────────────────────────── */
.page-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 50%, var(--red-dark) 100%);
    padding: 60px 24px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 60% 50% at 20% 50%, rgba(212,43,43,0.2) 0%, transparent 70%),
        radial-gradient(ellipse 40% 60% at 80% 50%, rgba(240,192,64,0.1) 0%, transparent 70%);
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--red), var(--gold), var(--red));
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.page-hero .hero-tag {
    display: inline-block;
    background: var(--red);
    color: white;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 5px 16px;
    border-radius: 20px;
    margin-bottom: 16px;
    position: relative;
}

.page-hero h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(36px, 6vw, 72px);
    letter-spacing: 4px;
    color: var(--white);
    line-height: 1;
    position: relative;
}

.page-hero h1 span {
    color: var(--gold);
}

.page-hero p {
    color: rgba(255,255,255,0.65);
    font-size: 15px;
    margin-top: 12px;
    position: relative;
}

/* ── CONTAINER ───────────────────────────────── */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px;
}

/* ── SECTION TITLES ──────────────────────────── */
.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 36px;
}

.section-header h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 28px;
    letter-spacing: 3px;
    color: var(--navy);
}

.section-badge {
    background: var(--red);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    letter-spacing: 1px;
}

.section-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--red) 0%, transparent 100%);
    border-radius: 2px;
}

/* ── CARDS GRID ──────────────────────────────── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

/* ── EVENT CARD ──────────────────────────────── */
.event-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
    position: relative;
}

.event-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.event-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--red) 0%, var(--navy) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    font-family: 'Bebas Neue', sans-serif;
    color: rgba(255,255,255,0.2);
    letter-spacing: 4px;
}

.event-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-card-body {
    padding: 24px;
}

.event-card-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.event-card-status .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #16a34a;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

.event-card h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    letter-spacing: 2px;
    color: var(--navy);
    margin-bottom: 10px;
    line-height: 1.2;
}

.event-card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.event-card-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
}

.event-card-meta .icon {
    font-size: 14px;
}

.event-card p {
    font-size: 13.5px;
    color: var(--gray-500);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ── BUTTONS ─────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.15);
    opacity: 0;
    transition: var(--transition);
}

.btn:hover::after { opacity: 1; }

.btn-primary {
    background: var(--red);
    color: white;
    box-shadow: 0 4px 20px var(--red-glow);
}

.btn-primary:hover {
    background: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px var(--red-glow);
}

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

.btn-secondary:hover {
    background: var(--navy-mid);
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    background: var(--navy);
    color: white;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy);
    font-weight: 800;
    box-shadow: 0 4px 20px rgba(240,192,64,0.3);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(240,192,64,0.5);
}

.btn-sm { padding: 8px 16px; font-size: 12px; }
.btn-lg { padding: 16px 36px; font-size: 15px; }
.btn-full { width: 100%; justify-content: center; }

.btn-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ── CATEGORY CARD ───────────────────────────── */
.category-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

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

.category-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--red), var(--navy));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.category-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card-body {
    padding: 20px;
}

.category-card h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 18px;
    letter-spacing: 2px;
    color: var(--navy);
    margin-bottom: 10px;
}

.category-card p {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.6;
    margin-bottom: 16px;
}

/* ── CANDIDATE CARD ──────────────────────────── */
.candidate-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 2px solid transparent;
}

.candidate-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--red);
}

.candidate-card-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--red-dark) 100%);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.candidate-code {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    color: var(--gold);
    font-weight: 700;
    letter-spacing: 2px;
}

.candidate-votes-badge {
    background: rgba(255,255,255,0.15);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.candidate-card-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
}

.candidate-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.candidate-card-body {
    padding: 20px;
}

.candidate-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    letter-spacing: 2px;
    color: var(--navy);
    margin-bottom: 6px;
}

.candidate-profession {
    font-size: 13px;
    color: var(--gray-500);
    font-style: italic;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* ── TENDANCE / LEADERBOARD ──────────────────── */
.tendance-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-md);
    max-width: 800px;
    margin: 0 auto;
}

.tendance-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 24px;
    letter-spacing: 3px;
    color: var(--navy);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tendance-title::before {
    content: '📊';
    font-size: 22px;
}

.tendance-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-100);
    transition: var(--transition);
    cursor: pointer;
}

.tendance-item:last-child { border-bottom: none; }

.tendance-item:hover { background: rgba(212,43,43,0.03); }

.tendance-rank {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 32px;
    width: 40px;
    text-align: center;
    line-height: 1;
}

.tendance-rank.rank-1 { color: var(--gold); }
.tendance-rank.rank-2 { color: var(--gray-300); }
.tendance-rank.rank-3 { color: #CD7F32; }

.tendance-avatar {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--red), var(--navy));
}

.tendance-avatar img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    object-position: top center;
    border-radius: 10px;
    display: block;
}

.tendance-info {
    flex: 1;
}

.tendance-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--navy);
}

.tendance-label {
    font-size: 12px;
    color: var(--gray-500);
    font-family: 'Space Mono', monospace;
    margin-top: 2px;
}

.tendance-vote-count {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--red);
    text-align: right;
}

.tendance-bar-wrap {
    width: 100%;
    height: 4px;
    background: var(--gray-100);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.tendance-bar {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--red), var(--gold));
    transition: width 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── VOTE DETAIL PAGE ────────────────────────── */
.vote-detail {
    max-width: 700px;
    margin: 0 auto;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.vote-detail-hero {
    background: linear-gradient(135deg, var(--navy), var(--red-dark));
    padding: 28px;
    text-align: center;
}

.vote-detail-hero .code-label {
    font-family: 'Space Mono', monospace;
    color: var(--gold);
    font-size: 13px;
    letter-spacing: 3px;
    margin-bottom: 8px;
}

.vote-detail-hero h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 30px;
    color: white;
    letter-spacing: 3px;
}

.vote-detail-hero .vote-count {
    color: rgba(255,255,255,0.65);
    font-size: 14px;
    margin-top: 8px;
}

.vote-detail-image {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    background: var(--gray-100);
}

.vote-detail-image img {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
}

.vote-detail-body {
    padding: 32px;
}

.candidate-info-grid {
    display: grid;
    gap: 8px;
    margin-bottom: 28px;
}

.candidate-info-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 14px;
}

.candidate-info-row strong {
    color: var(--gray-500);
    min-width: 100px;
    font-weight: 600;
}

.candidate-info-row span {
    color: var(--navy);
    font-weight: 500;
}

/* ── VOTE FORM ───────────────────────────────── */
.vote-form {
    background: linear-gradient(135deg, rgba(212,43,43,0.04), rgba(240,192,64,0.04));
    border: 2px solid rgba(212,43,43,0.15);
    border-radius: var(--radius-sm);
    padding: 24px;
}

.vote-form-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
    letter-spacing: 2px;
    color: var(--navy);
    margin-bottom: 20px;
}

.vote-input-group {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.price-badge {
    background: var(--navy);
    color: var(--gold);
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.vote-qty-input {
    flex: 1;
    min-width: 80px;
    padding: 12px 16px;
    border: 2px solid var(--gray-100);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-family: 'Space Mono', monospace;
    text-align: center;
    font-weight: 700;
    color: var(--navy);
    transition: var(--transition);
    outline: none;
}

.vote-qty-input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 4px var(--red-glow);
}

.vote-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-top: 1px dashed var(--gray-100);
    margin-top: 8px;
}

.vote-total-label {
    color: var(--gray-500);
    font-size: 14px;
}

.vote-total-amount {
    font-family: 'Space Mono', monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--red);
}

/* ── ALERTS / TOAST ──────────────────────────── */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(34,197,94,0.1);
    color: #16a34a;
    border: 1px solid rgba(34,197,94,0.3);
}

.alert-error {
    background: rgba(212,43,43,0.1);
    color: var(--red);
    border: 1px solid rgba(212,43,43,0.3);
}

.toast-container {
    position: fixed;
    bottom: 32px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--navy);
    color: white;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    min-width: 260px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    border-left: 4px solid var(--gold);
}

.toast.success { border-left-color: #22c55e; }
.toast.error   { border-left-color: var(--red); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(60px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── STATS BAR ───────────────────────────────── */
.stats-bar {
    display: flex;
    gap: 24px;
    background: var(--navy);
    padding: 20px 32px;
    border-radius: var(--radius);
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 32px;
    color: var(--gold);
    letter-spacing: 2px;
    line-height: 1;
}

.stat-label {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 4px;
}

/* ── BACK LINK ───────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-500);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 28px;
    transition: var(--transition);
}

.back-link:hover { color: var(--red); }

/* ── EMPTY STATE ─────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 80px 32px;
}

.empty-state .icon { font-size: 64px; margin-bottom: 16px; }
.empty-state h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 24px;
    letter-spacing: 2px;
    color: var(--navy);
    margin-bottom: 8px;
}
.empty-state p { color: var(--gray-500); font-size: 14px; }

/* ── FOOTER ──────────────────────────────────── */
.footer {
    background: var(--navy);
    border-top: 3px solid var(--red);
    padding: 32px 24px;
    margin-top: 80px;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-copy {
    color: rgba(255,255,255,0.45);
    font-size: 13px;
}

.footer-contact {
    color: rgba(255,255,255,0.55);
    font-size: 13px;
}

/* ── ANIMATIONS ──────────────────────────────── */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    animation: fadeUp 0.6s ease forwards;
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 768px) {
    .cards-grid { grid-template-columns: 1fr; }
    .stats-bar { justify-content: space-around; }
    .vote-input-group { flex-direction: column; }
    .vote-qty-input { width: 100%; }
    .tendance-card { padding: 20px; }
    .btn-row { flex-direction: column; }
    .btn-row .btn { width: 100%; justify-content: center; }
    .footer-container { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .container { padding: 28px 16px; }
    .page-hero { padding: 40px 16px 32px; }
    .candidate-card-image { height: 220px; }
}
