/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0b14;
    --bg-secondary: #0f1019;
    --bg-card: #12131f;
    --bg-card-inner: #161829;
    --bg-card-hover: #1a1c2e;
    --border: #1e2035;
    --border-light: #282a42;
    --text-primary: #e2e4f0;
    --text-secondary: #9ca0b8;
    --text-muted: #6b7089;
    --accent-purple: #7c3aed;
    --accent-purple-light: #a78bfa;
    --accent-blue: #2775CA;
    --accent-green: #10b981;
    --accent-yellow: #eab308;
    --accent-pink: #ec4899;
    --gradient-purple: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #c084fc 100%);
    --gradient-blue: linear-gradient(135deg, #2775CA 0%, #3b82f6 100%);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ===== Header ===== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 56px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    width: 28px;
    height: 28px;
}

.logo-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.nav {
    display: flex;
    gap: 24px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.nav-link.active {
    color: var(--text-primary);
}

.nav-badge {
    background: #dc2626;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    top: -6px;
}

.btn-connect {
    background: var(--accent-purple);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
}

.btn-connect:hover {
    background: #6d28d9;
    transform: translateY(-1px);
}

/* ===== Main ===== */
.main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}

/* ===== Tab Section ===== */
.tab-section {
    margin-bottom: 28px;
}

.tab {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    padding-bottom: 12px;
    display: inline-block;
}

.tab-line {
    height: 2px;
    width: 70px;
    background: var(--accent-purple);
    border-radius: 1px;
}

/* ===== Event Hero ===== */
.event-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    gap: 24px;
}

.event-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.usdc-icon {
    width: 36px;
    height: 36px;
}

.event-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.badge-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-green);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.live-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.event-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
}

.reward-pool-card {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(168, 85, 247, 0.08) 100%);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 16px;
    padding: 20px 32px;
    text-align: center;
    min-width: 220px;
    flex-shrink: 0;
}

.reward-pool-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-purple-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.reward-pool-amount {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.reward-pool-currency {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ===== Event Content (Rewards + Stats) ===== */
.event-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.event-rewards-card,
.event-stats-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.rewards-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.rewards-left {
    flex: 1;
}

.rewards-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.voucher-activation {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.btn-connect-wallet {
    background: var(--gradient-purple);
    color: #fff;
    border: none;
    padding: 12px 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    max-width: 260px;
    transition: all 0.2s;
    font-family: var(--font);
}

.btn-connect-wallet:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

.rewards-right {
    flex-shrink: 0;
}

.voucher-image {
    width: 100px;
    height: 130px;
    position: relative;
}

.voucher-card-visual {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.voucher-card-visual .voucher-svg {
    width: 100%;
    height: 100%;
}

.voucher-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(167, 139, 250, 0.08) 40%,
        rgba(167, 139, 250, 0.15) 50%,
        rgba(167, 139, 250, 0.08) 60%,
        transparent 70%
    );
    animation: shine 4s infinite;
    pointer-events: none;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-green {
    color: var(--accent-green);
}

.stat-white {
    color: var(--text-primary);
}

.diamond-icon {
    width: 18px;
    height: 18px;
}

.progress-section {
    margin-top: auto;
}

.progress-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.progress-bar {
    height: 6px;
    background: var(--bg-card-inner);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #7c3aed);
    border-radius: 3px;
    transition: width 1s ease;
}

/* ===== Event Details ===== */
.event-details-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.subsection-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.how-it-works {
    margin-bottom: 28px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.step-card {
    background: var(--bg-card-inner);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-purple);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}

.step-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.step-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Event Period */
.event-period {
    margin-bottom: 28px;
}

.period-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.period-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* How to get voucher */
.voucher-list {
    list-style: disc;
    padding-left: 20px;
}

.voucher-list li {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.6;
}

.voucher-list li strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ===== Activations Table ===== */
.activations-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.table-wrapper {
    overflow-x: auto;
}

.activations-table {
    width: 100%;
    border-collapse: collapse;
}

.activations-table thead th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.activations-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.activations-table tbody tr:hover {
    background: rgba(124, 58, 237, 0.04);
}

.activations-table tbody tr:last-child {
    border-bottom: none;
}

.activations-table tbody td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.activations-table tbody td:first-child {
    color: var(--text-muted);
    font-size: 13px;
}

.rarity-common { color: #9ca3af; }
.rarity-uncommon { color: #a78bfa; }
.rarity-rare { color: #3b82f6; }
.rarity-epic { color: #10b981; }
.rarity-legendary { color: #eab308; }

.rarity-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rarity-diamond {
    width: 14px;
    height: 14px;
}

.row-legendary {
    background: rgba(234, 179, 8, 0.06) !important;
}

.row-legendary td:first-child {
    color: var(--accent-yellow) !important;
}

.reward-amount {
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== Modal ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    width: 380px;
    max-width: 90vw;
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wallet-option {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card-inner);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
    width: 100%;
    text-align: left;
}

.wallet-option:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-purple);
}

.wallet-icon-svg,
.wallet-icon-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .event-hero {
        flex-direction: column;
    }

    .reward-pool-card {
        width: 100%;
    }

    .event-content {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .event-title {
        font-size: 20px;
    }

    .reward-pool-amount {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0 16px;
    }

    .main {
        padding: 20px 16px 48px;
    }

    .activations-table tbody td,
    .activations-table thead th {
        padding: 10px 8px;
        font-size: 12px;
    }
}
