/* --- DESIGN TOKENS (Shared with Landing for consistency) --- */
:root {
    --bg: #0a0a0b;
    --surface: #141416;
    --surface-hover: #1b1b1e;
    --border: #26262a;
    --text-primary: #f2f2f2;
    --text-secondary: #8c8c94;

    --accent: #e4e723;
    --accent-glow: rgba(228, 231, 35, 0.2);
    --success: #10b981;
    --error: #ef4444;

    --radius-lg: 8px;
    --radius-md: 6px;
    --radius-sm: 4px;

    --transition: all 0.15s ease-out;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 24px;
    width: 100%;
}

/* --- COMPONENTS --- */

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 24px;
    background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge-beta {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    padding: 2px 8px;
    border-radius: 99px;
    margin-left: 12px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 1px;
    -webkit-text-fill-color: var(--accent);
}

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

h2 {
    font-size: 28px;
}

h3 {
    font-size: 20px;
    color: var(--text-secondary);
}

/* Inputs & Buttons */
.input-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

input {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    color: white;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
}

input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

button {
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg);
}

.btn-primary:hover {
    background: #fff;
}

.btn-sub {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-sub:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* URL Box */
.url-display {
    background: #000;
    border: 1px dashed var(--border);
    padding: 16px;
    border-radius: var(--radius-md);
    font-family: 'SF Mono', 'Menlo', monospace;
    font-size: 13px;
    color: var(--accent);
    word-break: break-all;
    cursor: pointer;
    position: relative;
}

.url-display:hover {
    background: #0a0a0a;
    border-color: var(--text-secondary);
}

.url-display::after {
    content: "COPY";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    background: var(--surface);
    padding: 4px 8px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.url-display:hover::after {
    opacity: 1;
}

/* Tabs */
.tab-btn {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    font-family: 'Inter', sans-serif;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: rgba(245, 158, 11, 0.05);
}

/* Event List */
.event-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e2129;
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    border: 1px solid var(--border);
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.event-item:hover {
    border-color: var(--accent);
    transform: scale(1.01);
    background: #242832;
}

.game-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(245, 158, 11, 0.2);
    color: #d8b4fe;
    margin-top: 4px;
}

/* Helpers / Utils */
.hidden {
    display: none !important;
}

.text-muted {
    color: var(--text-secondary);
    font-size: 14px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media(min-width: 800px) {
    .grid-2 {
        grid-template-columns: 1.5fr 1fr;
    }
}

/* --- TOAST SYSTEM --- */
#toast-container {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: 99px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}

.toast.success {
    border-color: rgba(16, 185, 129, 0.3);
}

.toast.success::before {
    content: "✓";
    color: var(--success);
    font-weight: 800;
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.3);
}

.toast.error::before {
    content: "✕";
    color: var(--error);
    font-weight: 800;
}

.toast.exit {
    animation: fadeOutDown 0.3s forwards;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeOutDown {
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* --- TOOLTIP --- */
.tooltip-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
    vertical-align: middle;
    margin-left: 4px;
}

.tooltip-trigger {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    transition: var(--transition);
}

.tooltip-trigger:hover {
    background: var(--accent);
    color: white;
}

.tooltip-content {
    visibility: hidden;
    width: 480px;
    background: #000;
    border: 1px solid var(--border);
    color: #fff;
    text-align: center;
    border-radius: var(--radius-md);
    padding: 8px;
    position: absolute;
    z-index: 100;

    /* Position: Drop DOWN and ALIGN RIGHT relative to trigger */
    top: 24px;
    right: 0;
    left: auto;
    transform: none;

    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    /* Removed pointer-events: none to allow hovering the video */
}

.tooltip-container:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}

/* Triangle (pointing up to the trigger) */
.tooltip-content::after {
    content: "";
    position: absolute;
    bottom: 100%;
    right: 4px;
    /* Align with trigger */
    left: auto;
    margin-left: 0;
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent #000 transparent;
}
