/* ==========================================
   OFFEYES — PREMIUM CLEAN ESPORTS UI
   ========================================== */

:root {
    --bg-base: #0F1115;
    --bg-surface: #1A1D24;
    --bg-surface-hover: #22262F;
    --bg-surface-active: #2A2D35;
    
    --border: #2A2D35;
    --border-hover: #3A3D45;
    
    --accent: #7c3aed;
    --accent-hover: #6d28d9;
    --accent-muted: rgba(124, 58, 237, 0.15);
    
    --text-primary: #FFFFFF;
    --text-secondary: #9CA3AF;
    --text-tertiary: #6B7280;
    
    --success: #10B981;
    --success-muted: rgba(16, 185, 129, 0.15);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    --font-sans: 'Inter', system-ui, sans-serif;
    
    --nav-height: 70px;
}

/* RESET */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background: radial-gradient(circle at 50% -20%, rgba(124, 58, 237, 0.08) 0%, var(--bg-base) 50%);
    background-color: var(--bg-base);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: color 0.2s; }
button, input, select { font-family: inherit; border: none; outline: none; background: none; }
ul { list-style: none; }

/* UTILS */
.text-red { color: var(--accent) !important; }
.text-green { color: var(--success) !important; }

/* NAVIGATION */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-height);
    background-color: rgba(15, 17, 21, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 32px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}
.brand-icon {
    width: 12px; height: 12px;
    background-color: var(--accent);
    border-radius: 50%;
}

.nav-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: 24px;
    padding-left: 24px;
    border-left: 1px solid var(--border);
}
.nav-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.nav-stat-item svg { color: var(--text-tertiary); }

.nav-links {
    display: flex;
    gap: 24px;
    margin-left: 24px;
}
.nav-links a {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 0;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--text-primary);
}

.search-input {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 14px;
    color: var(--text-tertiary);
}
.search-input:focus-within {
    border-color: var(--border-hover);
    color: var(--text-secondary);
}
.search-input input {
    color: var(--text-primary);
    font-size: 0.85rem;
    width: 140px;
}

.icon-button {
    position: relative;
    color: var(--text-secondary);
    cursor: pointer;
}
.icon-button:hover { color: var(--text-primary); }
.badge-dot {
    position: absolute;
    top: -2px; right: -2px;
    width: 8px; height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
}

.profile-dropdown {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}
.profile-avatar {
    width: 36px; height: 36px;
    border-radius: var(--radius-md);
    background-color: var(--bg-surface-active);
    color: var(--text-primary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}
.profile-meta { display: flex; flex-direction: column; }
.profile-name { font-weight: 600; font-size: 0.85rem; }
.profile-elo { color: var(--accent); font-weight: 700; font-size: 0.75rem; }

/* MAIN LAYOUT */
.main-layout {
    margin-top: var(--nav-height);
    padding: 40px 0 80px;
}
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* GRID CONTENT */
.grid-content {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
}
.col-main, .col-side {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* PANELS */
.panel {
    background-color: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 24px;
}
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.panel-title {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pulse-dot {
    width: 8px; height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
}
.link-muted { color: var(--text-tertiary); font-size: 0.85rem; font-weight: 600; }
.link-muted:hover { color: var(--text-primary); }
.link-accent { color: var(--accent); font-size: 0.85rem; font-weight: 600; }
.link-accent:hover { color: var(--accent-hover); }

/* LOBBY PANEL */
.segmented-control {
    display: flex;
    background-color: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 4px;
}
.seg-btn {
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.seg-btn.active {
    background-color: var(--bg-surface-active);
    color: var(--text-primary);
}

.lobby-players {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.slot-card {
    background: linear-gradient(180deg, #1f232b 0%, #121419 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    text-align: center;
    min-height: 280px;
    justify-content: flex-start;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}
/* Holographic Sweep Effect */
.slot-card::after {
    content: ''; position: absolute;
    top: -100%; left: -150%; width: 50%; height: 300%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(124, 58, 237, 0.15) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(35deg);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1; pointer-events: none;
}
.slot-card:hover::after {
    left: 200%;
}
.slot-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 20px rgba(124, 58, 237, 0.2);
}
.slot-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 100px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 100%);
    border-bottom: 2px solid rgba(255,255,255,0.05);
    z-index: 1;
}
.slot-card.empty::before { display: none; }

.slot-card.empty {
    border: 2px dashed var(--border);
    background: transparent;
    justify-content: center;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: none;
}
.slot-card.empty:hover {
    background-color: rgba(255,255,255,0.02);
    border-color: var(--text-secondary);
    color: var(--text-primary);
    transform: translateY(-3px);
}
.slot-card.you {
    background: linear-gradient(180deg, #2b1f23 0%, #171214 100%);
    border: 2px solid var(--accent);
    transform: scale(1.05);
    z-index: 10;
    animation: pulseYou 4s infinite alternate;
}
.slot-card.you::before {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, transparent 100%);
    border-bottom: 2px solid rgba(124, 58, 237, 0.3);
}
.slot-card.you:hover {
    transform: scale(1.08) translateY(-4px);
}
@keyframes pulseYou {
    0% { box-shadow: 0 15px 35px rgba(0,0,0,0.6), 0 0 10px rgba(124, 58, 237, 0.1); }
    100% { box-shadow: 0 15px 35px rgba(0,0,0,0.6), 0 0 35px rgba(124, 58, 237, 0.25); }
}

.sc-top {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    position: relative; z-index: 2; margin-bottom: 8px;
}
.sc-rank-badge {
    width: 36px; height: 36px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: conic-gradient(from 225deg, var(--lvl-color) var(--lvl-pct), var(--border-hover) var(--lvl-pct));
    display: flex; align-items: center; justify-content: center;
    position: relative;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.6));
    transition: transform 0.3s ease;
}
.sc-rank-badge:hover {
    transform: rotate(15deg) scale(1.1);
}
.lvl-inner {
    width: 30px; height: 30px;
    background-color: #111;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex; align-items: center; justify-content: center;
    color: var(--lvl-color); font-weight: 900; font-size: 0.9rem;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.8);
    position: relative; z-index: 2;
}
.lvl-inner span {
    text-shadow: 0 1px 3px rgba(0,0,0,1);
}
.sc-rank-badge.large-badge {
    width: 60px; height: 60px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.5);
}
.sc-rank-badge.large-badge .lvl-inner {
    width: 50px; height: 50px;
    font-size: 1.6rem;
}
.sc-flag { border-radius: 2px; }

.sc-avatar-wrap { position: relative; margin-bottom: 12px; z-index: 2; }
.sc-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--bg-surface-active);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    border: 3px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; font-weight: 800;
    margin: 0 auto;
}
.slot-card.you .sc-avatar { border-color: var(--accent); }
.sc-status {
    position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%);
    font-size: 0.75rem; font-weight: 800;
    padding: 4px 12px; border-radius: 12px;
    background-color: var(--bg-surface); border: 1px solid var(--border);
    white-space: nowrap;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.sc-status.ready { color: var(--success); border-color: var(--success); }
.sc-status.invited { color: var(--text-secondary); }

.sc-details { position: relative; z-index: 2; text-align: center; margin-bottom: auto; }
.sc-name { font-weight: 800; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; gap: 6px; }
.leader-crown { font-size: 1.2rem; line-height: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); cursor: default; }

.sc-stats {
    width: 100%; display: flex; justify-content: space-between; position: relative; z-index: 2;
    background: rgba(0,0,0,0.4); border-radius: 8px; padding: 12px; margin-top: 16px;
    border: 1px solid rgba(255,255,255,0.05);
}
.slot-card.you .sc-stats {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.2);
}
.stat-box { display: flex; flex-direction: column; align-items: center; width: 50%; }
.stat-box:first-child { border-right: 1px solid rgba(255,255,255,0.1); }
.stat-title { font-size: 0.7rem; color: var(--text-secondary); font-weight: 700; letter-spacing: 1px; }
.stat-val { font-size: 1.2rem; font-weight: 900; color: white; }
.slot-card.you .stat-val { color: var(--accent); }

.sc-actions {
    position: absolute; inset: 0;
    background: rgba(15,17,21,0.85);
    backdrop-filter: blur(2px);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    border-radius: var(--radius-md);
    opacity: 0; transition: opacity 0.2s;
    border: 1px solid var(--border);
    z-index: 20;
    pointer-events: none;
}
.slot-card:hover .sc-actions { opacity: 1; pointer-events: auto; }
.sc-actions:empty { display: none; }

.btn-make-leader {
    font-size: 0.75rem; font-weight: 600; color: var(--text-secondary);
    background-color: var(--bg-surface-active); border: 1px solid var(--border);
    padding: 6px 12px; border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s;
    width: 80%;
}
.btn-make-leader:hover { color: var(--text-primary); border-color: var(--accent); background-color: var(--accent-muted); }

.lobby-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
.option-group label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 6px;
}
.clean-select {
    width: 100%;
    background-color: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
}
.clean-select:focus { border-color: var(--border-hover); }

.action-footer {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.primary-btn {
    width: auto;
    min-width: 220px;
    background: linear-gradient(90deg, var(--accent), #a78bfa);
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 800;
    padding: 14px 40px;
    border-radius: 40px;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.primary-btn::after {
    content: ''; position: absolute; top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.6s ease;
}
.primary-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.5);
}
.primary-btn:not(:disabled):hover::after {
    transform: rotate(45deg) translateX(100%);
}


.btn-default { display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-active { display: flex; align-items: center; justify-content: center; gap: 12px; }
.primary-btn.is-searching {
    background-color: var(--bg-surface-active);
    color: var(--text-primary);
    border: 1px solid var(--accent);
}

.timer-text { font-variant-numeric: tabular-nums; }
.divider { color: var(--border); }
.cancel-text { font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; }
.cancel-text:hover { color: var(--text-primary); }

/* MATCH LIST */
.match-list { display: flex; flex-direction: column; gap: 8px; }
.slot-card {
    background-color: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 16px;
}
.match-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.team-name { font-weight: 700; font-size: 0.95rem; width: 100px; }
.team-name.align-right { text-align: right; }
.score-pill {
    background-color: var(--bg-surface-active);
    padding: 4px 12px;
    border-radius: 16px;
    display: flex; gap: 8px; align-items: center;
    font-weight: 800; font-size: 1.1rem;
}
.score-num.win { color: var(--accent); }
.score-sep { color: var(--text-tertiary); font-weight: 400; }

.match-details {
    display: flex; justify-content: space-between;
    font-size: 0.8rem; color: var(--text-secondary); font-weight: 500;
}

/* HORIZONTAL STATS BAR */
.stat-panel-horizontal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: linear-gradient(135deg, rgba(20,22,27,0.95) 0%, rgba(124, 58, 237, 0.05) 100%);
    position: relative;
    overflow: hidden;
}
.stat-panel-horizontal::before {
    content: ''; position: absolute; inset: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" opacity="0.03"><circle cx="2" cy="2" r="1" fill="%23FFFFFF"/></svg>') repeat;
    z-index: 0; pointer-events: none;
}
.stat-hero {
    display: flex; align-items: center; gap: 24px; position: relative; z-index: 1;
}
.stat-elo-box { display: flex; flex-direction: column; }
.elo-val { font-size: 2.2rem; font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: 4px; }
.elo-lbl { font-size: 0.75rem; color: var(--text-secondary); font-weight: 700; letter-spacing: 1px; }
.trend-badge {
    font-size: 0.9rem; font-weight: 700;
    padding: 6px 10px; border-radius: var(--radius-sm);
}
.trend-badge.positive { background-color: var(--success-muted); color: var(--success); }

.stat-divider {
    width: 1px; height: 50px; background-color: var(--border);
    margin: 0 16px;
}

.stat-grid-horizontal {
    display: flex; flex: 1; gap: 16px;
}
.stat-grid-horizontal .stat-card {
    flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
    background-color: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    transition: transform 0.2s;
}
.stat-grid-horizontal .stat-card:hover { transform: translateY(-2px); border-color: var(--border-hover); }
.s-val { font-size: 1.4rem; font-weight: 800; margin-bottom: 2px; }
.s-lbl { font-size: 0.7rem; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* LEADERBOARD */
.lb-list { display: flex; flex-direction: column; gap: 4px; }
.lb-row {
    display: flex; align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
}
.lb-row:hover { background-color: var(--bg-base); }
.lb-row.self-row { background-color: var(--bg-surface-active); }
.lb-rank { width: 30px; font-weight: 700; color: var(--text-secondary); }
.lb-name { flex: 1; font-weight: 600; font-size: 0.9rem; }
.lb-elo { font-weight: 700; color: var(--accent); }

/* FRIENDS */
.badge-subtle {
    background-color: var(--bg-surface-active);
    color: var(--text-secondary);
    font-size: 0.75rem; font-weight: 600;
    padding: 4px 8px; border-radius: 12px;
}
.friend-list { display: flex; flex-direction: column; gap: 8px; }
.f-card {
    display: flex; align-items: center; gap: 12px;
    padding: 10px; border-radius: var(--radius-md);
    background-color: var(--bg-base);
    border: 1px solid transparent;
}
.f-card:hover { border-color: var(--border); }
.brand-img {
    width: 36px; height: 36px;
    object-fit: contain;
    border-radius: 8px;
}
.f-avatar {
    width: 32px; height: 32px; border-radius: var(--radius-sm);
    background-color: var(--bg-surface-active);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.8rem; position: relative;
}
.f-status {
    position: absolute; bottom: -2px; right: -2px;
    width: 10px; height: 10px; border-radius: 50%;
    border: 2px solid var(--bg-base);
}
.f-status.online { background-color: var(--success); }
.f-status.offline { background-color: var(--text-tertiary); }
.f-info { flex: 1; }
.f-name { display: block; font-weight: 600; font-size: 0.85rem; }
.f-activity { font-size: 0.75rem; color: var(--text-secondary); }
.btn-invite {
    color: var(--accent); font-size: 0.75rem; font-weight: 700;
    background-color: var(--accent-muted);
    padding: 4px 10px; border-radius: var(--radius-sm);
    cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center; min-width: 60px;
}
.btn-invite:hover:not(:disabled) { background-color: var(--accent); color: #FFF; }
.btn-invite:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-invited {
    background-color: transparent; border: 1px solid var(--border);
    color: var(--text-secondary); min-width: 90px;
}
.btn-invited .h-text { display: none; }
.btn-invited:hover {
    border-color: var(--accent); background-color: var(--accent-muted); color: var(--text-primary);
}
.btn-invited:hover .d-text { display: none; }
.btn-invited:hover .h-text { display: block; }

/* FOOTER */
.footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    background-color: var(--bg-base);
}
.footer-content {
    display: flex; justify-content: space-between; align-items: center;
}
.f-brand { font-weight: 700; color: var(--text-secondary); font-size: 0.9rem; }
.f-links { display: flex; gap: 24px; }
.f-links a { font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }
.f-links a:hover { color: var(--text-primary); }

/* MODAL */
.overlay {
    position: fixed; inset: 0;
    background-color: rgba(15, 17, 21, 0.8);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
    opacity: 0; visibility: hidden;
    transition: opacity 0.2s;
}
.overlay.show { opacity: 1; visibility: visible; }

.modal {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 400px; padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: translateY(10px); transition: transform 0.2s;
}
.overlay.show .modal { transform: translateY(0); }

.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px;
}
.modal-header h3 { font-size: 1.1rem; font-weight: 700; }
.btn-icon { color: var(--text-secondary); cursor: pointer; }
.btn-icon:hover { color: var(--text-primary); }

.clean-input {
    width: 100%; background-color: var(--bg-base);
    border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 10px 14px; color: var(--text-primary); font-size: 0.9rem;
    margin-bottom: 16px;
}
.clean-input:focus { border-color: var(--border-hover); }

.invite-results {
    display: flex; flex-direction: column; gap: 8px;
    max-height: 250px; overflow-y: auto;
}
