/* ──────────────────────────────────────────────
   Variables
   ────────────────────────────────────────────── */

:root {
    --accent-1: #7B6FFF;
    --accent-2: #4F9DFF;
    --accent-3: #A855F7;
    --accent-4: #06d6a0;
    --gold: #FFD700;
    --gold-dark: #b8960c;
    --bg-dark: #08080f;
    --card-bg: rgba(255, 255, 255, 0.08);
    --card-bg-hover: rgba(255, 255, 255, 0.13);
    --card-border: rgba(255, 255, 255, 0.15);
    --card-border-hover: rgba(255, 255, 255, 0.3);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --font: 'Ubuntu', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ──────────────────────────────────────────────
   Reset & Base
   ────────────────────────────────────────────── */

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

body {
    font-family: var(--font);
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ──────────────────────────────────────────────
   Aurora Background — MORE VIBRANT
   ────────────────────────────────────────────── */

.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: aurora-drift 10s ease-in-out infinite alternate;
}

.aurora-blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.6) 0%, transparent 70%);
    top: -150px;
    left: -100px;
}

.aurora-blob-2 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.5) 0%, transparent 70%);
    top: -80px;
    right: -120px;
    animation-delay: -3s;
}

.aurora-blob-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.4) 0%, transparent 70%);
    top: 40%;
    left: 30%;
    animation-delay: -6s;
}

@keyframes aurora-drift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, 20px) scale(1.15); }
    100% { transform: translate(-20px, 15px) scale(0.9); }
}

/* ──────────────────────────────────────────────
   Container
   ────────────────────────────────────────────── */

.page-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 440px;
    padding: 28px 16px 16px;
}

/* ──────────────────────────────────────────────
   Loading Section — centered then slides up
   ────────────────────────────────────────────── */

.loading-section {
    text-align: center;
    padding-bottom: 24px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                margin-top 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.6s ease 0.3s;
}

.loading-section.done {
    opacity: 0.5;
}

.loading-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.25;
    color: #fff;
    text-shadow: 0 0 40px rgba(123, 111, 255, 0.4);
}

/* ──────────────────────────────────────────────
   Slot Machine
   ────────────────────────────────────────────── */

.slot-machine {
    position: relative;
    margin: 0 auto 20px;
    width: 220px;
}

.slot-frame {
    display: flex;
    gap: 4px;
    background: linear-gradient(145deg, #2a2a3d, #1a1a2e);
    border: 2px solid var(--gold);
    border-radius: 14px;
    padding: 10px 8px;
    box-shadow:
        0 0 20px rgba(255, 215, 0, 0.2),
        inset 0 2px 8px rgba(0,0,0,0.5);
}

.slot-window {
    flex: 1;
    height: 60px;
    overflow: hidden;
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1e 50%, #1a1a2e 100%);
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    position: relative;
}

/* Fade edges */
.slot-window::before,
.slot-window::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 15px;
    z-index: 2;
    pointer-events: none;
}
.slot-window::before {
    top: 0;
    background: linear-gradient(180deg, #1a1a2e, transparent);
}
.slot-window::after {
    bottom: 0;
    background: linear-gradient(0deg, #1a1a2e, transparent);
}

.slot-reel {
    display: flex;
    flex-direction: column;
    transition: transform 0.1s linear;
}

.slot-reel.spinning {
    transition: none;
}

.slot-reel.stopping {
    transition: transform 0.6s cubic-bezier(0.2, 0, 0, 1);
}

.slot-symbol {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    flex-shrink: 0;
}

.slot-line {
    position: absolute;
    top: 50%;
    left: 4px;
    right: 4px;
    height: 2px;
    background: var(--gold);
    transform: translateY(-50%);
    opacity: 0.6;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
    pointer-events: none;
}

/* Win flash */
.slot-machine.win .slot-frame {
    animation: win-flash 0.5s ease 3;
}

@keyframes win-flash {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.2), inset 0 2px 8px rgba(0,0,0,0.5); }
    50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.6), 0 0 80px rgba(255, 215, 0, 0.2), inset 0 2px 8px rgba(0,0,0,0.5); }
}

.loading-text {
    font-size: 14px;
    color: var(--text-secondary);
    min-height: 22px;
    transition: opacity 0.25s ease;
    margin-top: 4px;
}

.loading-text.fade {
    opacity: 0;
}

.loading-text.win-text {
    color: var(--gold);
    font-weight: 600;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

/* ──────────────────────────────────────────────
   Bank Section
   ────────────────────────────────────────────── */

.bank-section {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.bank-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 19px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4px;
    color: #fff;
}

.section-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 18px;
}

/* ──────────────────────────────────────────────
   Bank Cards — BRIGHT & VIVID
   ────────────────────────────────────────────── */

.bank-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bank-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
    opacity: 0;
    transform: translateY(16px);
}

/* Gradient shine on hover */
.bank-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: linear-gradient(135deg,
        rgba(123, 111, 255, 0.12),
        rgba(79, 157, 255, 0.1),
        rgba(168, 85, 247, 0.08));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bank-card:hover::before,
.bank-card:active::before {
    opacity: 1;
}

.bank-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease, background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.bank-card:hover,
.bank-card:active {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(123, 111, 255, 0.5);
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 8px 32px rgba(123, 111, 255, 0.3),
        0 0 60px rgba(123, 111, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.bank-card.no-offer {
    cursor: default;
}

.bank-card.no-offer:hover {
    transform: none;
    box-shadow: none;
    background: var(--card-bg);
    border-color: var(--card-border);
}

.bank-card.no-offer::before { display: none; }

/* Fallback logo (first letter) when no image */
.bank-logo-fallback {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

@supports not (backdrop-filter: blur(20px)) {
    .bank-card {
        background: rgba(22, 22, 50, 0.95);
    }
}

.bank-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: contain;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.bank-info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.bank-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
    color: #fff;
}

.bank-users {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
}

.bank-arrow {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.2s ease, color 0.2s ease;
    position: relative;
    z-index: 1;
}

.bank-card:hover .bank-arrow {
    transform: translateX(4px);
    color: var(--accent-2);
}

/* ──────────────────────────────────────────────
   Footer
   ────────────────────────────────────────────── */

.footer {
    text-align: center;
    padding: 24px 16px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.15);
}

/* ──────────────────────────────────────────────
   Toast
   ────────────────────────────────────────────── */

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(30, 30, 60, 0.95);
    backdrop-filter: blur(12px);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    border: 1px solid var(--card-border);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: 100;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ──────────────────────────────────────────────
   Admin Styles (unchanged)
   ────────────────────────────────────────────── */

body.admin-body {
    background: #f0f2f5;
    color: #1a1a2e;
    display: block;
}

.admin-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.admin-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent-1); color: white; }
.btn-primary:hover { background: #6a5fe0; }
.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-outline { background: transparent; border: 1px solid #d1d5db; color: #374151; }
.btn-outline:hover { background: #f3f4f6; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.admin-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 24px;
    margin-bottom: 16px;
}

.admin-card h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1a1a2e;
}

.bank-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    background: #fafafa;
}

.bank-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.bank-item-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    background: #f0f0f0;
}

.bank-item-name {
    font-size: 16px;
    font-weight: 600;
    flex: 1;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group.full-width { grid-column: 1 / -1; }

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
}

.form-group input,
.form-group select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 14px;
    color: #1a1a2e;
    background: white;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(123, 111, 255, 0.1);
}

.bank-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.logo-upload {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.logo-upload input[type="file"] { font-size: 13px; }

.flash-messages { margin-bottom: 16px; }
.flash { padding: 10px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 8px; }
.flash-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.flash-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f2f5;
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-card h1 { font-size: 24px; font-weight: 700; text-align: center; margin-bottom: 8px; color: #1a1a2e; }
.login-card p { text-align: center; color: #6b7280; font-size: 14px; margin-bottom: 24px; }
.login-card .form-group { margin-bottom: 16px; }
.login-card .form-group input { width: 100%; padding: 12px 16px; font-size: 15px; }
.login-card .btn { width: 100%; padding: 12px; font-size: 15px; justify-content: center; }
