/* =========================================
   hnimdb CSS FRAMEWORK
   ========================================= */

:root {
    /* Core Colors */
    --hnimdb-bg: #1a1e23;
    --hnimdb-surface: #232830;
    --hnimdb-surface-light: #2b313b;
    --hnimdb-border: #2f363f;
    
    /* Brand Colors */
    --hnimdb-cyan: #00e5d4;
    --hnimdb-cyan-hover: #00cfc0;
    --hnimdb-pink: #ff2e63;
    --hnimdb-pink-hover: #e62a59;
    --hnimdb-purple: #a855f7;
    
    /* Text Colors */
    --hnimdb-text: #e2e8f0;
    --hnimdb-text-muted: #94a3b8;
    --hnimdb-text-dark: #64748b;

    /* Status */
    --hnimdb-win: var(--hnimdb-cyan);
    --hnimdb-loss: var(--hnimdb-pink);
}

body {
    background-color: var(--hnimdb-bg);
    color: var(--hnimdb-text);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Typography Helpers */
.font-heading { font-family: 'Rajdhani', sans-serif; }
.text-cyan { color: var(--hnimdb-cyan) !important; }
.text-pink { color: var(--hnimdb-pink) !important; }
.text-muted-custom { color: var(--hnimdb-text-muted) !important; }
.text-win { color: var(--hnimdb-win) !important; }
.text-loss { color: var(--hnimdb-loss) !important; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--hnimdb-bg); }
::-webkit-scrollbar-thumb { background: var(--hnimdb-surface-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--hnimdb-border); }

/* =========================================
   COMPONENTS
   ========================================= */

/* Navbar */
.hnimdb-navbar {
    background-color: rgba(26, 30, 35, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--hnimdb-border);
    padding: 1rem 0;
}

.hnimdb-nav-link {
    color: var(--hnimdb-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 0.5rem 1.2rem;
    position: relative;
    transition: color 0.2s;
}

.hnimdb-nav-link:hover, .hnimdb-nav-link.active {
    color: var(--hnimdb-cyan);
}

.hnimdb-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 1.2rem;
    right: 1.2rem;
    height: 3px;
    background-color: var(--hnimdb-cyan);
    border-radius: 2px 2px 0 0;
}

/* Logo Triangle */
.hnimdb-logo-triangle {
    width: 0; 
    height: 0; 
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 18px solid var(--hnimdb-cyan);
    position: relative;
}
.hnimdb-logo-triangle::after {
    content: '';
    position: absolute;
    top: 4px;
    left: -6px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 11px solid var(--hnimdb-bg);
}

/* Cards & Surfaces */
.hnimdb-card {
    background-color: var(--hnimdb-surface);
    border: 1px solid var(--hnimdb-border);
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.hnimdb-card-header {
    background-color: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--hnimdb-border);
    padding: 1rem;
    font-weight: 600;
    color: var(--hnimdb-text-muted);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

/* Buttons */
.btn-hnimdb-cyan {
    background-color: var(--hnimdb-cyan);
    color: #000;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    padding: 0.8rem 2rem;
    transition: all 0.2s;
}
.btn-hnimdb-cyan:hover {
    background-color: var(--hnimdb-cyan-hover);
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 0 15px rgba(0, 229, 212, 0.3);
}

.btn-hnimdb-pink {
    background-color: var(--hnimdb-pink);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    padding: 0.8rem 2rem;
    transition: all 0.2s;
}
.btn-hnimdb-pink:hover {
    background-color: var(--hnimdb-pink-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 0 15px rgba(255, 46, 99, 0.3);
}

/* Match Summary Specifics */
.match-summary-row {
    background-color: var(--hnimdb-surface);
    border: 1px solid var(--hnimdb-border);
    border-radius: 4px;
    margin-bottom: 4px;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    transition: background-color 0.2s;
}
.match-summary-row:hover {
    background-color: var(--hnimdb-surface-light);
}

.hero-avatar {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.1);
}

.rank-badge {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    margin-left: 0.5rem;
}
.rank-badge-immortal { background-color: #ff2e63; }
.rank-badge-ancient { background-color: #a855f7; }

/* Role Selection Cards */
.role-card {
    background-color: var(--hnimdb-surface);
    border: 1px solid var(--hnimdb-border);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    position: relative;
    transition: all 0.2s;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}
.role-card:hover {
    border-color: var(--hnimdb-text-muted);
}
.role-card.active {
    border-color: var(--hnimdb-cyan);
    box-shadow: 0 0 0 1px var(--hnimdb-cyan);
}
.role-card.active .role-number {
    color: var(--hnimdb-cyan);
}
.role-card.active .role-img {
    opacity: 1;
    filter: grayscale(0%);
}

.role-img {
    max-width: 80px;
    max-height: 80px;
    opacity: 0.6;
    filter: grayscale(100%);
    transition: all 0.3s;
}
.role-card.active .role-img {
    opacity: 1;
    filter: grayscale(0%);
}

.role-time {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.75rem;
    color: var(--hnimdb-text-muted);
}

.role-number {
    font-family: 'Rajdhani', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--hnimdb-text-muted);
    line-height: 1;
}

/* Leaderboard */
.lb-row {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--hnimdb-border);
    font-size: 0.9rem;
    transition: background 0.2s;
}
.lb-row:last-child { border-bottom: none; }
.lb-row.highlight {
    background-color: rgba(0, 229, 212, 0.05);
    border-left: 3px solid var(--hnimdb-cyan);
}
.lb-rank-icon {
    font-size: 0.8rem;
    margin-right: 0.5rem;
}

/* Progress Bars */
.progress-hnimdb {
    height: 6px;
    background-color: var(--hnimdb-surface-light);
    border-radius: 3px;
    overflow: hidden;
}
.progress-bar-hnimdb {
    background-color: var(--hnimdb-cyan);
}

/* Recent Match Item */
.recent-match-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--hnimdb-border);
    cursor: pointer;
    transition: background 0.2s;
}
.recent-match-item:hover { background-color: var(--hnimdb-surface-light); }

.item-icon-sm {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    margin-right: 4px;
    background: #000;
}
