@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;900&family=Share+Tech+Mono&display=swap');

/* ═══════════════════════════════════════════════════════════
   MonsterZ — DayZ Survival Theme (index.php)
   Scoped to body.dayz-theme — overrides FUI cyan with
   military olive, rust, amber HUD accents
   ═══════════════════════════════════════════════════════════ */

body.dayz-theme {
    --dayz-bg: #080a06;
    --dayz-bg-panel: rgba(12, 14, 8, 0.92);
    --dayz-olive: #4a5d3a;
    --dayz-olive-dark: #2a3320;
    --dayz-amber: #c9a227;
    --dayz-amber-bright: #e8b923;
    --dayz-rust: #8b3a2a;
    --dayz-blood: #a63d2f;
    --dayz-text: #d4c4a8;
    --dayz-text-dim: #8a7f6a;
    --dayz-accent: #c9a227;
    --dayz-accent-rgb: 201, 162, 39;
    --dayz-glow: rgba(232, 185, 35, 0.35);
    --v2-accent: #c9a227;
    --v2-accent-rgb: 201, 162, 39;
    --v2-accent-dark: #a8841f;
    --v2-accent-darker: #7a6218;
    font-family: 'Barlow Condensed', 'Chakra Petch', ui-sans-serif, sans-serif;
    background-color: var(--dayz-bg) !important;
    color: var(--dayz-text) !important;
}

body.dayz-theme.v2-theme.fui-page {
    background-color: var(--dayz-bg) !important;
    color: var(--dayz-text) !important;
}

body.dayz-theme main {
    background: var(--dayz-bg) !important;
    color: var(--dayz-text) !important;
}

body.dayz-theme .font-mono,
body.dayz-theme .font-orbitron {
    font-family: 'Share Tech Mono', 'JetBrains Mono', ui-monospace, monospace;
}

/* ── Background layers ── */
body.dayz-theme .fui-grid {
    background-image:
        linear-gradient(rgba(74, 93, 58, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 93, 58, 0.06) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.6;
}

body.dayz-theme .fui-scanlines {
    background: linear-gradient(rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.12) 50%);
    background-size: 100% 3px;
    opacity: 0.4;
}

body.dayz-theme #heroBg.fui-hero-bg {
    opacity: 0.22;
    filter: saturate(0.35) contrast(1.15) sepia(0.25);
    position: fixed;
}

body.dayz-theme #heroBg.fui-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 40%, transparent 30%, rgba(8, 10, 6, 0.85) 100%),
        linear-gradient(180deg, rgba(8, 10, 6, 0.3) 0%, rgba(8, 10, 6, 0.95) 100%);
    pointer-events: none;
}

/* Film grain + vignette */
.dayz-film-grain {
    position: fixed;
    inset: 0;
    z-index: 44;
    pointer-events: none;
    opacity: 0.12;
    background-image: url('../assets/dayz/grunge-noise.svg');
    background-size: 200px 200px;
    mix-blend-mode: overlay;
    animation: dayz-grain-shift 0.5s steps(4) infinite;
}

@keyframes dayz-grain-shift {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-2%, -1%); }
    50% { transform: translate(1%, 2%); }
    75% { transform: translate(-1%, 1%); }
}

.dayz-vignette {
    position: fixed;
    inset: 0;
    z-index: 43;
    pointer-events: none;
    background: radial-gradient(ellipse 70% 65% at 50% 45%, transparent 40%, rgba(0, 0, 0, 0.75) 100%);
}

.dayz-fog-layer {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(74, 93, 58, 0.04) 0%, transparent 30%, transparent 70%, rgba(74, 93, 58, 0.04) 100%),
        radial-gradient(ellipse 100% 40% at 50% 100%, rgba(120, 130, 100, 0.08) 0%, transparent 60%);
    animation: dayz-fog-drift 25s ease-in-out infinite alternate;
}

@keyframes dayz-fog-drift {
    from { opacity: 0.5; transform: translateX(-1%); }
    to { opacity: 0.8; transform: translateX(1%); }
}

/* HUD reticle — military crosshair style */
body.dayz-theme .fui-hud-reticle {
    border-color: rgba(201, 162, 39, 0.15) !important;
}

body.dayz-theme .fui-hud-reticle > div {
    border-color: rgba(201, 162, 39, 0.4) !important;
}

/* Fix v2-theme `body > * { position: relative }` breaking fixed HUD layers */
body.v2-theme.fui-page.dayz-theme > .dayz-fog-layer,
body.v2-theme.fui-page.dayz-theme > .dayz-vignette,
body.v2-theme.fui-page.dayz-theme > .dayz-film-grain,
body.v2-theme.fui-page.dayz-theme > .dayz-map-corner,
body.v2-theme.fui-page.dayz-theme > .dayz-survival-hud,
body.v2-theme.fui-page.dayz-theme > .dayz-infected-alert {
    position: fixed !important;
    z-index: 20;
}

/* Map corner label */
.dayz-map-corner {
    top: 5.5rem;
    right: 1.5rem;
    left: auto;
    bottom: auto;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    background: rgba(8, 10, 6, 0.75);
    border: 1px solid rgba(201, 162, 39, 0.3);
    clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
    backdrop-filter: blur(4px);
}

.dayz-map-corner img {
    width: 20px;
    height: 20px;
    opacity: 0.85;
}

.dayz-map-corner span {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--dayz-amber);
}

/* Survival HUD (decorative — bottom-left like in-game DayZ) */
.dayz-survival-hud {
    bottom: 1.5rem;
    left: 1.5rem;
    top: auto;
    right: auto;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.6rem 0.75rem;
    background: rgba(8, 10, 6, 0.8);
    border: 1px solid rgba(201, 162, 39, 0.2);
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
    backdrop-filter: blur(6px);
}

.dayz-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 140px;
}

.dayz-stat i {
    width: 14px;
    text-align: center;
    font-size: 11px;
}

.dayz-stat--health i { color: #c45c3e; }
.dayz-stat--hunger i { color: #c9a227; }
.dayz-stat--thirst i { color: #5a8aaa; }
.dayz-stat--temp i { color: #7eb8d4; }

.dayz-stat-bar {
    flex: 1;
    height: 6px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.dayz-stat-bar span {
    display: block;
    height: 100%;
    transition: width 1.2s ease;
}

.dayz-stat--health .dayz-stat-bar span { background: linear-gradient(90deg, #8b3a2a, #c45c3e); }
.dayz-stat--hunger .dayz-stat-bar span { background: linear-gradient(90deg, #7a6218, #c9a227); }
.dayz-stat--thirst .dayz-stat-bar span { background: linear-gradient(90deg, #3a5a7a, #5a8aaa); }
.dayz-stat--temp .dayz-stat-bar span { background: linear-gradient(90deg, #4a7a9a, #7eb8d4); }

/* Infected alert */
.dayz-infected-alert {
    bottom: 1.5rem;
    right: 1.5rem;
    top: auto;
    left: auto;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.7rem;
    background: rgba(166, 61, 47, 0.15);
    border: 1px solid rgba(166, 61, 47, 0.45);
    animation: dayz-infected-pulse 3s ease-in-out infinite;
}

.dayz-infected-alert img {
    width: 18px;
    height: 18px;
}

.dayz-infected-alert span {
    font-size: 8px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #c45c3e;
    font-family: 'Share Tech Mono', monospace;
}

@keyframes dayz-infected-pulse {
    0%, 100% { opacity: 0.7; box-shadow: 0 0 0 rgba(166, 61, 47, 0); }
    50% { opacity: 1; box-shadow: 0 0 12px rgba(166, 61, 47, 0.3); }
}

/* ── Color overrides (cyan → amber/rust) ── */
body.dayz-theme .text-cyan-400,
body.dayz-theme .text-cyan-300,
body.dayz-theme .text-cyan-500,
body.dayz-theme .text-cyan-600,
body.dayz-theme .text-cyan-700,
body.dayz-theme .text-cyan-800,
body.dayz-theme .text-cyan-900,
body.dayz-theme .pulse-glow,
body.dayz-theme .logo-part-z,
body.dayz-theme .price-value,
body.dayz-theme .modal-category {
    color: var(--dayz-amber) !important;
    text-shadow: 0 0 20px var(--dayz-glow) !important;
}

body.dayz-theme .border-cyan-400,
body.dayz-theme .border-cyan-500,
body.dayz-theme .border-cyan-800,
body.dayz-theme .border-cyan-900,
body.dayz-theme .border-l-4.border-cyan-400 {
    border-color: rgba(201, 162, 39, 0.45) !important;
}

body.dayz-theme .bg-cyan-400\/10,
body.dayz-theme .bg-cyan-500\/10,
body.dayz-theme .bg-cyan-950\/40 {
    background-color: rgba(201, 162, 39, 0.08) !important;
}

body.dayz-theme .from-cyan-400\/80,
body.dayz-theme .from-cyan-400\/50,
body.dayz-theme .via-cyan-400\/50 {
    --tw-gradient-from: rgba(201, 162, 39, 0.5) !important;
}

body.dayz-theme .fui-section-tag {
    color: var(--dayz-amber);
    background: rgba(201, 162, 39, 0.08);
    border-color: rgba(201, 162, 39, 0.35);
}

body.dayz-theme .fui-badge-booting {
    color: var(--dayz-amber) !important;
    border-color: rgba(201, 162, 39, 0.5) !important;
    background: rgba(201, 162, 39, 0.08) !important;
}

body.dayz-theme .fui-lead-block,
body.dayz-theme .fui-quote-block {
    border-color: var(--dayz-amber) !important;
}

body.dayz-theme .fui-lead-block > div,
body.dayz-theme .fui-quote-block > div {
    background: var(--dayz-amber-bright) !important;
    box-shadow: 0 0 10px var(--dayz-glow) !important;
}

/* Buttons */
body.dayz-theme .fui-btn-primary,
body.dayz-theme .btn-add-cart {
    background: linear-gradient(135deg, #a8841f 0%, #c9a227 50%, #e8b923 100%) !important;
    border-color: rgba(232, 185, 35, 0.6) !important;
    color: #0a0c06 !important;
    box-shadow: 0 4px 20px rgba(201, 162, 39, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

body.dayz-theme .fui-btn-primary:hover,
body.dayz-theme .btn-add-cart:hover {
    box-shadow: 0 6px 28px rgba(232, 185, 35, 0.4) !important;
}

body.dayz-theme .fui-btn-outline {
    border-color: rgba(201, 162, 39, 0.55) !important;
    color: var(--dayz-amber) !important;
}

body.dayz-theme .fui-btn-outline:hover {
    background: rgba(201, 162, 39, 0.1) !important;
}

body.dayz-theme .fui-btn-bar {
    background: var(--dayz-amber) !important;
}

/* Cards & panels */
body.dayz-theme .fui-feature-card {
    border-color: rgba(74, 93, 58, 0.5);
    background: rgba(42, 51, 32, 0.35);
}

body.dayz-theme .fui-feature-card:hover {
    background: rgba(201, 162, 39, 0.08);
    border-color: rgba(201, 162, 39, 0.35);
}

body.dayz-theme .fui-card,
body.dayz-theme .glass-card,
body.dayz-theme .product-card {
    background: var(--dayz-bg-panel) !important;
    border-color: rgba(74, 93, 58, 0.45) !important;
}

body.dayz-theme .fui-card:hover,
body.dayz-theme .product-card:hover {
    border-color: rgba(201, 162, 39, 0.45) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(201, 162, 39, 0.06) !important;
}

body.dayz-theme .fui-corner-top-left,
body.dayz-theme .fui-corner-top-right,
body.dayz-theme .fui-corner-bottom-left,
body.dayz-theme .fui-corner-bottom-right {
    border-color: rgba(201, 162, 39, 0.5) !important;
}

body.dayz-theme .fui-metric-box {
    border-color: rgba(74, 93, 58, 0.6) !important;
    background: rgba(0, 0, 0, 0.5) !important;
}

body.dayz-theme .fui-metric-box:hover {
    border-color: rgba(201, 162, 39, 0.4) !important;
}

body.dayz-theme .fui-copy-icon {
    border-color: rgba(201, 162, 39, 0.4) !important;
    color: var(--dayz-amber) !important;
}

body.dayz-theme .fui-copy-icon:hover {
    background: rgba(201, 162, 39, 0.12) !important;
    box-shadow: 0 0 12px var(--dayz-glow) !important;
}

/* Hero title blood drip accent */
body.dayz-theme #hero-section h2 .text-cyan-400 {
    position: relative;
}

body.dayz-theme .dayz-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.6rem;
    margin-bottom: 0.75rem;
    font-size: 9px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--dayz-rust);
    border: 1px solid rgba(139, 58, 42, 0.5);
    background: rgba(139, 58, 42, 0.12);
    font-family: 'Share Tech Mono', monospace;
}

body.dayz-theme .dayz-hero-badge img {
    width: 14px;
    height: 14px;
}

/* Server HUD */
body.dayz-theme .fui-hud-panel .text-2xl {
    color: #e8e0d0 !important;
}

body.dayz-theme #status-progress .fui-segment.fui-segment-filled {
    background: linear-gradient(180deg, #6b7a4a, #c9a227) !important;
    box-shadow: 0 0 6px rgba(201, 162, 39, 0.35);
}

body.dayz-theme .fui-segments-track {
    border-color: rgba(74, 93, 58, 0.5) !important;
    background: rgba(0, 0, 0, 0.5) !important;
}

/* Ambience image */
body.dayz-theme .fui-ambience-img {
    filter: saturate(0.65) contrast(1.1) sepia(0.15);
    border-color: rgba(74, 93, 58, 0.6) !important;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.6), inset 0 0 60px rgba(0, 0, 0, 0.3) !important;
}

body.dayz-theme .fui-image-brackets::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 2;
}

/* Economy section */
body.dayz-theme [data-layout-section="economy"] {
    background: linear-gradient(180deg, transparent, rgba(42, 51, 32, 0.2), transparent) !important;
}

/* Products */
body.dayz-theme .products-section {
    position: relative;
    z-index: 10;
}

body.dayz-theme .products-section .section-heading h2 {
    color: #e8e0d0 !important;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    letter-spacing: 0.08em;
}

body.dayz-theme .products-section .section-heading h2::before {
    content: '▸ ';
    color: var(--dayz-amber);
}

body.dayz-theme .product-badge.offer {
    background: var(--dayz-rust) !important;
}

body.dayz-theme .product-badge.free {
    background: var(--dayz-olive) !important;
}

/* Footer */
body.dayz-theme .fui-page-footer {
    background: rgba(8, 10, 6, 0.95) !important;
    border-color: rgba(74, 93, 58, 0.4) !important;
}

body.dayz-theme .fui-footer-brand {
    background: rgba(201, 162, 39, 0.12) !important;
    border-color: rgba(201, 162, 39, 0.45) !important;
    box-shadow: 0 0 15px var(--dayz-glow) !important;
}

body.dayz-theme .fui-footer-dot {
    background: var(--dayz-amber) !important;
}

/* Nav header overrides */
body.dayz-theme #site-v2-header.fui-nav-header {
    background: rgba(8, 10, 6, 0.88) !important;
    border-color: rgba(74, 93, 58, 0.5) !important;
}

body.dayz-theme .fui-nav-link:hover,
body.dayz-theme .fui-nav-link.active {
    color: var(--dayz-amber) !important;
}

body.dayz-theme .fui-nav-btn-primary {
    background: linear-gradient(135deg, #a8841f, #c9a227) !important;
    color: #0a0c06 !important;
    border-color: rgba(232, 185, 35, 0.5) !important;
}

body.dayz-theme #refresh-status {
    border-color: rgba(201, 162, 39, 0.25) !important;
    background: rgba(201, 162, 39, 0.06) !important;
}

body.dayz-theme #refresh-status:hover {
    color: var(--dayz-amber) !important;
    border-color: rgba(201, 162, 39, 0.45) !important;
    box-shadow: 0 0 10px var(--dayz-glow) !important;
}

/* Feature card DayZ icons */
body.dayz-theme .fui-feature-card .p-1\.5 {
    border-color: rgba(74, 93, 58, 0.8) !important;
    background: rgba(0, 0, 0, 0.6) !important;
}

body.dayz-theme .fui-feature-card .fa-snowflake,
body.dayz-theme .fui-feature-card .fa-user-shield,
body.dayz-theme .fui-feature-card .fa-database,
body.dayz-theme .fui-feature-card i {
    color: var(--dayz-amber-bright) !important;
}

/* Hide snow overlay on dayz theme */
body.dayz-theme .snow-overlay {
    display: none !important;
}

/* Responsive: hide decorative HUD on small screens */
@media (max-width: 767px) {
    .dayz-map-corner,
    .dayz-infected-alert {
        display: none;
    }

    .dayz-survival-hud {
        bottom: 1rem;
        left: 0.75rem;
        transform: scale(0.85);
        transform-origin: bottom left;
    }
}

@media (max-width: 480px) {
    .dayz-survival-hud {
        display: none !important;
    }
}
