@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600;700&display=swap');

:root {
    --bg-main: #0A0B10;
    --bg-ink: #12141C;
    --bg-surface: #1B1F2C;
    --bg-hover: #232838;
    
    --border: rgba(255, 255, 255, 0.07);
    --border-light: rgba(255, 255, 255, 0.12);
    
    --text-primary: #E7E9F0;
    --text-muted: #8B90A3;
    
    --c-flash: #F2A83E;
    --c-recon: #3FC7CE;
    --c-win: #34D399;
    --c-loss: #E5484D;
    --c-live: #FF4D6D;
    --c-trust: #8C7AE6;
    
    --font-heading: 'Chakra Petch', sans-serif;
    --font-body: 'IBM Plex Sans', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    
    --clip-panel: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
    --clip-btn: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}

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

body {
    font-family: var(--font-body);
    background: var(--bg-main);
    color: var(--text-primary);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

::selection {
    background: var(--c-flash);
    color: var(--bg-ink);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 0; }
::-webkit-scrollbar-track { background: var(--bg-main); }

/* Animations */
@keyframes livepulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 77, 109, 0.5); }
    50% { opacity: 0.55; box-shadow: 0 0 0 5px rgba(255, 77, 109, 0); }
}
@keyframes readyflash {
    0% { background: var(--bg-hover); }
    100% { background: var(--c-win); }
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-ink);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 32px 0;
    flex-shrink: 0;
    z-index: 10;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 32px;
    margin-bottom: 48px;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 24px;
    letter-spacing: 0.04em;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 16px;
    flex: 1;
}

.nav-item {
    padding: 12px 20px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    color: var(--text-muted);
    background: transparent;
    border: none;
    text-align: left;
    clip-path: var(--clip-btn);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--c-flash);
    color: var(--bg-ink);
    font-weight: 600;
}

/* User Snippet */
.sidebar-footer {
    padding: 0 16px;
}

.user-snippet {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    clip-path: var(--clip-btn);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--bg-hover);
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 13px;
}

.user-trust {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--c-trust);
    margin-top: 2px;
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    position: relative;
    padding: 0;
}

.view-section {
    display: none;
    animation: fadeIn 0.3s ease;
    padding: 48px;
}
.view-section.active {
    display: block;
}
#hub { padding: 0; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Subnav */
.subnav-item {
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
    padding-bottom: 20px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s;
}
.subnav-item:hover { color: var(--text-primary); }
.subnav-item.active {
    color: var(--c-flash);
    font-weight: 600;
    border-bottom-color: var(--c-flash);
}

.subview-section {
    display: none;
    animation: fadeIn 0.3s ease;
}
.subview-section.active {
    display: flex; /* usually flex layout in hub */
}


/* UI Components */
.panel {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    clip-path: var(--clip-panel);
    padding: 24px;
}

.btn-primary {
    background: var(--c-flash);
    color: var(--bg-ink);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.03em;
    padding: 14px 26px;
    clip-path: var(--clip-btn);
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    display: inline-block;
    transition: transform 0.15s;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-outline {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 13px;
    padding: 9px 18px;
    clip-path: var(--clip-btn);
    cursor: pointer;
}
.btn-outline.active {
    background: var(--c-flash);
    color: var(--bg-ink);
    border-color: var(--c-flash);
    font-weight: 600;
}

.tag {
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 3px 8px;
    clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 4px, 100% 100%, 0 100%);
    display: inline-block;
}

/* Typography Utilities */
.font-heading { font-family: var(--font-heading); }
.font-body { font-family: var(--font-body); }
.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.text-primary { color: var(--text-primary); }
.text-muted { color: var(--text-muted); }
.text-flash { color: var(--c-flash); }
.text-recon { color: var(--c-recon); }
.text-win { color: var(--c-win); }
.text-loss { color: var(--c-loss); }
.text-live { color: var(--c-live); }
.text-trust { color: var(--c-trust); }
.uppercase { text-transform: uppercase; }

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

/* Dashboard Generic Structure */
.generic-hero {
    background: linear-gradient(120deg, var(--bg-surface) 0%, #1E2233 100%);
    border: 1px solid rgba(242, 168, 62, 0.25);
    clip-path: var(--clip-panel);
    padding: 32px 36px;
    margin-bottom: 32px;
}

/* Check In */
.check-in-box {
    width: 52px; height: 52px;
    background: var(--bg-hover);
    clip-path: var(--clip-btn);
}
.check-in-box.ready {
    background: var(--c-win);
    animation: readyflash 0.4s ease-out;
}

/* Veto Map Box */
.veto-box {
    flex: 1; background: var(--bg-surface); height: 96px; position: relative;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}
.veto-box.banned { opacity: 0.35; }
.veto-box.picked { border: 1px solid var(--c-flash); }
