/* =====================================================
   PREMIUM DARK + GOLD THEME
   Luxury / Casino / Apple-like
===================================================== */

:root {
    --bg-page: #0b0b0b;
    --bg-card: #111;
    --bg-elevated: #1a1a1a;
    --gold-primary: #d4af37;
    --gold-light: #f5c542;
    --gold-dark: #c9a227;
    --gold-glow: rgba(212, 175, 55, 0.25);
    --gold-glow-strong: rgba(212, 175, 55, 0.4);
    --text-primary: #f5f5f5;
    --text-muted: #a3a3a3;
    --border-gold: rgba(212, 175, 55, 0.35);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --radius: 14px;
    --radius-pill: 9999px;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* =====================================================
   RESET & BASE
===================================================== */

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

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

/* =====================================================
   GLOBAL GOLD GLOW BACKGROUND
===================================================== */

body::before {
    content: "";
    position: fixed;
    width: 520px;
    height: 520px;
    left: -180px;
    top: -180px;
    background: radial-gradient(circle, var(--gold-primary), transparent 60%);
    filter: blur(110px);
    animation: moveGlow 12s infinite alternate;
    pointer-events: none;
    opacity: 0.12;
    z-index: 0;
}

body::after {
    content: "";
    position: fixed;
    width: 520px;
    height: 520px;
    right: -180px;
    bottom: -180px;
    background: radial-gradient(circle, var(--gold-light), transparent 60%);
    filter: blur(110px);
    animation: moveGlow2 14s infinite alternate;
    pointer-events: none;
    opacity: 0.08;
    z-index: 0;
}

@keyframes moveGlow {
    from { transform: translate(0, 0); }
    to { transform: translate(140px, 120px); }
}

@keyframes moveGlow2 {
    from { transform: translate(0, 0); }
    to { transform: translate(-140px, -120px); }
}

.main-content,
.main-footer {
    position: relative;
    z-index: 2;
}

/* =====================================================
   EVENTS SECTION (homepage)
===================================================== */

.events-section {
    margin-bottom: 32px;
    padding: 18px 18px 22px;
    border-radius: 18px;
    background:
        radial-gradient(circle at top left, rgba(212,175,55,0.18), transparent 55%),
        radial-gradient(circle at bottom right, rgba(56,189,248,0.22), transparent 55%),
        rgba(11,11,11,0.96);
    border: 1px solid rgba(212,175,55,0.35);
    box-shadow: 0 18px 50px rgba(0,0,0,0.65);
    animation: eventsGlow 6s ease-in-out infinite;
}

.events-section .section-title {
    margin: 0 0 16px;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.event-card {
    background: #111218;
    border-radius: 14px;
    border: 1px solid rgba(212,175,55,0.22);
    padding: 18px 18px 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.event-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-prize {
    font-size: 13px;
    color: var(--gold-primary);
    margin: 0 0 6px;
}

.event-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 10px;
}

.event-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 10px;
}

.event-progress {
    margin-bottom: 12px;
}

.event-progress-track {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(148,163,184,0.25);
    overflow: hidden;
}

.event-progress-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold-primary));
    box-shadow: 0 0 12px var(--gold-glow);
}

.event-progress-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.event-btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
    color: #000;
    text-decoration: none;
    transition: transform 0.2s var(--ease), box-shadow 0.2s;
}

.event-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 18px var(--gold-glow);
}

.event-btn.joined {
    background: rgba(34,197,94,0.15);
    color: #4ade80;
    box-shadow: none;
    cursor: default;
}

.event-btn.verify {
    background: linear-gradient(135deg, #2563eb, #60a5fa) !important;
    color: #ffffff !important;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.7);
    border-color: rgba(212,175,55,0.4);
}

.event-btn:not(.joined) {
    animation: eventBtnPulse 3.8s ease-in-out infinite;
}

@keyframes eventsGlow {
    0%, 100% {
        box-shadow: 0 18px 50px rgba(0,0,0,0.65);
        border-color: rgba(212,175,55,0.35);
    }
    50% {
        box-shadow: 0 22px 60px rgba(0,0,0,0.85);
        border-color: rgba(212,175,55,0.6);
    }
}

@keyframes eventBtnPulse {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 0 12px rgba(212,175,55,0.45);
    }
    50% {
        transform: translateY(-1px) scale(1.01);
        box-shadow: 0 0 20px rgba(234,179,8,0.7);
    }
}

.event-icon-badge {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:22px;
    height:22px;
    border-radius:999px;
    background: rgba(212,175,55,0.18);
    font-size:13px;
}

.event-free-pill {
    margin-left:auto;
    font-size:11px;
    padding:3px 9px;
    border-radius:999px;
    background: rgba(34,197,94,0.16);
    color:#4ade80;
    border:1px solid rgba(34,197,94,0.5);
    text-transform:uppercase;
    letter-spacing:0.06em;
}

.event-line-icon {
    opacity:0.8;
}

.event-card-critical {
    border-color: rgba(248,113,113,0.6);
    box-shadow: 0 14px 34px rgba(248,113,113,0.35);
}

.event-progress-critical .event-progress-track {
    background: rgba(248,113,113,0.25);
}

.event-progress-critical .event-progress-fill {
    background: linear-gradient(90deg, #ef4444, #f97316);
    box-shadow: 0 0 16px rgba(248,113,113,0.9);
    animation: criticalPulse 1.4s ease-in-out infinite;
}

@keyframes criticalPulse {
    0%, 100% {
        transform: scaleX(1);
    }
    50% {
        transform: scaleX(1.02);
    }
}

.products-warning-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 16px;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1.35;
    text-transform: uppercase;
    color: #fecaca;
    background: rgba(127, 29, 29, 0.45);
    border: 1px solid rgba(248, 113, 113, 0.7);
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.45);
    animation: productsWarningPulse 2.2s ease-in-out infinite;
}

@keyframes productsWarningPulse {
    0%, 100% {
        box-shadow: 0 0 16px rgba(239, 68, 68, 0.45);
        transform: scale(1);
        border-color: rgba(248, 113, 113, 0.7);
    }
    50% {
        box-shadow: 0 0 28px rgba(239, 68, 68, 0.9);
        transform: scale(1.01);
        border-color: rgba(252, 165, 165, 0.95);
    }
}

@media (max-width: 768px) {
    .products-warning-badge {
        display: flex;
        border-radius: 14px;
        font-size: 11px;
        padding: 10px 12px;
    }
}

/* =====================================================
   IMPERSONATION BANNER (admin "Conectează-te ca")
===================================================== */

.impersonation-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 16px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.25), rgba(184, 134, 11, 0.2));
    border-bottom: 1px solid var(--border-gold);
    font-size: 14px;
    z-index: 999998;
}
.impersonation-text { color: var(--text-primary); }
.impersonation-text strong { color: var(--gold-primary); }
.impersonation-exit {
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s, box-shadow 0.2s;
}
.impersonation-exit:hover {
    background: rgba(212, 175, 55, 0.15);
    box-shadow: 0 0 12px var(--gold-glow);
}

/* =====================================================
   HEADER — PREMIUM DARK + GOLD
===================================================== */

.main-header {
    position: sticky;
    top: 0;
    width: 100%;
    background: rgba(11, 11, 11, 0.85);
    border-bottom: 1px solid var(--border-gold);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 999999;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.header-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
}

.logo a {
    font-size: 22px;
    font-weight: 900;
    text-decoration: none;
    margin: 10px 0;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.nav-left,
.nav-right {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
}

.nav-left a,
.nav-right a {
    text-align: center;
    padding: 10px 16px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius);
    transition: transform 0.25s var(--ease), background 0.25s, box-shadow 0.25s;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
}

.nav-left a:hover,
.nav-right a:hover {
    transform: translateY(-2px);
    background: rgba(26, 26, 26, 0.95);
    border-color: var(--border-gold);
    box-shadow: 0 0 20px var(--gold-glow);
}

.btn-primary {
    border: none !important;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-light)) !important;
    color: #0b0b0b !important;
    font-weight: 800;
    box-shadow: 0 0 20px var(--gold-glow);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 28px var(--gold-glow-strong);
}

.btn-outline {
    border: 1px solid var(--border-gold) !important;
    color: var(--gold-light) !important;
    font-weight: 700;
    background: rgba(26, 26, 26, 0.6);
}

.btn-outline:hover {
    background: rgba(212, 175, 55, 0.12);
    box-shadow: 0 0 16px var(--gold-glow);
}

/* =====================================================
   CARDS — PREMIUM GOLD BORDER & GLOW
===================================================== */

.wallpaper-card,
.stat-card,
.form-box,
.dash-section,
.preview-card,
.buy-box,
.empty-box,
.wmc-winner-card,
.wallpaper-card.alert,
.wallpaper-card.sold-out {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-gold) !important;
    border-radius: var(--radius) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35), 0 0 20px var(--gold-glow) !important;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.wallpaper-card:hover,
.stat-card:hover,
.wmc-winner-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 28px var(--gold-glow-strong) !important;
}

.card-entry-note {
    margin: 8px 0 6px;
    font-size: 12px;
    color: #d1d5db;
    line-height: 1.4;
}

.card-prize-note {
    margin: 0 0 10px;
    font-size: 13px;
    color: #fbbf24;
    line-height: 1.35;
}

.card-prize-note strong {
    color: #fde68a;
}

/* =====================================================
   BUTTONS — GOLD GRADIENT
===================================================== */

button[type="submit"],
.card-btn,
.buy-btn,
.btn-primary,
input[type="submit"] {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-light)) !important;
    color: #0b0b0b !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: var(--radius) !important;
    box-shadow: 0 0 20px var(--gold-glow) !important;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease) !important;
}

button[type="submit"]:hover:not(:disabled),
.card-btn:hover:not(:disabled),
.buy-btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 0 28px var(--gold-glow-strong) !important;
}

/* =====================================================
   PROGRESS BARS — DARK + GOLD FILL & GLOW
===================================================== */

.progress-wrapper,
.progress,
.progress-wrap .progress {
    background: var(--bg-elevated) !important;
    border-radius: var(--radius-pill) !important;
    overflow: hidden;
}

.progress-fill,
.progress-bar {
    background: linear-gradient(90deg, var(--gold-dark), var(--gold-primary), var(--gold-light)) !important;
    border-radius: var(--radius-pill) !important;
    box-shadow: 0 0 15px var(--gold-glow) !important;
    animation: progressGlow 2.5s ease-in-out infinite;
}

@keyframes progressGlow {
    0%, 100% { opacity: 1; box-shadow: 0 0 15px var(--gold-glow); }
    50% { opacity: 0.95; box-shadow: 0 0 22px var(--gold-glow-strong); }
}

/* =====================================================
   BADGES — PILL + GOLD GLOW
===================================================== */

.badge,
.badge-live,
.badge-alert,
.badge-draw,
.badge-sold,
.badge-work,
.sold-message,
.draw-badge {
    border-radius: var(--radius-pill) !important;
    font-weight: 700 !important;
    box-shadow: 0 0 16px var(--gold-glow) !important;
    border: 1px solid var(--border-gold) !important;
}

.badge-live {
    background: rgba(212, 175, 55, 0.15) !important;
    color: var(--gold-light) !important;
}

.badge-work,
.badge-alert {
    background: rgba(26, 26, 26, 0.95) !important;
    color: #f87171 !important;
    border-color: rgba(248, 113, 113, 0.4) !important;
    box-shadow: 0 0 16px rgba(248, 113, 113, 0.2) !important;
}

.badge-draw {
    background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)) !important;
    color: #0b0b0b !important;
}

.badge-sold {
    background: var(--bg-elevated) !important;
    color: var(--text-muted) !important;
}

/* =====================================================
   RAFFLE IMAGE (SAFE OVERRIDE)
===================================================== */

img.main-image,
.gallery img {
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}

img.main-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    padding: 0 !important;
}

@media (min-width: 900px) {
    img.main-image {
        height: 500px;
    }
}

/* =====================================================
   DESKTOP LAYOUT
===================================================== */

@media (min-width: 768px) {
    .main-header {
        position: fixed;
    }

    .header-container {
        flex-direction: row;
        justify-content: space-between;
    }

    .nav-left,
    .nav-right {
        flex-direction: row;
        width: auto;
    }

    .main-content {
        padding-top: 90px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .wallpaper-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .admin-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .orders-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tickets-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .winners-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =====================================================
   GLOBAL TEXT & LINKS
===================================================== */

a {
    color: var(--gold-light);
    transition: color 0.2s;
}

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

h1, h2, h3 {
    color: var(--text-primary);
}

/* Inputs — dark with gold focus */
input:not([type="submit"]):focus,
select:focus,
textarea:focus {
    border-color: var(--gold-primary) !important;
    box-shadow: 0 0 0 3px var(--gold-glow) !important;
}

/* Price / accent text */
.price,
.stat-value.green,
.price-final {
    color: var(--gold-light) !important;
}
