/* ==========================================================================
   THE MELS LIVE — OFFICIAL PLAYER MANUAL & SYSTEM GUIDE STYLESHEET
   ========================================================================== */

:root {
    --bg-dark: #0b0f19;
    --bg-card: #151d2f;
    --bg-card-hover: #1c263d;
    --bg-sidebar: #0e1422;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: #10b981;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --primary: #10b981;
    --primary-glow: rgba(16, 185, 129, 0.25);
    --accent-amber: #f59e0b;
    --accent-cyan: #38bdf8;
    --accent-purple: #a855f7;
    --accent-rose: #f43f5e;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
}

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

html {
    scroll-behavior: smooth;
    color-scheme: dark;
}

body.guide-body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ==========================================================================
   TOP HEADER
   ========================================================================== */
.guide-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(11, 15, 25, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 24px;
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.plumbob-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.6));
    animation: plumbobFloat 3s ease-in-out infinite alternate;
}

@keyframes plumbobFloat {
    from { transform: translateY(0px) rotate(0deg); }
    to { transform: translateY(-4px) rotate(6deg); }
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 40%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-subtitle {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Search Box */
.header-search-box {
    position: relative;
    flex: 1;
    max-width: 540px;
}

.header-search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: var(--text-dim);
    pointer-events: none;
}

.header-search-box input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 10px 40px 10px 40px;
    font-size: 0.88rem;
    color: var(--text-main);
    font-family: var(--font-sans);
    outline: none;
    transition: all 0.2s ease;
}

.header-search-box input:focus {
    background: rgba(255, 255, 255, 0.09);
    border-color: var(--primary);
    box-shadow: 0 0 16px var(--primary-glow);
}

.clear-search-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 4px;
}

/* Header Action Buttons */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.play-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 8px 20px;
    border-radius: 24px;
    text-decoration: none;
    box-shadow: 0 4px 14px var(--primary-glow);
    transition: all 0.2s ease;
}

.play-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    filter: brightness(1.1);
}

.mobile-nav-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.guide-layout {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    gap: 32px;
    padding: 24px;
    position: relative;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.guide-sidebar {
    width: 290px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    height: calc(100vh - 100px);
    overflow-y: auto;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.sidebar-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge.live-badge {
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary);
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

.nav-category {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 16px 12px 6px 12px;
}

.nav-category:first-of-type {
    padding-top: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.nav-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--primary);
    background: rgba(16, 185, 129, 0.12);
    border-left: 3px solid var(--primary);
}

.nav-link.highlight-link {
    color: var(--accent-amber);
}

.nav-link.highlight-link:hover {
    background: rgba(245, 158, 11, 0.1);
}

.nav-icon {
    font-size: 0.95rem;
    flex-shrink: 0;
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
.guide-content {
    flex: 1;
    min-width: 0; /* prevents flex child blowout */
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(56, 189, 248, 0.06), var(--bg-card));
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.hero-badge {
    display: inline-block;
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary);
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #ffffff 60%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 800px;
    line-height: 1.6;
    margin-bottom: 28px;
}

.hero-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 16px;
}

.hero-stat-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
}

/* Guide Sections */
.guide-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    scroll-margin-top: 100px;
    transition: border-color 0.2s ease;
}

.guide-section:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.section-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.section-icon {
    font-size: 2.2rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin-bottom: 4px;
}

.section-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.info-card, .feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.info-card:hover, .feature-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

.card-title, .feature-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-icon {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.info-card p, .feature-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Hotkey tags */
kbd {
    display: inline-block;
    background: #1e293b;
    border: 1px solid #475569;
    border-bottom: 2px solid #334155;
    border-radius: 6px;
    padding: 2px 7px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-amber);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Callout Boxes */
.callout {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    border-radius: var(--radius-md);
    padding: 18px 22px;
    margin-top: 24px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.tip-callout {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #e2e8f0;
}

.note-callout {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #e2e8f0;
}

.callout-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* ==========================================================================
   TABLES
   ========================================================================== */
.table-responsive {
    overflow-x: auto;
    margin-top: 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.guide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.guide-table th {
    background: rgba(0, 0, 0, 0.35);
    color: var(--text-main);
    font-weight: 700;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.guide-table td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
}

.guide-table tr:last-child td {
    border-bottom: none;
}

.guide-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.price-profit {
    color: var(--primary);
    font-weight: 700;
    font-family: var(--font-mono);
}

.hotkeys-table kbd {
    font-size: 0.85rem;
    padding: 3px 8px;
}

/* ==========================================================================
   DISTRICT CARDS
   ========================================================================== */
.districts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.district-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    position: relative;
}

.district-badge {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 8px;
}

.district-card h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
}

.district-price-range {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-amber);
    font-family: var(--font-mono);
    margin-bottom: 12px;
}

.lot-list {
    margin-top: 14px;
    list-style: none;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.lot-list li {
    padding: 4px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   STEPS CONTAINER
   ========================================================================== */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 18px;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 22px;
}

.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #059669);
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 12px var(--primary-glow);
}

.step-content h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.step-content p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* ==========================================================================
   LIGHTING SHOWCASE
   ========================================================================== */
.lighting-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.light-fixture-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}

.light-fixture-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-amber);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
}

.fixture-icon {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 8px;
}

.fixture-cost {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent-amber);
    font-size: 0.95rem;
    margin: 4px 0 8px 0;
}

.controls-breakdown {
    margin-top: 24px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px;
}

.controls-breakdown h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 14px;
}

.bullet-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.bullet-list li {
    position: relative;
    padding-left: 20px;
}

.bullet-list li::before {
    content: "•";
    color: var(--primary);
    font-weight: 800;
    position: absolute;
    left: 4px;
    top: 0;
}

.bullet-list ul {
    margin-top: 6px;
    margin-left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ==========================================================================
   CAREERS & SKILLS
   ========================================================================== */
.careers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.career-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
}

.career-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.career-salary {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--primary);
    font-size: 0.88rem;
    margin: 4px 0 10px 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.skill-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
}

.skill-icon {
    font-size: 1.8rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.skill-info h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.skill-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==========================================================================
   BATTLER DETAILS
   ========================================================================== */
.battler-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 18px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.guide-footer {
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border-color);
    padding: 48px 24px 24px 24px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1440px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 36px;
}

.footer-brand {
    font-size: 1.2rem;
    font-weight: 800;
    margin-left: 8px;
}

.footer-desc {
    margin-top: 12px;
    font-size: 0.88rem;
    color: var(--text-muted);
    max-width: 440px;
}

.links-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.links-col h4 {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.links-col a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.15s;
}

.links-col a:hover {
    color: var(--primary);
}

.footer-bottom {
    max-width: 1440px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 1080px) {
    .guide-sidebar {
        width: 240px;
    }
}

@media (max-width: 860px) {
    .guide-sidebar {
        position: fixed;
        left: -320px;
        top: 0;
        height: 100vh;
        z-index: 2000;
        width: 300px;
        background: #0d121f;
        border-radius: 0;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8);
        transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .guide-sidebar.mobile-open {
        left: 0;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .guide-layout {
        padding: 16px;
    }

    .hero-title {
        font-size: 1.7rem;
    }

    .hero-banner {
        padding: 24px 20px;
    }

    .guide-section {
        padding: 22px 18px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}
