/* ==========================================================================
   NOSVAY HOUSE — Subpages (Players, Crews, Showcase, Rules, FAQ)
   Clean Minimalist Architecture
   ========================================================================== */

.app-main-container {
    flex: 1;
    padding: 40px 0 60px;
    position: relative;
    z-index: 10;
}

/* Page Header */
.page-header {
    margin-bottom: 28px;
}

.page-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-main);
    text-transform: uppercase;
}

.page-title span {
    color: var(--gold);
}

.page-subtitle {
    margin-top: 6px;
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.5;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 240px;
}

.search-input-wrap svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.input-field {
    width: 100%;
    box-sizing: border-box;
    background: var(--bg-surface);
    border: 1px solid var(--border-line);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 13.5px;
    padding: 10px 14px;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.15s ease;
}

.search-input-wrap .input-field {
    padding-left: 40px;
}

.input-field:focus {
    border-color: var(--gold-border);
    background: var(--bg-surface-2);
}

.textarea-field, textarea.input-field, textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    background: var(--bg-surface);
    border: 1px solid var(--border-line);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 13.5px;
    padding: 10px 14px;
    border-radius: 6px;
    outline: none;
    resize: none !important;
    height: 95px !important;
    transition: border-color 0.15s ease;
}

.textarea-field:focus, textarea.input-field:focus, textarea:focus {
    border-color: var(--gold-border);
    background: var(--bg-surface-2);
}

.select-field {
    width: 100%;
    box-sizing: border-box;
    background: var(--bg-surface);
    border: 1px solid var(--border-line);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 13.5px;
    padding: 10px 14px;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.select-field:focus {
    border-color: var(--gold-border);
}

/* ==========================================================================
   Leaderboard Table (Redesigned)
   ========================================================================== */

.lb-table-wrap {
    background: rgba(14, 12, 9, 0.6);
    border: 1px solid var(--border-line);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.lb-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.lb-head-row {
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--border-line);
}

.lb-th {
    padding: 14px 20px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

.lb-th-rank { width: 70px; text-align: center; }
.lb-th-region { text-align: center; }
.lb-th-elo { text-align: right; }

.lb-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s ease, transform 0.2s ease;
}

.lb-row:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(4px);
}

.lb-row:last-child {
    border-bottom: none;
}

/* Rank Highlights */
.lb-rank-gold {
    background: linear-gradient(90deg, rgba(212, 146, 10, 0.08) 0%, transparent 100%);
    border-left: 3px solid #d4920a;
}
.lb-rank-silver {
    background: linear-gradient(90deg, rgba(189, 195, 199, 0.05) 0%, transparent 100%);
    border-left: 3px solid #bdc3c7;
}
.lb-rank-bronze {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.05) 0%, transparent 100%);
    border-left: 3px solid #cd7f32;
}

.lb-td {
    padding: 16px 20px;
    font-size: 14px;
    vertical-align: middle;
}

/* Rank Badges */
.lb-td-rank { text-align: center; }

.lb-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 13px;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transform: rotate(45deg);
    margin: 4px;
}
.lb-rank-badge span {
    transform: rotate(-45deg);
    display: inline-block;
}
.lb-badge-1 { background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%); border: 1px solid rgba(241,196,15,0.6); box-shadow: 0 0 14px rgba(241,196,15,0.4); }
.lb-badge-2 { background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%); border: 1px solid rgba(189,195,199,0.6); box-shadow: 0 0 14px rgba(189,195,199,0.3); }
.lb-badge-3 { background: linear-gradient(135deg, #e67e22 0%, #d35400 100%); border: 1px solid rgba(230,126,34,0.6); box-shadow: 0 0 14px rgba(230,126,34,0.3); }


.lb-rank-plain {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-muted);
    font-size: 14px;
}

/* Player Cell */
.lb-player-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lb-flag {
    border-radius: 2px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.5);
    flex-shrink: 0;
}
.lb-flag-placeholder {
    display: inline-block;
    width: 22px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    flex-shrink: 0;
}

.lb-avatar {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.lb-avatar-gold { color: #f1c40f; border-color: rgba(241, 196, 15, 0.3); background: rgba(241, 196, 15, 0.1); }
.lb-avatar-silver { color: #bdc3c7; border-color: rgba(189, 195, 199, 0.3); background: rgba(189, 195, 199, 0.1); }
.lb-avatar-bronze { color: #cd7f32; border-color: rgba(205, 127, 50, 0.3); background: rgba(205, 127, 50, 0.1); }

.lb-name-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.lb-username {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: color 0.15s ease;
}
.lb-username:hover { color: var(--gold); }
.lb-verified {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(46, 204, 113, 0.15);
    border-radius: 50%;
    width: 16px;
    height: 16px;
}

/* Common Table Text */
.lb-td-region {
    color: var(--text-sub);
    font-family: var(--font-mono);
    font-size: 13px;
}
.lb-empty-val {
    color: var(--text-muted);
}

/* Crew Pill */
.lb-crew-pill {
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--gold-dim);
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--gold-border);
    text-decoration: none;
    transition: all 0.15s ease;
    display: inline-block;
}
.lb-crew-pill:hover {
    background: rgba(212, 146, 10, 0.15);
    border-color: rgba(212, 146, 10, 0.4);
}

/* Record Display */
.lb-record {
    font-family: var(--font-mono);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.lb-wins { color: #2ecc71; font-weight: 700; }
.lb-losses { color: #e74c3c; font-weight: 700; }
.lb-record-sep { color: var(--text-muted); font-size: 10px; }
.lb-winrate { font-size: 11px; color: var(--text-muted); font-weight: 500; }

/* ELO Number */
.lb-td-elo {
    text-align: right;
}
.lb-elo {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 17px;
    color: var(--text-main);
    letter-spacing: 0.5px;
}
.lb-elo-1 { color: #f1c40f; text-shadow: 0 0 15px rgba(241, 196, 15, 0.3); font-size: 19px; }
.lb-elo-2 { color: #bdc3c7; text-shadow: 0 0 15px rgba(189, 195, 199, 0.3); font-size: 18px; }
.lb-elo-3 { color: #cd7f32; text-shadow: 0 0 15px rgba(205, 127, 50, 0.3); font-size: 18px; }

/* Empty State */
.lb-empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
}
.lb-empty-icon {
    color: var(--text-muted);
    opacity: 0.5;
    margin-bottom: 12px;
}
.lb-empty-state strong {
    display: block;
    font-size: 16px;
    color: var(--text-sub);
    margin-bottom: 4px;
}
.lb-empty-state div {
    font-size: 13px;
}

/* Cards Grid (Crews, Showcase) */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.crew-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-line);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.crew-card:hover {
    border-color: var(--gold-border);
    background: var(--bg-surface-2);
}

.crew-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.crew-card-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.crew-card-desc {
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.5;
}

.crew-card-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    font-family: var(--font-mono);
}

/* Showcase Grid */
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.showcase-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-line);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.15s ease;
}

.showcase-card:hover {
    border-color: var(--gold-border);
}

.video-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border-line);
}

.video-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
}

.play-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gold);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.showcase-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}

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

/* Rules & FAQ */
.content-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 800px;
}

.rule-item-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-line);
    border-radius: 8px;
    padding: 20px;
}

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

.rule-num-badge {
    padding: 2px 8px;
    background: var(--gold-dim);
    border: 1px solid var(--gold-border);
    color: var(--gold);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12px;
    border-radius: 4px;
}

.rule-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}

.rule-body {
    font-size: 13.5px;
    color: var(--text-sub);
    line-height: 1.6;
    padding-left: 36px;
}

/* Profile Details */
.profile-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-line);
    border-radius: 10px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: var(--bg-surface-2);
    border: 1px solid var(--gold-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    color: var(--gold);
    object-fit: cover;
}

.profile-info {
    flex: 1;
    min-width: 240px;
}

.profile-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.profile-name {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 800;
    color: var(--text-main);
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-line);
    padding: 10px 14px;
    border-radius: 6px;
}

.stat-box-label {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.stat-box-value {
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--gold-bright);
}

/* ==========================================================================
   Smooth Tab Switching & Micro-Animations
   ========================================================================== */

.tab-btn, .pill-tab, .category-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--text-sub);
    background: var(--bg-surface);
    border: 1px solid var(--border-line);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.24s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.tab-btn:hover, .pill-tab:hover, .category-tab:hover {
    color: var(--text-main);
    border-color: var(--gold-border);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-1px);
}

.tab-btn:active, .pill-tab:active, .category-tab:active {
    transform: translateY(0) scale(0.98);
}

.tab-btn.active, .pill-tab.active, .category-tab.active {
    color: var(--gold-bright);
    background: var(--gold-dim);
    border-color: var(--gold);
    box-shadow: 0 0 12px rgba(212, 146, 10, 0.15);
}

/* Smooth Table Row Transitions */
.data-table tbody tr {
    transition: background 0.18s cubic-bezier(0.4, 0, 0.2, 1), transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.data-table tbody tr:hover {
    background: rgba(243, 156, 18, 0.03);
}

/* Smooth Card Hover Transitions */
.crew-card, .showcase-card, .glass-card, .rule-item-card {
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.22s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.crew-card:hover, .showcase-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.country-opt-btn:hover {
    background: rgba(243, 156, 18, 0.08) !important;
    border-color: var(--gold-border) !important;
    transform: translateX(3px);
}

