/* ==========================================================================
   SUNRISE RP WIKI - PREMIUM GAMING UI (MAJESTIC STYLE)
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
    --bg-black: #060807;
    --bg-dark: #0a0d0c;
    --bg-panel: rgba(15, 21, 18, 0.65);
    --bg-panel-hover: rgba(22, 31, 26, 0.8);
    --border-glass: rgba(255, 255, 255, 0.04);
    --border-active: rgba(50, 255, 106, 0.3);
    
    --color-primary: #30ff60;        /* Bright Radioactive Green */
    --color-primary-rgb: 48, 255, 96;
    --color-primary-glow: rgba(48, 255, 96, 0.15);
    --color-text-bright: #f0f5f2;    /* Crisp near-white */
    --color-text-muted: #a3b2aa;     /* Desaturated military green-gray */
    --color-warning: #ffa21a;       /* Cyber amber */
    --color-warning-glow: rgba(255, 162, 26, 0.12);
    
    --font-heading: 'Unbounded', sans-serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --transition-premium: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.2s ease;
}

/* --- Base Reset --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-black);
    color: var(--color-text-muted);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* --- Atmospheric Background Renders --- */
.page-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Desaturated forest image background from donation shop */
    background-image: linear-gradient(180deg, rgba(6, 8, 7, 0.85) 0%, rgba(10, 13, 12, 0.98) 100%), 
                      url('https://s3.regru.cloud/shops-attachments/sunriserp.ru/meta/images/bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.9) 110%);
    z-index: -1;
    pointer-events: none;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-black);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border-active);
}

/* --- Utility Classes --- */
.highlight-green {
    color: var(--color-primary);
    text-shadow: 0 0 15px var(--color-primary-glow);
}

/* --- Header Styling --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 88px;
    z-index: 100;
    display: flex;
    align-items: center;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    background: rgba(6, 8, 7, 0.45);
}

.header-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-accent {
    color: var(--color-primary);
}

.logo-text {
    color: var(--color-text-bright);
}

.nav-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link-item {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: var(--transition-fast);
    cursor: pointer;
}

.nav-link-item:hover {
    color: var(--color-text-bright);
}

.nav-link-item.external {
    position: relative;
    padding-right: 14px;
}

.nav-link-item.external::after {
    content: "↗";
    position: absolute;
    right: 0;
    top: -1px;
    font-size: 10px;
    opacity: 0.7;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.online-counter {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    padding: 8px 16px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 12px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-primary);
    animation: counter-pulse 2s infinite;
}

.counter-text {
    color: var(--color-text-muted);
}

.counter-text strong {
    color: var(--color-text-bright);
}

.sound-toggle {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    color: var(--color-text-muted);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.sound-toggle:hover {
    background: var(--bg-panel-hover);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.sound-toggle.sound-active {
    color: var(--color-primary);
    border-color: var(--border-active);
    box-shadow: 0 0 10px var(--color-primary-glow);
}

/* Burger menu button */
.burger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.burger-bar {
    width: 100%;
    height: 2px;
    background-color: var(--color-text-bright);
    transition: var(--transition-fast);
}

/* Burger hover and active animations */
.burger-menu:hover .burger-bar {
    background-color: var(--color-primary);
    box-shadow: 0 0 8px var(--color-primary-glow);
}

.burger-menu.active .burger-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.burger-menu.active .burger-bar:nth-child(2) {
    opacity: 0;
}

.burger-menu.active .burger-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- Mobile/Burger Navigation Drawer --- */
.mobile-nav {
    position: fixed;
    top: 88px;
    left: 0;
    width: 100%;
    background: rgba(6, 8, 7, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    padding: 24px 40px;
    gap: 20px;
    transform: translateY(-120%);
    transition: transform var(--transition-premium);
    z-index: 99;
}

.mobile-nav.open {
    transform: translateY(0);
}

/* Floating tactical card menu for desktop screens */
@media (min-width: 769px) {
    .mobile-nav {
        left: auto;
        right: 40px;
        width: 320px;
        border: 1px solid var(--border-glass);
        border-radius: 8px;
        background: rgba(10, 13, 12, 0.98);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(48, 255, 96, 0.03);
    }
}

.mobile-nav-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* --- Layout Wrapper --- */
.main-layout {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 10;
}

/* --- Hero Section --- */
.hero-section {
    padding-top: 220px;
    padding-bottom: 120px;
    min-height: calc(100vh - 88px);
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    background: rgba(48, 255, 96, 0.08);
    border: 1px solid rgba(48, 255, 96, 0.2);
    color: var(--color-primary);
    padding: 6px 14px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 24px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 900;
    line-height: 1.15;
    color: var(--color-text-bright);
    margin-bottom: 24px;
    letter-spacing: -1.5px;
}

.hero-desc {
    font-size: 17px;
    color: var(--color-text-muted);
    margin-bottom: 44px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: flex-end;
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 18px 32px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
    transition: var(--transition-premium);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--bg-black);
}

.btn-primary:hover {
    background-color: #fff;
    transform: translateY(-2px);
}

.btn-glow:hover {
    box-shadow: 0 12px 40px rgba(48, 255, 96, 0.25);
}

.btn-arrow {
    transition: transform var(--transition-fast);
}

.btn-primary:hover .btn-arrow {
    transform: translateX(4px);
}

/* Promocode Box */
.promocode-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.promo-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--color-text-muted);
    opacity: 0.7;
}

.promo-inner {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 6px 6px 6px 18px;
    height: 56px;
}

.promo-code {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    color: var(--color-text-bright);
    letter-spacing: 1px;
}

.promo-copy-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--color-text-muted);
    width: 44px;
    height: 44px;
    border-radius: 6px;
    margin-left: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--transition-fast);
}

.promo-copy-btn:hover {
    background: var(--bg-panel-hover);
    color: var(--color-text-bright);
}

.copied-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: var(--color-primary);
    color: var(--bg-black);
    padding: 6px 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-premium);
}

.copied-tooltip.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --- Section Layouts --- */
.section-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 56px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 800;
    color: var(--color-text-bright);
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.section-subtitle {
    font-size: 15px;
    color: var(--color-text-muted);
}

/* --- Steps Section --- */
.steps-section {
    padding: 100px 0;
    border-top: 1px solid var(--border-glass);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

.step-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 40px;
    backdrop-filter: blur(16px);
    transition: var(--transition-premium);
    display: flex;
    flex-direction: column;
}

.step-card:hover {
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-4px);
    background: var(--bg-panel-hover);
}

.step-num {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.05);
    margin-bottom: 24px;
    line-height: 1;
    transition: var(--transition-fast);
}

.step-card:hover .step-num {
    color: var(--color-primary);
}

.step-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    color: var(--color-text-bright);
    margin-bottom: 14px;
    letter-spacing: 0.5px;
}

.step-text {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 28px;
    flex: 1;
}

.step-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    color: var(--color-text-bright);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 12px;
    text-align: center;
    border-radius: 6px;
    transition: var(--transition-fast);
    cursor: pointer;
}

.step-btn:hover {
    border-color: var(--color-text-bright);
    background: rgba(255, 255, 255, 0.08);
}

.step-btn.highlight {
    border-color: var(--border-active);
    color: var(--color-primary);
}

.step-btn.highlight:hover {
    background-color: var(--color-primary-glow);
}

.step-btn-text {
    display: inline-block;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 12px;
    text-align: center;
    border-radius: 6px;
    opacity: 0.6;
}

/* --- Wiki Section --- */
.wiki-section {
    padding: 100px 0 140px;
    border-top: 1px solid var(--border-glass);
}

.wiki-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.wiki-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 32px;
    backdrop-filter: blur(16px);
    transition: var(--transition-premium);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.wiki-card:hover {
    border-color: var(--border-active);
    box-shadow: 0 12px 30px rgba(48, 255, 96, 0.04);
    transform: translateY(-6px);
    background: var(--bg-panel-hover);
}

.wiki-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.wiki-card-number {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.08);
}

.wiki-card-icon {
    font-size: 22px;
}

.wiki-card:hover .wiki-card-number {
    color: var(--color-primary);
}

.wiki-card-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    color: var(--color-text-bright);
    margin-bottom: 12px;
}

.wiki-card-desc {
    font-size: 13.5px;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
    flex: 1;
}

.wiki-card-footer {
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
}

.wiki-card-btn {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--color-text-muted);
    transition: var(--transition-fast);
}

.wiki-card:hover .wiki-card-btn {
    color: var(--color-primary);
}

/* --- Footer --- */
.main-footer {
    border-top: 1px solid var(--border-glass);
    padding: 40px 0;
    background: rgba(6, 8, 7, 0.85);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
}

.footer-links {
    display: flex;
    gap: 28px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition-fast);
}

.footer-link:hover {
    color: var(--color-text-bright);
}

/* ==========================================================================
   DRAWER INTERFACE (THE SLIDE OUT READER)
   ========================================================================== */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(4px);
    transition: opacity var(--transition-premium);
}

.drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.article-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 640px;
    max-width: 100%;
    background: rgba(8, 12, 10, 0.85);
    backdrop-filter: blur(28px);
    border-right: 1px solid var(--border-glass);
    z-index: 200;
    transform: translateX(-100%);
    transition: transform var(--transition-premium);
    display: flex;
    flex-direction: column;
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.8);
}

.article-drawer.open {
    transform: translateX(0);
}

/* Drawer Header */
.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 40px;
    border-bottom: 1px solid var(--border-glass);
}

.drawer-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drawer-category {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--color-primary);
}

.drawer-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: var(--color-text-bright);
}

.drawer-close-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    color: var(--color-text-muted);
    width: 44px;
    height: 44px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.drawer-close-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text-bright);
    transform: rotate(90deg);
}

/* Search bar inside Drawer */
.drawer-search {
    padding: 16px 40px;
    border-bottom: 1px solid var(--border-glass);
    background: rgba(0, 0, 0, 0.15);
    position: relative;
}

.drawer-search input {
    width: 100%;
    padding: 12px 16px;
    padding-right: 44px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    color: var(--color-text-bright);
    font-family: var(--font-sans);
    font-size: 14px;
    outline: none;
    transition: var(--transition-fast);
}

.drawer-search input:focus {
    border-color: var(--border-active);
    box-shadow: 0 0 10px var(--color-primary-glow);
}

.drawer-search-icon {
    position: absolute;
    right: 56px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.4;
    pointer-events: none;
}

/* Drawer Content Scroll Body */
.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
}

.content-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--color-primary);
}

/* --- Markdown Rendering in Drawer --- */
.drawer-body h1 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: var(--color-text-bright);
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 16px;
}

.drawer-body h2 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary);
    margin-top: 36px;
    margin-bottom: 16px;
}

.drawer-body h3 {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-bright);
    margin-top: 24px;
    margin-bottom: 12px;
}

.drawer-body p {
    font-size: 14.5px;
    color: var(--color-text-muted);
    margin-bottom: 18px;
    line-height: 1.7;
}

.drawer-body strong {
    color: var(--color-text-bright);
}

.drawer-body ul, .drawer-body ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.drawer-body li {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--color-text-muted);
}

.drawer-body li::marker {
    color: var(--color-primary);
}

.drawer-body hr {
    border: none;
    border-top: 1px solid var(--border-glass);
    margin: 28px 0;
}

/* Blocks */
.drawer-body blockquote {
    background: rgba(255, 255, 255, 0.02);
    border-left: 4px solid var(--color-warning);
    padding: 18px 24px;
    margin: 24px 0;
    border-radius: 0 8px 8px 0;
    box-shadow: inset 10px 0 20px var(--color-warning-glow);
}

.drawer-body blockquote p {
    margin-bottom: 0;
    color: var(--color-text-bright);
}

.drawer-body blockquote strong {
    color: var(--color-warning);
}

.drawer-body img {
    max-width: 380px;
    max-height: 240px;
    width: auto;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    margin: 20px auto;
    display: block;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}

/* Tables in Drawer */
.drawer-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 13.5px;
}

.drawer-body th, .drawer-body td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-glass);
}

.drawer-body th {
    font-family: var(--font-mono);
    color: var(--color-primary);
    font-weight: 700;
    background: rgba(255, 255, 255, 0.02);
}

/* Search match highlighting */
.search-highlight {
    background: rgba(255, 162, 26, 0.25);
    border-bottom: 1px solid var(--color-warning);
    color: #fff;
    padding: 0 2px;
}

/* --- Keyframe Animations --- */
@keyframes counter-pulse {
    0% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px var(--color-primary); }
    100% { transform: scale(1); opacity: 0.9; }
}

/* --- Responsive Layout Breakpoints --- */
@media (max-width: 1200px) {
    .wiki-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 992px) {
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .hero-title {
        font-size: 40px;
    }
}

@media (max-width: 768px) {
    .header-right .online-counter {
        display: none;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-section {
        padding-top: 160px;
        padding-bottom: 80px;
    }
    
    .main-layout {
        padding: 0 24px;
    }
    
    .wiki-grid {
        grid-template-columns: 1fr;
    }
    
    .article-drawer {
        width: 100%;
    }
    
    .drawer-header {
        padding: 24px;
    }
    
    .drawer-body {
        padding: 24px;
    }
}

/* ==========================================================================
   MILESTONE B1: CANVAS BACKGROUND & PDA WIDGETS
   ========================================================================== */

/* Anomaly Background Canvas */
#anomaly-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1.5;
    pointer-events: none;
}

/* Restructuring Hero layout */
.hero-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
    width: 100%;
}

.pda-widgets-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

/* PDA Widget Container (Glassmorphic) */
.pda-widget {
    background: var(--bg-panel);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 24px;
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    font-family: var(--font-mono);
    position: relative;
    overflow: hidden;
    transition: var(--transition-premium);
}

/* Scanline visual overlay effect */
.pda-widget::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.2) 50%);
    background-size: 100% 4px;
    z-index: 5;
    pointer-events: none;
    opacity: 0.2;
}

/* Widget Header */
.pda-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.pda-widget-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.pda-blink-dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--color-primary);
    animation: pda-blink 1.5s infinite;
}

@keyframes pda-blink {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* PDA Battery Indicator */
.pda-battery {
    display: flex;
    align-items: center;
    gap: 10px;
}

.battery-label {
    font-size: 10px;
    color: var(--color-text-muted);
}

.battery-icon {
    width: 32px;
    height: 16px;
    border: 1.5px solid var(--color-primary);
    border-radius: 3px;
    padding: 1px;
    position: relative;
    display: flex;
}

.battery-icon::after {
    content: "";
    position: absolute;
    right: -3px;
    top: 3px;
    width: 2px;
    height: 7px;
    background-color: var(--color-primary);
    border-radius: 0 1px 1px 0;
}

.battery-level {
    height: 100%;
    background-color: var(--color-primary);
    box-shadow: 0 0 4px var(--color-primary-glow);
    transition: width 0.5s ease;
}

/* Geiger Card Style */
.pda-geiger-card {
    border: 1px solid rgba(255, 255, 255, 0.02);
    background: rgba(255, 255, 255, 0.01);
    border-radius: 8px;
    padding: 20px;
    cursor: crosshair;
    transition: var(--transition-premium);
}

.geiger-top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.radioactive-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(48, 255, 96, 0.08);
    border: 1px solid rgba(48, 255, 96, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--color-primary);
    transition: var(--transition-premium);
}

.geiger-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.geiger-label {
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--color-text-muted);
}

.geiger-status {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 0.5px;
    transition: color var(--transition-fast);
}

.geiger-display {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
    text-align: center;
}

.geiger-value {
    font-family: var(--font-mono);
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary);
    text-shadow: 0 0 10px var(--color-primary-glow);
    transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

.geiger-value .unit {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.8;
}

/* Bar Chart Graphic */
.geiger-graph {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 50px;
    width: 100%;
    overflow: hidden;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 2px;
}

.graph-bar {
    flex: 1;
    background-color: var(--color-primary);
    opacity: 0.25;
    height: 10%;
    border-radius: 1px 1px 0 0;
    transition: height 0.15s ease, background-color 0.3s ease, opacity 0.3s ease;
}

/* Geiger Card Hover / Warning State */
.pda-geiger-card.warning {
    border-color: var(--color-warning);
    background: rgba(255, 162, 26, 0.02);
}

.pda-geiger-card.warning .radioactive-icon-wrapper {
    background: rgba(255, 162, 26, 0.08);
    border-color: rgba(255, 162, 26, 0.2);
    color: var(--color-warning);
    animation: spin-radioactive 1.5s linear infinite;
}

.pda-geiger-card.warning .geiger-status {
    color: var(--color-warning);
}

.pda-geiger-card.warning .geiger-value {
    color: var(--color-warning);
    text-shadow: 0 0 10px var(--color-warning-glow);
}

.pda-geiger-card.warning .graph-bar {
    background-color: var(--color-warning);
    opacity: 0.55;
}

@keyframes spin-radioactive {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Overrides */
@media (max-width: 992px) {
    .hero-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}


/* ==========================================================================
   ZONE BRIEFING (NEWS FEED) STYLES
   ========================================================================== */

.news-section {
    padding: 100px 0;
    position: relative;
}

.news-section .section-header {
    text-align: center;
}

.news-header-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 8px;
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(48, 255, 96, 0.08);
    border: 1px solid rgba(48, 255, 96, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--color-primary);
    letter-spacing: 1.5px;
    text-shadow: 0 0 5px var(--color-primary-glow);
}

.live-dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-primary);
    animation: live-pulse 1.8s infinite ease-in-out;
}

@keyframes live-pulse {
    0% {
        transform: scale(0.9);
        opacity: 0.5;
        box-shadow: 0 0 0 0 rgba(48, 255, 96, 0.7);
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
        box-shadow: 0 0 0 6px rgba(48, 255, 96, 0);
    }
    100% {
        transform: scale(0.9);
        opacity: 0.5;
        box-shadow: 0 0 0 0 rgba(48, 255, 96, 0);
    }
}

.news-feed {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 900px;
    margin: 40px auto 0 auto;
}

.news-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 30px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform var(--transition-premium), border-color var(--transition-premium), box-shadow var(--transition-premium);
    position: relative;
    overflow: hidden;
}

.news-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-active);
    box-shadow: 0 12px 30px rgba(48, 255, 96, 0.03);
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 50%,
        rgba(48, 255, 96, 0.005) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1;
}

.news-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 12px;
    font-family: var(--font-mono);
}

.news-card-author {
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.news-card-author::before {
    content: '👤';
    font-size: 11px;
}

.news-card-date {
    color: var(--color-text-muted);
}

.news-card-body {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    white-space: pre-wrap;
    word-break: break-word;
}

.news-card-body p {
    margin-bottom: 12px;
}

.news-card-body p:last-child {
    margin-bottom: 0;
}

.news-card-image-wrapper {
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    max-height: 450px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-premium);
}

.news-card:hover .news-card-image {
    transform: scale(1.02);
}

.news-actions {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.news-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: 14px;
}

.loader-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(48, 255, 96, 0.1);
    border-top: 2px solid var(--color-primary);
    border-radius: 50%;
    animation: spin-loader 1s linear infinite;
}

@keyframes spin-loader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.news-empty {
    text-align: center;
    padding: 60px;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    border: 1px dashed var(--border-glass);
    border-radius: 8px;
}

@media (max-width: 768px) {
    .news-section {
        padding: 60px 0;
    }
    
    .news-card {
        padding: 20px;
    }
    
    .news-header-title-row {
        flex-direction: column;
        gap: 8px;
    }
}

/* PDA Monospace & Blockquote styling for news */
.news-card-body blockquote {
    border-left: 3px solid var(--color-primary);
    background: rgba(48, 255, 96, 0.03);
    padding: 12px 18px;
    margin: 16px 0;
    border-radius: 0 6px 6px 0;
    color: rgba(255, 255, 255, 0.85);
    font-style: italic;
}

.news-card-body pre {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    padding: 16px;
    overflow-x: auto;
    margin: 16px 0;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
    color: var(--color-primary);
    text-shadow: 0 0 5px var(--color-primary-glow);
}

.news-card-body code {
    font-family: var(--font-mono);
    font-size: 13px;
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--color-primary);
}

.news-card-body ul, .news-card-body ol {
    margin: 12px 0;
    padding-left: 24px;
}

.news-card-body li {
    margin-bottom: 6px;
}

.news-card-body a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dashed var(--color-primary);
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.news-card-body a:hover {
    color: var(--color-text-bright);
    border-bottom-color: var(--color-text-bright);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   PDA NEWS FEED WIDGET STYLES (SIDEBAR COMPACT NEWS)
   ========================================================================== */

.pda-news-status {
    font-size: 10px;
    background: rgba(48, 255, 96, 0.08);
    border: 1px solid rgba(48, 255, 96, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--color-primary);
    letter-spacing: 1px;
}

.pda-news-feed {
    max-height: 520px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-right: 6px;
    margin-top: 16px;
}

/* Custom scrollbar for PDA news */
.pda-news-feed::-webkit-scrollbar {
    width: 4px;
}
.pda-news-feed::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}
.pda-news-feed::-webkit-scrollbar-thumb {
    background: rgba(48, 255, 96, 0.3);
    border-radius: 2px;
    transition: background var(--transition-fast);
}
.pda-news-feed::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

.pda-news-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 16px;
    transition: border-color var(--transition-premium), box-shadow var(--transition-premium), background var(--transition-premium);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.pda-news-card:hover {
    border-color: var(--border-active);
    background: rgba(48, 255, 96, 0.01);
}

.pda-news-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 11px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
    padding-bottom: 6px;
}

.pda-news-card-author {
    color: var(--color-primary);
    font-weight: 700;
}

.pda-news-card-date {
    color: var(--color-text-muted);
}

.pda-news-card-body {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    white-space: pre-wrap;
    word-break: break-word;
}

.pda-news-card-body p {
    margin: 0 0 8px 0;
}

.pda-news-card-body p:last-child {
    margin-bottom: 0;
}

/* PDA styled code block elements inside news body */
.pda-news-card-body pre {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-glass);
    border-radius: 4px;
    padding: 10px;
    overflow-x: auto;
    margin: 10px 0;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-primary);
    text-shadow: 0 0 5px var(--color-primary-glow);
}

.pda-news-card-body code {
    font-family: var(--font-mono);
    font-size: 11px;
    background: rgba(0, 0, 0, 0.3);
    padding: 1px 4px;
    border-radius: 2px;
    color: var(--color-primary);
}

.pda-news-card-body blockquote {
    border-left: 3px solid var(--color-primary);
    background: rgba(48, 255, 96, 0.03);
    padding: 10px 14px;
    margin: 12px 0;
    border-radius: 0 4px 4px 0;
    color: rgba(255, 255, 255, 0.85);
    font-style: italic;
}

.pda-news-card-body ul, .pda-news-card-body ol {
    margin: 8px 0;
    padding-left: 18px;
}

.pda-news-card-body li {
    margin-bottom: 4px;
}

.pda-news-card-body a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dashed var(--color-primary);
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.pda-news-card-body a:hover {
    color: var(--color-text-bright);
    border-bottom-color: var(--color-text-bright);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.pda-news-card-image-wrapper {
    margin-top: 12px;
    border-radius: 6px;
    overflow: hidden;
    max-height: 180px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.pda-news-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pda-news-actions {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

.pda-news-more-btn {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 100%;
    text-align: center;
}

.pda-news-more-btn:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background: rgba(48, 255, 96, 0.05);
    box-shadow: 0 0 10px var(--color-primary-glow);
}




