@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Staatliches&display=swap');

:root {
    --bg: #141412;
    --neon: #d99e1e;
    --panel: rgba(25, 25, 22, 0.75);
    --muted: #f0ebd8;
}

body {
    background-color: var(--bg);
    color: var(--muted);
    font-family: 'Space Mono', monospace;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    background-image:
        radial-gradient(circle at 20% 10%, rgba(217, 158, 30, 0.2), transparent 60%),
        radial-gradient(circle at 80% 70%, rgba(217, 158, 30, 0.12), transparent 70%),
        radial-gradient(circle at 50% 50%, rgba(217, 158, 30, 0.05), transparent 80%),
        linear-gradient(rgba(217, 158, 30, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(217, 158, 30, 0.04) 1px, transparent 1px);
    background-size: auto, auto, auto, 40px 40px, 40px 40px;
    background-attachment: fixed;
    user-select: none;
    box-sizing: border-box;
}

/* Animated gradient overlay */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(217, 158, 30, 0.08), transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(217, 158, 30, 0.05), transparent 50%);
    animation: gradientShift 15s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientShift {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1) rotate(0deg);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1) rotate(2deg);
    }
}

/* Vignette effect for depth */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.25) 100%),
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(255, 255, 255, 0.02) 50%);
    background-size: 100% 100%, 100% 4px;
    pointer-events: none;
    z-index: 100;
    mix-blend-mode: overlay;
}

/* Particle container */
.particles {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--neon);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat linear infinite;
    box-shadow: 0 0 4px var(--neon);
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 0.6;
    }

    90% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(-100px) translateX(var(--drift)) scale(1);
        opacity: 0;
    }
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.18) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 100;
    mix-blend-mode: overlay;
}

.title-font {
    font-family: 'Staatliches', cursive;
    letter-spacing: 1px;
}

.military-border {
    border: 1px solid rgba(217, 158, 30, 0.25);
    background: rgba(30, 30, 25, 0.65);
    backdrop-filter: blur(8px);
    border-radius: 18px;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    /* Removed transition to prevent animation on page load */
}

.military-border::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(217, 158, 30, 0.08), transparent 35%, transparent 70%, rgba(217, 158, 30, 0.06));
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

/* Only apply transitions after page has loaded */
body.loaded .military-border {
    transition: all 0.25s ease;
}

body.loaded .military-border:hover {
    border-color: rgba(217, 158, 30, 0.55);
    box-shadow: 0 0 35px rgba(217, 158, 30, 0.08);
    transform: translateY(-2px);
}

.military-border:hover::before {
    opacity: 1;
}

.btn-neon {
    background: var(--neon);
    color: black;
    font-weight: 900;
    text-transform: uppercase;
    padding: 12px 28px;
    border-radius: 14px;
    letter-spacing: 0.08em;
    box-shadow: 0 0 0 rgba(217, 158, 30, 0);
    /* Removed transition to prevent animation on page load */
}

/* Only apply transitions after page has loaded */
body.loaded .btn-neon {
    transition: all 0.25s ease;
}

body.loaded .btn-neon:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 0 25px rgba(217, 158, 30, 0.18);
}

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.45);
    padding: 12px 22px;
    border-radius: 14px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.12em;
    font-size: 11px;
    /* Removed transition to prevent animation on page load */
}

/* Only apply transitions after page has loaded */
body.loaded .btn-ghost {
    transition: all 0.25s ease;
}

body.loaded .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.04);
    color: white;
    border-color: rgba(217, 158, 30, 0.35);
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

@keyframes scan {
    0% {
        transform: translateY(-30%);
    }

    100% {
        transform: translateY(130%);
    }
}

.scanline-effect {
    position: absolute;
    inset-inline: 0;
    height: 2px;
    background: var(--neon);
    opacity: 0.15;
    animation: scan 4.2s linear infinite;
    filter: blur(0.3px);
}

.glass-topbar {
    background: rgba(10, 10, 8, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(217, 158, 30, 0.15);
    width: 100%;
    z-index: 1000;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(217, 158, 30, 0.7) rgba(0, 0, 0, 0.35);
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-left: 1px solid rgba(217, 158, 30, 0.08);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg,
            rgba(217, 158, 30, 0.85),
            rgba(217, 158, 30, 0.35));
    border-radius: 999px;
    border: 2px solid rgba(10, 10, 8, 0.9);
    box-shadow: 0 0 18px rgba(217, 158, 30, 0.15);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.95),
            rgba(217, 158, 30, 0.85));
    box-shadow: 0 0 28px rgba(217, 158, 30, 0.25);
}

/* Navigation links transitions - only after page load */
body.loaded nav a {
    transition: all 0.25s ease;
}

.btn-soon {
    background: linear-gradient(90deg, rgba(217, 158, 30, 0.8), rgba(255, 255, 255, 0.2));
    border: none;
    color: black !important;
}

body.loaded .btn-soon {
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

body.loaded .btn-soon:hover {
    background: rgba(217, 158, 30, 0.9);
    box-shadow: 0 0 20px rgba(217, 158, 30, 0.5);
}

/* Prevent flash of unstyled content */
html {
    visibility: visible;
    opacity: 1;
}

/* Ensure content is above background effects */
nav {
    position: relative;
    z-index: 1000;
}

main {
    position: relative;
    z-index: 10;
}

/* Fade-in animation for cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.military-border {
    animation: fadeInUp 0.6s ease-out backwards;
}

.military-border:nth-child(1) {
    animation-delay: 0.1s;
}

.military-border:nth-child(2) {
    animation-delay: 0.2s;
}

.military-border:nth-child(3) {
    animation-delay: 0.3s;
}

.military-border:nth-child(4) {
    animation-delay: 0.4s;
}

/* Enhanced glow effect on hover */
body.loaded .military-border:hover {
    border-color: rgba(217, 158, 30, 0.65);
    box-shadow:
        0 0 40px rgba(217, 158, 30, 0.15),
        0 0 80px rgba(217, 158, 30, 0.08),
        inset 0 0 60px rgba(217, 158, 30, 0.03);
    transform: translateY(-3px);
}

/* Pulse animation for important elements */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Glitch effect for titles (subtle) */
@keyframes glitch {

    0%,
    90%,
    100% {
        text-shadow: none;
    }

    92% {
        text-shadow:
            2px 0 var(--neon),
            -2px 0 cyan;
    }

    94% {
        text-shadow:
            -2px 0 var(--neon),
            2px 0 cyan;
    }
}

.title-glitch {
    animation: glitch 8s infinite;
}

/* Improved button interactions */
body.loaded .btn-neon:hover {
    background: #fff;
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 0 30px rgba(217, 158, 30, 0.25),
        0 5px 15px rgba(0, 0, 0, 0.3);
}

body.loaded .btn-neon:active {
    transform: translateY(0) scale(0.98);
}

body.loaded .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    color: white;
    border-color: rgba(217, 158, 30, 0.5);
    box-shadow: 0 0 20px rgba(217, 158, 30, 0.15);
    transform: translateY(-1px);
}

/* Enhanced navigation hover */
body.loaded nav a {
    position: relative;
    transition: all 0.3s ease;
}

body.loaded nav a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--neon);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    box-shadow: 0 0 8px var(--neon);
}

body.loaded nav a:hover::after {
    width: 80%;
}

/* Active page indicator */
nav a.active {
    color: var(--neon) !important;
    background: rgba(217, 158, 30, 0.1);
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Selection styling */
::selection {
    background: var(--neon);
    color: black;
}

::-moz-selection {
    background: var(--neon);
    color: black;
}

/* Loading shimmer effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(217, 158, 30, 0.1) 50%,
            rgba(255, 255, 255, 0) 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Custom Form Controls */
.segmented-control {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.segmented-option {
    flex: 1;
    position: relative;
}

.segmented-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.segmented-label {
    display: block;
    text-align: center;
    padding: 10px 4px;
    border-radius: 12px;
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.segmented-option input:checked+.segmented-label {
    background: var(--neon);
    color: black;
    box-shadow: 0 0 15px var(--neon);
}

.segmented-option:hover .segmented-label:not(input:checked + .segmented-label) {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

/* Custom Select Dropdown */
.custom-dropdown {
    position: relative;
    user-select: none;
}

.dropdown-trigger {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.dropdown-trigger:hover,
.dropdown-trigger.active {
    border-color: var(--neon);
    background: rgba(0, 0, 0, 0.6);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(15, 15, 12, 0.95);
    border: 1px solid var(--neon);
    border-radius: 14px;
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    backdrop-filter: blur(10px);
    animation: dropdownSlide 0.3s ease-out;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}

.dropdown-item:hover {
    background: var(--neon);
    color: black;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Scrollbar for Dropdown */
.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--neon);
    border-radius: 10px;
}

#chatbot-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(20px);
    z-index: 10000;
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#chatbot-container.active {
    display: flex;
    animation: chatbotAppear 0.3s ease-out;
}

#survival-chat-trigger {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid var(--neon);
    color: var(--neon);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.chatbot-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 15px;
    height: 15px;
    background: #ff4444;
    border-radius: 50%;
    border: 2px solid black;
    display: none;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(255, 68, 68, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0);
    }
}

@media (max-width: 768px) {
    #chatbot-container {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    #survival-chat-trigger {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

#survival-chat-trigger:hover {
    transform: scale(1.1) rotate(5deg);
    background: var(--neon);
    color: black;
}


#chatbot-header {
    padding: 20px;
    background: rgba(217, 158, 30, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.chatbot-status {
    width: 8px;
    height: 8px;
    background: var(--neon);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon);
}

.chatbot-title {
    margin: 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
    font-weight: 800;
}

#chatbot-close {
    background: transparent;
    border: none;
    color: white;
    opacity: 0.4;
    cursor: pointer;
    transition: opacity 0.2s;
}

#chatbot-close:hover {
    opacity: 1;
}

#chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 40px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.6;
    position: relative;
    word-wrap: break-word;
}

.message strong {
    color: var(--neon);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.message em {
    font-style: italic;
    opacity: 0.8;
}

.message br {
    display: block;
    content: "";
    margin-top: 8px;
}

.message.bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.message.user {
    align-self: flex-end;
    background: var(--neon);
    color: black;
    border-bottom-right-radius: 4px;
    font-weight: 800;
}

#chatbot-input-container {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
}

#chatbot-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 15px;
    color: white;
    font-size: 13px;
    outline: none;
    transition: border-color 0.3s;
}

#chatbot-input:focus {
    border-color: var(--neon);
}

#chatbot-send {
    background: var(--neon);
    color: black;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

#chatbot-send:hover {
    transform: scale(1.05);
}

.typing-indicator {
    padding: 0 20px 10px 20px;
    font-size: 10px;
    color: var(--neon);
    opacity: 0.7;
    display: none;
    font-style: italic;
    font-weight: 500;
}