/* Main Layout & Components */

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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Geist Mono', 'Courier New', Consolas, monospace;
    font-size: 14px;
    line-height: 1.5;
}

.game-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px;
}

/* Header */
.game-header {
    text-align: center;
    padding: 2px 0;
    border-bottom: 2px solid var(--brand-secondary, #343741);
    margin-bottom: 4px;
}

.game-header pre {
    font-family: 'Geist Mono', Consolas, monospace;
    font-size: 8px;
    line-height: 1.1;
    white-space: pre;
    margin: 0;
}

.header-logo {
    max-width: 205px;
    width: 100%;
    height: auto;
}

/* Navigation */
.game-nav {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 10px 0;
    border-bottom: 1px solid var(--brand-secondary, #343741);
    margin-bottom: 15px;
}

.nav-item {
    padding: 8px 16px;
    border: 1px solid var(--brand-secondary-light, #4a4e5a);
    background: var(--brand-secondary, #343741);
    color: var(--brand-text, #e8e9eb);
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    background: var(--brand-primary, #b5231d);
    border-color: var(--brand-primary, #b5231d);
    color: #fff;
}

.nav-item .nav-key {
    opacity: 0.6;
    margin-right: 5px;
}

/* Persistent Player Status Bar */
.player-status-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
    background: var(--brand-bg-light, #22252c);
    border: 1px solid var(--brand-secondary, #343741);
    margin: 0 15px 10px 15px;
    box-shadow: 0 0 12px rgba(50, 196, 233, 0.1), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.status-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--brand-primary, #b5231d);
    flex-shrink: 0;
}

.status-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-avatar .avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 20px;
    background: var(--brand-secondary, #343741);
}

.status-info {
    min-width: 100px;
}

.status-name {
    font-weight: bold;
    font-size: 14px;
}

.status-level {
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.7;
    color: var(--brand-highlight, #32c4e9);
}

.status-stats {
    display: flex;
    gap: 15px;
    flex: 1;
}

.status-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

.status-stat .stat-icon {
    font-size: 12px;
}

.status-stat .stat-label {
    display: inline;
    font-size: 10px;
    opacity: 0.6;
}

.status-stat .stat-bar {
    width: 70px;
    height: 10px;
    background: var(--brand-bg, #1a1c22);
    border: 1px solid var(--brand-secondary-light, #4a4e5a);
    overflow: hidden;
}

.status-stat .stat-bar-fill {
    height: 100%;
    transition: width 0.3s;
}

.status-stat .stat-bar-fill.xp {
    background: var(--brand-highlight, #32c4e9);
}

.status-stat .stat-bar-fill.rep {
    background: var(--brand-success, #28a745);
}

.status-stat .stat-bar-fill.time {
    background: #6c9bd1;
}

.status-stat .stat-bar-fill.energy {
    background: var(--brand-warning, #ffc107);
}

.status-stat .stat-value {
    min-width: 35px;
    text-align: right;
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
}

.status-week {
    text-align: center;
    padding: 5px 10px;
    border: 1px solid var(--brand-secondary-light, #4a4e5a);
    background: var(--brand-secondary, #343741);
}

.status-week .week-number {
    font-weight: bold;
    font-size: 14px;
}

.status-week .quarter-year {
    font-size: 9px;
    opacity: 0.7;
}

.status-pipeline {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: 1px solid var(--brand-secondary-light, #4a4e5a);
    background: var(--brand-secondary, #343741);
    font-size: 12px;
}

.status-pipeline .pipeline-icon {
    font-size: 14px;
}

.status-pipeline .pipeline-count {
    font-family: 'Geist Mono', monospace;
}

/* Main Content */
.game-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.screen {
    height: 100%;
}

.screen.hidden {
    display: none;
}

/* Dashboard Layout */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--brand-secondary, #343741);
    margin-bottom: 20px;
}

.week-info {
    display: flex;
    flex-direction: column;
}

.week-label {
    font-size: 24px;
    font-weight: bold;
}

.quarter-label {
    opacity: 0.7;
}

.player-info {
    text-align: right;
}

.player-name {
    font-size: 18px;
    display: block;
}

.player-level {
    opacity: 0.7;
    text-transform: uppercase;
    font-size: 11px;
}

/* Panels */
.resources-panel,
.scorecard-panel,
.quota-panel,
.actions-panel,
.stats-panel {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid var(--brand-secondary, #343741);
    background: var(--brand-bg-light, #22252c);
}

.resources-panel h3,
.scorecard-panel h3,
.quota-panel h3,
.actions-panel h3,
.stats-panel h3 {
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 2px;
    opacity: 0.8;
}

/* Meters */
.meter {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.meter-label {
    width: 100px;
    font-size: 12px;
}

.meter-bar {
    flex: 1;
    height: 20px;
    border: 1px solid var(--brand-secondary-light, #4a4e5a);
    margin: 0 10px;
    position: relative;
    overflow: hidden;
    background: var(--brand-bg, #1a1c22);
}

.meter-fill {
    height: 100%;
    transition: width 0.3s;
}

.meter-fill.blue { background: var(--brand-highlight, #32c4e9); }
.meter-fill.green { background: var(--brand-success, #28a745); }
.meter-fill.yellow { background: var(--brand-warning, #ffc107); }
.meter-fill.red { background: var(--brand-danger, #dc3545); }

.meter-value {
    width: 60px;
    text-align: right;
    font-size: 12px;
}

/* Scorecard */
.scorecard-grade {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.grade-letter {
    font-size: 48px;
    font-weight: bold;
    width: 60px;
    text-align: center;
}

.grade-letter.grade-a { color: var(--brand-success, #28a745); }
.grade-letter.grade-b { color: #5cb85c; }
.grade-letter.grade-c { color: var(--brand-warning, #ffc107); }
.grade-letter.grade-d { color: #fd7e14; }
.grade-letter.grade-f { color: var(--brand-danger, #dc3545); }

.grade-label {
    font-size: 14px;
    opacity: 0.8;
}

.grade-score {
    margin-left: auto;
    font-size: 24px;
}

.scorecard-metrics {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metric-row {
    display: flex;
    align-items: center;
}

.metric-name {
    width: 120px;
    text-transform: capitalize;
    font-size: 12px;
}

.metric-bar {
    flex: 1;
    height: 12px;
    border: 1px solid var(--brand-secondary-light, #4a4e5a);
    margin: 0 10px;
    overflow: hidden;
    background: var(--brand-bg, #1a1c22);
}

.metric-fill {
    height: 100%;
    background: var(--brand-primary, #b5231d);
    transition: width 0.3s;
}

.metric-fill.metric-good { background: var(--brand-success, #28a745); }
.metric-fill.metric-ok { background: #5cb85c; }
.metric-fill.metric-warning { background: var(--brand-warning, #ffc107); }
.metric-fill.metric-poor { background: #fd7e14; }
.metric-fill.metric-bad { background: var(--brand-danger, #dc3545); }

.metric-score {
    width: 40px;
    text-align: right;
    font-size: 12px;
}

/* Quota */
.quota-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.quota-header h3 {
    margin: 0;
}

.info-btn {
    background: none;
    border: 1px solid var(--brand-secondary-light, #4a4e5a);
    color: var(--brand-highlight, #32c4e9);
    cursor: pointer;
    font-size: 14px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.info-btn:hover {
    background: var(--brand-highlight, #32c4e9);
    color: var(--brand-bg, #1b1d22);
}

.quota-status {
    font-size: 16px;
    padding: 8px 10px;
    text-align: center;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.quota-status .pace-percentage {
    font-size: 14px;
    opacity: 0.8;
}

.quota-status.on-track {
    border: 2px solid var(--brand-success, #28a745);
    color: var(--brand-success, #28a745);
}

.quota-status.behind {
    border: 2px solid var(--brand-warning, #ffc107);
    color: var(--brand-warning, #ffc107);
}

.quota-progress-bar {
    height: 8px;
    background: var(--brand-secondary, #343741);
    border-radius: 4px;
    margin-bottom: 12px;
    position: relative;
    overflow: visible;
}

.quota-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.quota-progress-fill.on-track {
    background: var(--brand-success, #28a745);
}

.quota-progress-fill.behind {
    background: var(--brand-warning, #ffc107);
}

.quota-threshold {
    position: absolute;
    top: -4px;
    width: 2px;
    height: 16px;
    background: var(--brand-text, #e8e9eb);
    opacity: 0.5;
}

.quota-details {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    flex-wrap: wrap;
    gap: 5px;
}

.quota-details span {
    flex: 1;
    text-align: center;
    min-width: 80px;
}

.quota-explanation {
    margin-top: 15px;
    padding: 12px;
    background: var(--brand-bg, #1b1d22);
    border: 1px solid var(--brand-secondary-light, #4a4e5a);
    border-radius: 4px;
}

.quota-explanation h4 {
    margin: 0 0 10px 0;
    color: var(--brand-highlight, #32c4e9);
    font-size: 13px;
}

.quota-explanation pre {
    font-family: inherit;
    font-size: 11px;
    white-space: pre-wrap;
    margin: 0 0 10px 0;
    line-height: 1.6;
    color: var(--brand-text-muted, #9ea1a9);
}

.quota-explanation .explanation-note {
    font-size: 11px;
    color: var(--brand-success, #28a745);
    margin: 0;
    padding-top: 8px;
    border-top: 1px dashed var(--brand-secondary, #343741);
}

/* Action Buttons */
.actions-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.actions-panel h3 {
    grid-column: 1 / -1;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--brand-secondary-light, #4a4e5a);
    background: var(--brand-secondary, #343741);
    color: var(--brand-text, #e8e9eb);
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--brand-secondary-light, #4a4e5a);
    border-color: var(--brand-primary, #b5231d);
}

.action-btn.primary {
    background: var(--brand-primary, #b5231d);
    border-color: var(--brand-primary, #b5231d);
    color: #fff;
}

.action-btn.primary:hover {
    background: var(--brand-primary-light, #d42f28);
}

.action-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.action-label {
    font-weight: bold;
}

.action-cost {
    opacity: 0.6;
    font-size: 10px;
    margin-top: 5px;
}

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

.stat {
    text-align: center;
    padding: 10px;
    border: 1px dashed var(--brand-secondary-light, #4a4e5a);
    background: var(--brand-bg-light, #22252c);
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
}

.stat-label {
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.7;
}

/* Pipeline Board */
.pipeline-header {
    margin-bottom: 20px;
}

.pipeline-summary {
    display: flex;
    gap: 20px;
    padding: 10px;
    border: 1px solid var(--brand-secondary, #343741);
    background: var(--brand-bg-light, #22252c);
    font-size: 12px;
}

.pipeline-board {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    align-items: flex-start;
}

.pipeline-column {
    flex: 1;
    min-width: 200px;
    border: 1px solid var(--brand-secondary, #343741);
    background: var(--brand-bg-light, #22252c);
}

.column-header {
    display: flex;
    flex-direction: column;
    padding: 10px;
    border-bottom: 1px solid var(--brand-secondary-light, #4a4e5a);
    background: var(--brand-secondary, #343741);
    font-size: 11px;
    height: 120px;
    box-sizing: border-box;
}

.column-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.stage-name {
    font-weight: bold;
    text-transform: uppercase;
}

.stage-subtitle {
    font-size: 10px;
    color: var(--brand-highlight, #32c4e9);
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: none;
}

.stage-description {
    font-size: 9px;
    opacity: 0.7;
    line-height: 1.3;
    text-transform: none;
    font-weight: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.stage-count {
    background: var(--brand-primary, #b5231d);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.column-deals {
    padding: 10px;
}

/* Deal Cards */
.deal-card {
    border: 1px solid var(--brand-secondary-light, #4a4e5a);
    background: var(--brand-bg, #1a1c22);
    padding: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.deal-card:last-child {
    margin-bottom: 0;
}

.deal-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--brand-highlight, #32c4e9);
}

.deal-card.at-risk {
    border-color: var(--brand-warning, #ffc107);
    border-left: 3px solid var(--brand-warning, #ffc107);
    background: rgba(255, 193, 7, 0.05);
}

.deal-card.high-risk {
    border-color: var(--brand-danger, #dc3545);
    border-left: 3px solid var(--brand-danger, #dc3545);
    background: rgba(220, 53, 69, 0.1);
    animation: pulse-risk 2s ease-in-out infinite;
}

@keyframes pulse-risk {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
    50% { box-shadow: 0 0 8px 2px rgba(220, 53, 69, 0.2); }
}

/* Risk Badge */
.risk-badge {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
}

.risk-badge.at-risk {
    background: rgba(255, 193, 7, 0.2);
    color: var(--brand-warning, #ffc107);
    border: 1px solid var(--brand-warning, #ffc107);
}

.risk-badge.high-risk {
    background: rgba(220, 53, 69, 0.2);
    color: var(--brand-danger, #dc3545);
    border: 1px solid var(--brand-danger, #dc3545);
}

.deal-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.deal-company {
    font-weight: bold;
    font-size: 13px;
}

.deal-value {
    color: var(--brand-success, #28a745);
}

.deal-contact {
    font-size: 11px;
    opacity: 0.7;
    margin-bottom: 8px;
}

.deal-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 10px;
}

.icp-score {
    padding: 2px 6px;
    border-radius: 3px;
}

.icp-excellent { background: var(--brand-success, #28a745); color: #fff; }
.icp-good { background: #5cb85c; color: #fff; }
.icp-fair { background: var(--brand-warning, #ffc107); color: #000; }
.icp-poor { background: var(--brand-danger, #dc3545); color: #fff; }

.icp-hidden {
    opacity: 0.5;
}

.competitor-badge {
    color: var(--brand-warning, #ffc107);
}

/* ASM Community Edition Badges */
.asm-badge {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: bold;
}

.asm-badge.asm-invited {
    background: rgba(50, 196, 233, 0.2);
    color: var(--brand-highlight, #32c4e9);
    border: 1px dashed var(--brand-highlight, #32c4e9);
}

.asm-badge.asm-new {
    background: rgba(50, 196, 233, 0.3);
    color: var(--brand-highlight, #32c4e9);
}

.asm-badge.asm-active {
    background: rgba(40, 167, 69, 0.3);
    color: var(--brand-success, #28a745);
}

.asm-badge.asm-power {
    background: var(--brand-success, #28a745);
    color: #fff;
}

/* Deal card ASM states */
.deal-card.asm-new,
.deal-card.asm-active,
.deal-card.asm-power {
    border-left: 3px solid var(--brand-highlight, #32c4e9);
}

.deal-card.asm-power {
    border-left-color: var(--brand-success, #28a745);
}

.deal-actions {
    display: flex;
    gap: 5px;
}

.deal-btn {
    flex: 1;
    padding: 5px;
    border: 1px solid var(--brand-secondary-light, #4a4e5a);
    background: var(--brand-secondary, #343741);
    color: var(--brand-text, #e8e9eb);
    cursor: pointer;
    font-family: inherit;
    font-size: 10px;
    transition: all 0.2s;
}

.deal-btn:hover {
    background: var(--brand-secondary-light, #4a4e5a);
    border-color: var(--brand-highlight, #32c4e9);
}

.deal-btn.danger:hover {
    background: rgba(220, 53, 69, 0.2);
    border-color: var(--brand-danger, #dc3545);
}

/* Empty States */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    text-align: center;
    opacity: 0.7;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-state h3 {
    margin-bottom: 10px;
}

.empty-state p {
    margin-bottom: 20px;
}

/* Scenario Screen */
.scenario-container {
    max-width: 700px;
    margin: 0 auto;
}

.scenario-context {
    margin-bottom: 20px;
}

.scenario-deal-info {
    display: flex;
    gap: 20px;
    padding: 15px;
    border: 1px solid var(--brand-secondary, #343741);
    background: var(--brand-bg-light, #22252c);
    font-size: 14px;
}

.scenario-prompt {
    padding: 30px;
    border: 2px solid var(--brand-primary, #b5231d);
    background: var(--brand-bg-light, #22252c);
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.7;
    position: relative;
}

.scenario-prompt .tts-btn {
    position: absolute;
    top: 10px;
    right: 10px;
}

.scenario-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-btn {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border: 1px solid var(--brand-secondary-light, #4a4e5a);
    background: var(--brand-secondary, #343741);
    color: var(--brand-text, #e8e9eb);
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    text-align: left;
    transition: all 0.2s;
}

.choice-btn:hover {
    background: var(--brand-secondary-light, #4a4e5a);
    border-color: var(--brand-primary, #b5231d);
}

.choice-letter {
    width: 30px;
    height: 30px;
    border: 1px solid var(--brand-secondary-light, #4a4e5a);
    background: var(--brand-secondary, #343741);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-weight: bold;
}

.choice-btn:hover .choice-letter {
    background: var(--brand-primary, #b5231d);
    border-color: var(--brand-primary, #b5231d);
    color: #fff;
}

/* Scenario Outcome */
.scenario-outcome {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.outcome-header {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 4px;
}

.outcome-header.success {
    background: rgba(40, 167, 69, 0.2);
    border: 1px solid var(--brand-success, #28a745);
}

.outcome-header.success h3 {
    color: var(--brand-success, #28a745);
}

.outcome-header.warning {
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid var(--brand-warning, #ffc107);
}

.outcome-header.warning h3 {
    color: var(--brand-warning, #ffc107);
}

.outcome-header.lost {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid var(--brand-danger, #dc3545);
}

.outcome-header.lost h3 {
    color: var(--brand-danger, #dc3545);
}

.outcome-deal-status {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--brand-secondary, #343741);
    background: var(--brand-bg-light, #22252c);
}

.outcome-deal-status strong {
    display: block;
    font-size: 16px;
    margin-bottom: 8px;
}

.status-advance {
    color: var(--brand-success, #28a745);
    font-weight: bold;
}

.status-risk {
    color: var(--brand-warning, #ffc107);
}

.status-lost {
    color: var(--brand-danger, #dc3545);
}

.status-neutral {
    opacity: 0.7;
}

.outcome-feedback {
    padding: 30px;
    border: 1px solid var(--brand-secondary, #343741);
    background: var(--brand-bg-light, #22252c);
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.7;
}

.outcome-effects {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}

.effect {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
}

.effect.positive {
    background: rgba(40, 167, 69, 0.2);
    color: var(--brand-success, #28a745);
}

.effect.negative {
    background: rgba(220, 53, 69, 0.2);
    color: var(--brand-danger, #dc3545);
}

/* Training Hub */
.training-header {
    margin-bottom: 30px;
}

.training-header h2 {
    margin-bottom: 10px;
}

/* Rules of the Game Section */
.rules-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 2px solid var(--brand-primary, #b5231d);
    background: var(--brand-bg-light, #22252c);
    box-shadow: 0 0 16px rgba(181, 35, 29, 0.2), 0 4px 10px rgba(0, 0, 0, 0.3);
}

.rules-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--brand-secondary, #343741);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rules-header:hover {
    opacity: 0.8;
}

.rules-toggle {
    font-size: 12px;
    transition: transform 0.2s;
    color: var(--brand-primary, #b5231d);
}

.rules-section:not(.collapsed) .rules-toggle {
    transform: rotate(90deg);
}

.rules-section.collapsed .rules-list {
    display: none;
}

.rules-section.collapsed .rules-header {
    margin-bottom: 0;
    border-bottom: none;
}

.rules-header h3 {
    font-size: 16px;
    margin-bottom: 0;
    color: var(--brand-primary, #b5231d);
}

.rules-subtitle {
    font-size: 12px;
    opacity: 0.7;
    margin: 0;
    width: 100%;
    margin-top: 5px;
}

.rules-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px;
    background: var(--brand-bg, #1a1c22);
    border-left: 3px solid var(--brand-primary, #b5231d);
}

.rule-number {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-primary, #b5231d);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    border-radius: 50%;
}

.rule-text {
    font-size: 13px;
    line-height: 1.5;
}

.rule-text strong {
    color: var(--brand-highlight, #32c4e9);
}

.rule-text code {
    background: var(--brand-secondary, #343741);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
}

.training-modules {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.training-module {
    border: 1px solid var(--brand-secondary, #343741);
    background: var(--brand-bg-light, #22252c);
    padding: 20px;
}

.training-module.locked {
    opacity: 0.7;
}

.training-module.completed {
    border-color: var(--brand-success, #28a745);
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.module-header h3 {
    font-size: 14px;
    flex: 1;
    min-width: 0;
}

.completed-badge {
    color: var(--brand-success, #28a745);
    font-size: 11px;
    flex-shrink: 0;
    white-space: nowrap;
}

.module-description {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 15px;
}

.module-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 11px;
}

.locked-label {
    font-size: 12px;
    opacity: 0.85;
    color: var(--brand-warning, #ffc107);
}

.module-level {
    opacity: 0.7;
    font-style: italic;
}

/* Profile Screen */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--brand-secondary, #343741);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border: 2px solid var(--brand-primary, #b5231d);
    background: var(--brand-bg-light, #22252c);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
    overflow: visible;
}

.avatar-icon {
    font-size: 40px;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Avatar Selection */
.avatar-selection {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 15px 0;
}

.avatar-option {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--brand-secondary-light, #4a4e5a);
    cursor: pointer;
    transition: all 0.2s;
}

.avatar-option:hover {
    border-color: var(--brand-highlight, #32c4e9);
    transform: scale(1.05);
}

.avatar-option.selected {
    border-color: var(--brand-primary, #b5231d);
    box-shadow: 0 0 10px rgba(181, 35, 29, 0.5);
}

.avatar-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Avatar Edit Hint */
.profile-avatar.clickable {
    cursor: pointer;
    position: relative;
}

.profile-avatar.clickable:hover {
    border-color: var(--brand-highlight, #32c4e9);
}

.avatar-edit-hint {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 24px;
    height: 24px;
    background: var(--brand-primary, #b5231d);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
}

.profile-avatar.clickable:hover .avatar-edit-hint {
    opacity: 1;
}

.profile-info h2 {
    margin-bottom: 5px;
}

.profile-level {
    text-transform: uppercase;
    font-size: 12px;
    opacity: 0.8;
}

.profile-rep {
    font-size: 11px;
    opacity: 0.6;
    display: block;
    margin-top: 5px;
}

.profile-progress,
.profile-achievements,
.profile-skills {
    margin-bottom: 30px;
}

.profile-progress h3,
.profile-achievements h3,
.profile-skills h3 {
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 2px;
}

.xp-bar {
    height: 20px;
    border: 1px solid var(--brand-secondary, #343741);
    background: var(--brand-bg, #1a1c22);
    margin-bottom: 10px;
    overflow: hidden;
}

.xp-fill {
    height: 100%;
    background: var(--brand-highlight, #32c4e9);
    transition: width 0.3s;
}

.xp-label {
    font-size: 12px;
    opacity: 0.8;
}

.max-level {
    color: var(--brand-success, #28a745);
    font-size: 14px;
}

.goals-section {
    margin-top: 20px;
}

.goals-section h4 {
    margin-bottom: 10px;
    font-size: 12px;
}

.goal-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--brand-secondary, #343741);
    font-size: 13px;
}

.goal-item.complete {
    color: var(--brand-success, #28a745);
}

.goal-check {
    width: 20px;
}

.goal-desc {
    flex: 1;
}

.goal-progress {
    opacity: 0.7;
}

.achievements-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.achievement-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--brand-primary, #b5231d);
    background: rgba(181, 35, 29, 0.1);
}

.achievement-icon {
    font-size: 16px;
}

.achievement-name {
    font-size: 12px;
}

.no-achievements,
.no-skills {
    opacity: 0.5;
    font-size: 12px;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    padding: 5px 12px;
    border: 1px solid var(--brand-highlight, #32c4e9);
    font-size: 11px;
    color: var(--brand-highlight, #32c4e9);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}

.modal.visible {
    display: block;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    margin: 10px;
    overflow-y: auto;
    border: 2px solid var(--brand-primary, #b5231d);
    background: var(--brand-bg, #1a1c22);
    padding: 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--brand-secondary, #343741);
}

.modal-header h3 {
    font-size: 16px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.modal-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 15px 20px;
    border-top: 1px solid var(--brand-secondary, #343741);
}

/* New Game Form */
.new-game-form {
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--brand-secondary-light, #4a4e5a);
    background: var(--brand-bg-light, #22252c);
    color: var(--brand-text, #e8e9eb);
    font-family: inherit;
    font-size: 16px;
    text-align: center;
}

.game-intro {
    line-height: 1.8;
    opacity: 0.9;
}

/* Deal Detail */
.deal-detail {
    text-align: left;
}

.detail-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--brand-secondary, #343741);
}

.detail-section:last-child {
    border-bottom: none;
}

.detail-section.asm-active {
    background: rgba(50, 196, 233, 0.1);
    border: 1px solid var(--brand-highlight, #32c4e9);
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.detail-section.asm-active h4 {
    color: var(--brand-highlight, #32c4e9);
}

.detail-section h4 {
    margin-bottom: 10px;
    font-size: 12px;
    text-transform: uppercase;
    opacity: 0.7;
}

.detail-section p {
    margin-bottom: 5px;
    font-size: 13px;
}

.detail-section.warning {
    border-color: var(--brand-danger, #dc3545);
    color: var(--brand-danger, #dc3545);
}

/* Level Up Celebration */
.level-up-celebration {
    text-align: center;
}

.level-up-celebration h2 {
    margin-bottom: 20px;
    color: var(--brand-primary, #b5231d);
}

.new-unlocks {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid var(--brand-secondary, #343741);
    text-align: left;
}

.new-unlocks h4 {
    margin-bottom: 10px;
}

.new-unlocks ul {
    list-style: none;
    padding-left: 20px;
}

.new-unlocks li::before {
    content: '+ ';
    color: var(--brand-success, #28a745);
}

.new-stats {
    margin-top: 20px;
    font-size: 13px;
}

.new-stats p {
    margin-bottom: 5px;
}

/* Notifications */
#notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid var(--brand-secondary-light, #4a4e5a);
    background: var(--brand-bg, #1a1c22);
    max-width: 420px;
    animation: slideIn 0.3s ease;
}

.notification.success { border-color: var(--brand-success, #28a745); }
.notification.error { border-color: var(--brand-danger, #dc3545); }
.notification.warning { border-color: var(--brand-warning, #ffc107); }
.notification.info { border-color: var(--brand-highlight, #32c4e9); }

.notification.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

.notification-message {
    flex: 1;
    font-size: 13px;
    white-space: pre-line;
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.notification-close:hover {
    opacity: 1;
}

/* Screen Flash */
.screen-flash {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    animation: flash 0.2s ease;
    z-index: 3000;
}

/* Training Content & Quiz */
.training-content,
.training-quiz,
.quiz-results {
    max-width: 700px;
    margin: 0 auto;
}

.training-progress-bar {
    height: 6px;
    background: var(--brand-bg, #1a1c22);
    border: 1px solid var(--brand-secondary, #343741);
    margin-bottom: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--brand-highlight, #32c4e9);
    transition: width 0.3s ease;
}

.progress-fill.quiz {
    background: var(--brand-primary, #b5231d);
}

.training-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 30px;
}

.content-slide {
    border: 1px solid var(--brand-secondary, #343741);
    background: var(--brand-bg-light, #22252c);
    padding: 30px;
    margin-bottom: 30px;
    min-height: 300px;
    box-shadow: 0 0 12px rgba(50, 196, 233, 0.1), 0 2px 8px rgba(0, 0, 0, 0.25);
}

.slide-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--brand-secondary, #343741);
    padding-bottom: 15px;
}

.slide-title {
    font-size: 20px;
    color: var(--brand-highlight, #32c4e9);
    margin: 0;
    flex: 1;
}

/* Text-to-Speech Button */
.tts-btn {
    background: transparent;
    border: 1px solid var(--brand-primary, #b5231d);
    color: var(--brand-primary, #b5231d);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.tts-btn:hover {
    background: var(--brand-primary, #b5231d);
    color: var(--brand-bg, #1a1c22);
}

.tts-btn.playing {
    background: var(--brand-primary, #b5231d);
    color: var(--brand-bg, #1a1c22);
}

.slide-text {
    font-size: 14px;
    line-height: 1.8;
}

.slide-text p {
    margin-bottom: 15px;
}

.slide-text strong {
    color: var(--brand-primary, #b5231d);
}

.training-nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.training-exit {
    text-align: center;
    padding-top: 20px;
    border-top: 1px dashed var(--brand-secondary, #343741);
}

/* Training module CTA */
.module-cta {
    font-size: 11px;
    color: var(--brand-highlight, #32c4e9);
    margin-top: 10px;
    opacity: 0.8;
}

.module-cta.retake {
    color: var(--brand-success, #28a745);
}

.training-module.unlocked:not(.completed):hover {
    border-color: var(--brand-highlight, #32c4e9);
    background: rgba(50, 196, 233, 0.05);
}

/* Quiz Styles */
.quiz-question {
    padding: 25px;
    border: 2px solid var(--brand-primary, #b5231d);
    background: var(--brand-bg-light, #22252c);
    margin-bottom: 25px;
    box-shadow: 0 0 14px rgba(181, 35, 29, 0.18), 0 3px 8px rgba(0, 0, 0, 0.3);
}

.quiz-question h3 {
    font-size: 16px;
    line-height: 1.6;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.quiz-option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border: 2px solid var(--brand-secondary-light, #4a4e5a);
    background: var(--brand-secondary, #343741);
    color: var(--brand-text, #e8e9eb);
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    text-align: left;
    transition: all 0.2s;
}

.quiz-option:hover:not(:disabled) {
    background: var(--brand-secondary-light, #4a4e5a);
    border-color: var(--brand-highlight, #32c4e9);
}

.quiz-option.selected {
    border-color: var(--brand-highlight, #32c4e9);
    background: rgba(50, 196, 233, 0.1);
}

.quiz-option.correct {
    border-color: var(--brand-success, #28a745);
    background: rgba(40, 167, 69, 0.2);
}

.quiz-option.incorrect {
    border-color: var(--brand-danger, #dc3545);
    background: rgba(220, 53, 69, 0.2);
}

.quiz-option:disabled {
    cursor: default;
}

.option-letter {
    width: 32px;
    height: 32px;
    border: 1px solid var(--brand-secondary-light, #4a4e5a);
    background: var(--brand-bg, #1a1c22);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-weight: bold;
    flex-shrink: 0;
}

.quiz-option.selected .option-letter {
    background: var(--brand-highlight, #32c4e9);
    border-color: var(--brand-highlight, #32c4e9);
    color: #fff;
}

.quiz-option.correct .option-letter {
    background: var(--brand-success, #28a745);
    border-color: var(--brand-success, #28a745);
    color: #fff;
}

.quiz-option.incorrect .option-letter {
    background: var(--brand-danger, #dc3545);
    border-color: var(--brand-danger, #dc3545);
    color: #fff;
}

.option-text {
    flex: 1;
}

.quiz-feedback {
    padding: 15px 20px;
    margin-bottom: 25px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}

.quiz-feedback.correct {
    background: rgba(40, 167, 69, 0.2);
    border: 1px solid var(--brand-success, #28a745);
    color: var(--brand-success, #28a745);
}

.quiz-feedback.incorrect {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid var(--brand-danger, #dc3545);
    color: var(--brand-danger, #dc3545);
}

.quiz-nav {
    display: flex;
    justify-content: center;
}

.quiz-nav .action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Quiz Results */
.quiz-results {
    text-align: center;
}

.results-header {
    padding: 20px;
    margin-bottom: 30px;
}

.results-header.passed {
    color: var(--brand-success, #28a745);
}

.results-header.failed {
    color: var(--brand-warning, #ffc107);
}

.results-header h2 {
    font-size: 24px;
}

.results-score {
    margin-bottom: 30px;
}

.score-circle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--brand-secondary, #343741);
}

.score-circle.passed {
    border-color: var(--brand-success, #28a745);
}

.score-circle.failed {
    border-color: var(--brand-warning, #ffc107);
}

.score-number {
    font-size: 28px;
    font-weight: bold;
}

.score-label {
    font-size: 14px;
    opacity: 0.7;
}

.results-message {
    padding: 20px;
    border: 1px solid var(--brand-secondary, #343741);
    background: var(--brand-bg-light, #22252c);
    margin-bottom: 30px;
    line-height: 1.8;
}

.results-message p {
    margin-bottom: 10px;
}

.results-breakdown {
    text-align: left;
    padding: 20px;
    border: 1px solid var(--brand-secondary, #343741);
    background: var(--brand-bg-light, #22252c);
    margin-bottom: 30px;
}

.results-breakdown h4 {
    margin-bottom: 15px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--brand-secondary, #343741);
    font-size: 12px;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item.correct {
    color: var(--brand-success, #28a745);
}

.result-item.incorrect {
    color: var(--brand-danger, #dc3545);
}

.result-icon {
    width: 20px;
    font-weight: bold;
}

.result-question {
    flex: 1;
}

.results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--brand-secondary-light, #4a4e5a);
}

/* Responsive */
@media (max-width: 768px) {
    .game-header pre {
        font-size: 5px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pipeline-board {
        flex-direction: column;
    }

    .pipeline-column {
        min-width: 100%;
    }

    .scorecard-grade {
        flex-wrap: wrap;
    }

    /* Responsive status bar */
    .player-status-bar {
        flex-wrap: wrap;
        gap: 10px;
        padding: 8px 10px;
    }

    .status-stats {
        order: 5;
        width: 100%;
        justify-content: space-between;
    }

    .status-stat .stat-bar {
        width: 55px;
    }

    .status-stat .stat-value {
        min-width: 25px;
        font-size: 9px;
    }

    .status-info {
        min-width: 80px;
    }

    .status-name {
        font-size: 12px;
    }

    .modal-content {
        max-height: 95vh;
        width: 95%;
    }
}

/* ========================================
   Auth Modal Styles
   ======================================== */
.auth-modal .modal-header {
    text-align: center;
    border-bottom: none;
    padding-bottom: 5px;
}

.auth-modal .modal-header h3 {
    font-size: 20px;
    color: var(--brand-primary, #b5231d);
}

.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border: 1px solid var(--brand-secondary, #343741);
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: var(--brand-secondary, #343741);
    border: none;
    color: var(--brand-text, #e8e9eb);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.auth-tab:hover {
    background: var(--brand-secondary-light, #4a4e5a);
}

.auth-tab.active {
    background: var(--brand-primary, #b5231d);
    color: #fff;
}

.auth-form {
    margin-bottom: 20px;
}

.auth-intro {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.6;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--brand-secondary, #343741);
}

.auth-divider span {
    padding: 0 15px;
    font-size: 12px;
    opacity: 0.6;
    text-transform: uppercase;
}

.action-btn.full-width {
    width: 100%;
    flex-direction: row;
    justify-content: center;
}

.action-btn.secondary {
    background: var(--brand-secondary, #343741);
    border-color: var(--brand-secondary-light, #4a4e5a);
}

.action-btn.secondary:hover {
    background: var(--brand-secondary-light, #4a4e5a);
}

.offline-note {
    font-size: 11px;
    opacity: 0.6;
    text-align: center;
    margin-top: 10px;
}

/* ========================================
   Leaderboard Styles
   ======================================== */
.leaderboard-container {
    max-width: 900px;
    margin: 0 auto;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 30px;
}

.leaderboard-header h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.leaderboard-subtitle {
    font-size: 12px;
    opacity: 0.7;
}

.leaderboard-table {
    border: 1px solid var(--brand-secondary, #343741);
    background: var(--brand-bg-light, #22252c);
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 60px 2fr 90px 90px 60px 60px 70px 60px;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid var(--brand-secondary, #343741);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

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

.leaderboard-row:hover:not(.header) {
    background: rgba(255, 255, 255, 0.05);
}

.leaderboard-row.header {
    background: var(--brand-secondary, #343741);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    cursor: default;
}

.leaderboard-row.current-user {
    background: rgba(181, 35, 29, 0.1);
    border-left: 3px solid var(--brand-primary, #b5231d);
}

.lb-rank {
    font-weight: bold;
    text-align: center;
}

.leaderboard-row:not(.header) .lb-rank {
    color: var(--brand-highlight, #32c4e9);
}

.leaderboard-row:nth-child(2) .lb-rank { color: gold; }
.leaderboard-row:nth-child(3) .lb-rank { color: silver; }
.leaderboard-row:nth-child(4) .lb-rank { color: #cd7f32; }

.lb-player {
    display: flex;
    flex-direction: column;
}

.lb-username {
    font-weight: bold;
}

.lb-playername {
    font-size: 11px;
    opacity: 0.6;
}

.lb-level {
    text-align: center;
    font-size: 11px;
}

.lb-revenue {
    text-align: right;
    color: var(--brand-success, #28a745);
    font-weight: bold;
}

.lb-deals {
    text-align: center;
}

.lb-rate {
    text-align: center;
}

.lb-training {
    text-align: center;
    color: var(--brand-highlight, #32c4e9);
}

.lb-skills {
    text-align: center;
    color: var(--brand-warning, #f0ad4e);
}

.leaderboard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--brand-secondary, #343741);
    border-top: none;
    background: var(--brand-secondary, #343741);
    font-size: 12px;
}

/* Player Profile View */
.player-profile-view {
    max-width: 700px;
    margin: 0 auto;
}

.back-btn {
    background: none;
    border: none;
    color: var(--brand-highlight, #32c4e9);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    padding: 0;
    margin-bottom: 20px;
}

.back-btn:hover {
    text-decoration: underline;
}

.profile-card {
    border: 1px solid var(--brand-secondary, #343741);
    background: var(--brand-bg-light, #22252c);
    padding: 30px;
}

.profile-header-view {
    text-align: center;
    margin-bottom: 20px;
}

.profile-header-view h2 {
    font-size: 24px;
    margin-bottom: 5px;
}

.profile-username {
    font-size: 14px;
    opacity: 0.7;
    display: block;
    margin-bottom: 5px;
}

.profile-rank {
    display: inline-block;
    padding: 4px 12px;
    background: var(--brand-primary, #b5231d);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.profile-level-badge {
    text-align: center;
    padding: 10px;
    border: 1px solid var(--brand-highlight, #32c4e9);
    color: var(--brand-highlight, #32c4e9);
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 25px;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.profile-stat {
    text-align: center;
    padding: 15px;
    border: 1px dashed var(--brand-secondary, #343741);
}

.profile-stat .stat-value {
    display: block;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
}

.profile-stat .stat-label {
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.7;
}

.profile-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid var(--brand-secondary, #343741);
}

.profile-section h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    opacity: 0.8;
}

.achievements-list,
.training-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.training-badge {
    padding: 4px 10px;
    border: 1px solid var(--brand-success, #28a745);
    font-size: 11px;
    color: var(--brand-success, #28a745);
}

.profile-footer {
    text-align: center;
    padding-top: 15px;
    border-top: 1px dashed var(--brand-secondary, #343741);
}

.last-active {
    font-size: 11px;
    opacity: 0.6;
}

/* Responsive Leaderboard */
@media (max-width: 768px) {
    .leaderboard-row {
        grid-template-columns: 50px 1fr 80px;
        gap: 10px;
    }

    .lb-level,
    .lb-deals,
    .lb-rate,
    .lb-training,
    .lb-skills {
        display: none;
    }

    .profile-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
