/* =========================================
   AvroraMU Vote System - Deep Black / Neon
   Style B
   ========================================= */

/* RESET & BASE ------------------------------------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.16), transparent 55%),
        radial-gradient(circle at 100% 0%, rgba(129, 140, 248, 0.16), transparent 55%),
        radial-gradient(circle at 50% 130%, rgba(236, 72, 153, 0.18), transparent 60%),
        #020617;
    color: #e5e7eb;
    line-height: 1.5;
}

/* Global links */
a {
    color: #38bdf8;
    text-decoration: none;
    transition: color 0.18s ease, text-shadow 0.18s ease, opacity 0.18s ease;
}

a:hover {
    color: #e0f2fe;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.9);
}

/* Utility text classes (Bootstrap-like) ------------ */
.text-white {
    color: #f9fafb !important;
}

.text-muted {
    color: #6b7280 !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

/* LAYOUT ------------------------------------------- */
.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.vote-container {
    width: 100%;
    max-width: 1180px;
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.98));
    border-radius: 24px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.95),
        0 0 40px rgba(15, 23, 42, 0.9);
    padding: 28px 24px 30px;
    backdrop-filter: blur(22px) saturate(160%);
    position: relative;
    overflow: hidden;
}

/* subtle glow borders */
.vote-container::before {
    content: "";
    position: absolute;
    inset: -1px;
    pointer-events: none;
    border-radius: inherit;
    background:
        linear-gradient(
            135deg,
            rgba(56, 189, 248, 0.3),
            rgba(129, 140, 248, 0.05),
            rgba(236, 72, 153, 0.3)
        );
    opacity: 0.16;
}

/* HEADER ------------------------------------------- */
.vote-header {
    text-align: center;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.vote-header h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    background: linear-gradient(110deg, #e5e7eb, #38bdf8, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.vote-subtitle {
    margin-top: 8px;
    font-size: 14px;
    color: #9ca3af;
}

/* SECTIONS ----------------------------------------- */
.vote-sites-section {
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.vote-sites-section h2 {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #9ca3ff;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(55, 65, 81, 0.9);
    position: relative;
}

.vote-sites-section h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 90px;
    height: 2px;
    background: linear-gradient(90deg, #38bdf8, #a855f7);
    border-radius: 999px;
}

.vote-instructions {
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 6px;
}

.vote-instructions strong {
    color: #e5e7eb;
}

/* INFO BOXES --------------------------------------- */
.vote-info {
    margin-top: 22px;
    position: relative;
    z-index: 1;
}

.info-box {
    position: relative;
    background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.9), #020617);
    border-radius: 18px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    padding: 16px 16px 14px;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.95),
        0 0 35px rgba(15, 23, 42, 0.9);
    overflow: hidden;
}

.info-box::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.18), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(236, 72, 153, 0.22), transparent 55%);
    opacity: 0.55;
    pointer-events: none;
}

.info-box h3 {
    position: relative;
    font-size: 14px;
    font-weight: 700;
    color: #e5e7eb;
    margin-bottom: 8px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.info-box ul {
    position: relative;
    list-style: none;
    padding-left: 0;
    color: #d1d5db;
    font-size: 13px;
}

.info-box ul li {
    padding-left: 16px;
    margin-bottom: 5px;
    position: relative;
}

.info-box ul li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 7px;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: radial-gradient(circle, #38bdf8 0, #a855f7 100%);
}

/* VOTE SITES GRID ---------------------------------- */
.vote-sites-simple {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}

.vote-site-item {
    position: relative;
    background: radial-gradient(circle at top, rgba(15, 23, 42, 0.9), #020617);
    border-radius: 18px;
    border: 1px solid rgba(31, 41, 55, 0.95);
    padding: 12px 12px 14px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.95);
    overflow: hidden;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
}

.vote-site-item::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background:
        linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(129, 140, 248, 0.15), rgba(236, 72, 153, 0.4));
    opacity: 0;
    transition: opacity 0.18s ease;
    pointer-events: none;
}

.vote-site-item:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.65);
    box-shadow:
        0 26px 60px rgba(0, 0, 0, 1),
        0 0 32px rgba(56, 189, 248, 0.35);
}

.vote-site-item:hover::before {
    opacity: 0.7;
}

.vote-site-item h3 {
    font-size: 13px;
    font-weight: 600;
    color: #f9fafb;
    margin-bottom: 8px;
}

/* wrapper за текст в h3 ако имаш span вътре */
.vote-site-item h3 span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(75, 85, 99, 0.9);
    font-size: 12px;
}

/* VOTE LINK & IMAGE -------------------------------- */
.vote-site-wrapper {
    position: relative;
    margin-top: 4px;
    border-radius: 12px;
    overflow: hidden;
    background: #020617;
}

.vote-link-simple {
    display: block;
    position: relative;
    text-decoration: none;
    isolation: isolate;
}

.vote-link-simple img {
    display: block;
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 12px;
    filter: saturate(1.05) contrast(1.02) brightness(0.95);
    transition:
        transform 0.18s ease,
        filter 0.18s ease,
        opacity 0.18s ease;
}

/* Overlay text (VOTE NOW / countdown) -------------- */
.vote-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-inline: 8px;
    border-radius: 12px;
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.2),
        rgba(15, 23, 42, 0.8)
    );
    opacity: 0;
    transition: opacity 0.18s ease, background 0.18s ease;
    pointer-events: none;
}

.vote-text {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #f9fafb;
    text-shadow: 0 0 12px rgba(15, 23, 42, 1);
    white-space: nowrap;
}

/* Hover / active states ---------------------------- */
.vote-link-simple:hover img {
    transform: scale(1.03);
    filter: saturate(1.35) contrast(1.05) brightness(1.05);
}

.vote-link-simple:hover .vote-overlay {
    opacity: 1;
}

/* When cooldown is active */
.vote-link-simple.voted {
    cursor: default;
    pointer-events: none;
}

.vote-link-simple.voted img {
    filter: grayscale(0.55) brightness(0.8);
    opacity: 0.7;
}

.vote-link-simple.voted .vote-overlay {
    opacity: 1;
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.9),
        rgba(30, 64, 175, 0.95)
    );
}

.vote-link-simple.voted .vote-text {
    color: #bfdbfe;
}

/* TABLE STYLES (Top voters) ------------------------ */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 13px;
    color: #e5e7eb;
    position: relative;
    z-index: 1;
}

.table th,
.table td {
    padding: 7px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(31, 41, 55, 0.9);
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 11px;
    color: #9ca3af;
    background: rgba(15, 23, 42, 0.98);
}

.table tbody tr:nth-child(odd) {
    background: rgba(15, 23, 42, 0.85);
}

.table tbody tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.65);
}

.table tbody tr:hover {
    background: rgba(30, 64, 175, 0.5);
}

.table-sm th,
.table-sm td {
    padding: 6px 8px;
}

/* BUTTONS ------------------------------------------ */
button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 999px;
    border: none;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    cursor: pointer;
    color: #f9fafb;
    background-image: linear-gradient(120deg, #0ea5e9, #22d3ee, #a855f7);
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.9),
        0 14px 30px rgba(0, 0, 0, 0.95),
        0 0 32px rgba(34, 211, 238, 0.6);
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        filter 0.15s ease,
        opacity 0.15s ease;
}

button:hover,
.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 1),
        0 18px 40px rgba(0, 0, 0, 1),
        0 0 42px rgba(34, 211, 238, 0.9);
}

button:active,
.btn:active {
    transform: translateY(0);
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.9),
        0 8px 18px rgba(0, 0, 0, 0.9),
        0 0 26px rgba(34, 211, 238, 0.6);
    opacity: 0.96;
}

/* LOGIN PAGE --------------------------------------- */
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    background:
        radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.2), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(236, 72, 153, 0.25), transparent 60%),
        #020617;
}

body.login-page .card {
    width: 100%;
    max-width: 380px;
    background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.95), #020617);
    border-radius: 22px;
    border: 1px solid rgba(56, 189, 248, 0.5);
    padding: 26px 22px 24px;
    box-shadow:
        0 26px 70px rgba(0, 0, 0, 1),
        0 0 40px rgba(56, 189, 248, 0.6);
    backdrop-filter: blur(24px) saturate(160%);
    position: relative;
    overflow: hidden;
}

body.login-page .card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.3), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(236, 72, 153, 0.4), transparent 60%);
    opacity: 0.6;
    pointer-events: none;
}

body.login-page .card h1 {
    position: relative;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #f9fafb;
}

body.login-page .card p {
    position: relative;
    text-align: center;
    font-size: 13px;
    color: #9ca3af;
}

body.login-page .card form {
    position: relative;
    margin-top: 14px;
}

.card label {
    display: block;
    margin: 12px 0 5px;
    font-size: 12px;
    font-weight: 500;
    color: #e5e7eb;
}

.card input[type="text"],
.card input[type="password"] {
    width: 100%;
    padding: 10px 11px;
    border-radius: 10px;
    border: 1px solid rgba(55, 65, 81, 0.95);
    background: rgba(15, 23, 42, 0.96);
    color: #e5e7eb;
    font-size: 14px;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.card input[type="text"]::placeholder,
.card input[type="password"]::placeholder {
    color: #6b7280;
}

.card input[type="text"]:focus,
.card input[type="password"]:focus {
    outline: none;
    border-color: #38bdf8;
    background: #020617;
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 1),
        0 0 0 3px rgba(56, 189, 248, 0.3);
}

/* Error message box */
.card .error {
    position: relative;
    margin-top: 10px;
    padding: 10px 11px;
    border-radius: 10px;
    font-size: 12px;
    color: #fee2e2;
    background: linear-gradient(
        135deg,
        rgba(248, 113, 113, 0.14),
        rgba(127, 29, 29, 0.9)
    );
    border: 1px solid rgba(248, 113, 113, 0.75);
}

/* Small "back to vote" link under login ----------- */
body.login-page .card > div a {
    position: relative;
    font-size: 12px;
    color: #93c5fd;
}

body.login-page .card > div a:hover {
    color: #e0f2fe;
}

/* MISC --------------------------------------------- */
::selection {
    background: rgba(56, 189, 248, 0.85);
    color: #020617;
}

::-moz-selection {
    background: rgba(56, 189, 248, 0.85);
    color: #020617;
}


/* ─────────────────────────────────────────────
   TOP BAR (username + logout button)
   ───────────────────────────────────────────── */

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.top-left .title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: linear-gradient(90deg, #38bdf8, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.subtitle {
    font-size: 13px;
    color: #9ca3af;
    margin-top: 3px;
}

/* Right side */
.top-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.username-display {
    font-size: 14px;
    color: #e0f2fe;
    padding: 8px 14px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 12px;
    backdrop-filter: blur(6px);
}

.logout-btn {
    padding: 9px 18px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    border-radius: 999px;
    background: linear-gradient(90deg, #0ea5e9, #a855f7);
    color: white;
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 1),
        0 12px 25px rgba(56, 189, 248, 0.35),
        0 0 30px rgba(168, 85, 247, 0.4);
    transition: 0.2s;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 1),
        0 16px 30px rgba(56, 189, 248, 0.55),
        0 0 40px rgba(168, 85, 247, 0.6);
}

/* separator */
.separator {
    margin: 18px 0;
    border: none;
    border-bottom: 1px solid rgba(31, 41, 55, 0.9);
}

/* Form inputs in purchase cards */
.vote-site-item input[type="number"] {
    width: 100%;
    padding: 8px 11px;
    border-radius: 8px;
    border: 1px solid rgba(55, 65, 81, 0.95);
    background: rgba(15, 23, 42, 0.96);
    color: #e5e7eb;
    font-size: 13px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.vote-site-item input[type="number"]:focus {
    outline: none;
    border-color: #38bdf8;
    background: #020617;
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 1),
        0 0 0 3px rgba(56, 189, 248, 0.3);
}

.vote-site-item input[type="number"]::-webkit-inner-spin-button,
.vote-site-item input[type="number"]::-webkit-outer-spin-button {
    opacity: 0.7;
}

/* Character selection dropdown */
select {
    padding: 10px 11px;
    border-radius: 10px;
    border: 1px solid rgba(55, 65, 81, 0.95);
    background: rgba(15, 23, 42, 0.96);
    color: #e5e7eb;
    font-size: 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #38bdf8;
    background: #020617;
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 1),
        0 0 0 3px rgba(56, 189, 248, 0.3);
}

select option {
    background: #020617;
    color: #e5e7eb;
}

/* ─────────────────────────────────────────────
   FIX BANNER SIZE (stop stretching)
   ───────────────────────────────────────────── */

.vote-site-wrapper img {
    width: 100%;
    height: 50px;
    object-fit: contain;
    background: #00000033;
    padding: 4px;
    border-radius: 12px;
}

/* ─────────────────────────────────────────────
   DISCOUNT BANNER
   ───────────────────────────────────────────── */

.discount-banner {
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(
        135deg,
        rgba(168, 85, 247, 0.2),
        rgba(236, 72, 153, 0.2),
        rgba(56, 189, 248, 0.2)
    );
    border: 2px solid rgba(168, 85, 247, 0.5);
    box-shadow: 
        0 0 30px rgba(168, 85, 247, 0.4),
        0 10px 40px rgba(0, 0, 0, 0.8);
    animation: discountPulse 3s ease-in-out infinite;
}

.discount-banner-inactive {
    background: linear-gradient(
        135deg,
        rgba(55, 65, 81, 0.3),
        rgba(31, 41, 55, 0.3)
    );
    border-color: rgba(55, 65, 81, 0.6);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    animation: none;
}

@keyframes discountPulse {
    0%, 100% {
        box-shadow: 
            0 0 30px rgba(168, 85, 247, 0.4),
            0 10px 40px rgba(0, 0, 0, 0.8);
    }
    50% {
        box-shadow: 
            0 0 50px rgba(168, 85, 247, 0.7),
            0 10px 50px rgba(0, 0, 0, 0.9);
    }
}

.discount-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 18px 24px;
    position: relative;
    z-index: 1;
}

.discount-icon {
    font-size: 36px;
    animation: bounce 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.discount-sparkle {
    font-size: 28px;
    animation: sparkle 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9));
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
}

.discount-text {
    text-align: center;
    flex: 1;
}

.discount-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: linear-gradient(90deg, #fbbf24, #f59e0b, #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 6px;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}

.discount-banner-inactive .discount-title {
    background: linear-gradient(90deg, #9ca3af, #6b7280);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
}

.discount-details {
    font-size: 14px;
    color: #e5e7eb;
    margin-bottom: 4px;
    font-weight: 600;
}

.discount-percentage {
    color: #34d399;
    font-weight: 800;
    font-size: 16px;
    text-shadow: 0 0 10px rgba(52, 211, 153, 0.8);
}

.discount-dates {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.discount-banner::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: shine 4s linear infinite;
    pointer-events: none;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}
