:root {
    --color-bg: #000000;
    --color-text: #FFFFFF;
    --color-accent: #002FD8;
    /* Kurrco Blue */
    --font-primary: 'Syne', sans-serif;
    --font-mono: 'Space Grotesk', monospace;
    --grid-gap: 2px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    cursor: none;
    /* Hide default cursor */
}

html {
    background-color: #000000;
    /* Force Black Bars on Safari */
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    background-color: transparent;
    /* Transparent to let Canvas (Z=0) show through */
    color: var(--color-text);
    font-family: var(--font-primary);
    overflow-x: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Canvas Background */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Strict Positive: Layer 1 */
    background-color: #000000;
    /* Explicit Black Background */

    /* FORCE PIXELATION */
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.scanline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0) 0px,
            rgba(0, 0, 0, 0) 1px,
            rgba(255, 255, 255, 0.05) 2px,
            rgba(255, 255, 255, 0.05) 3px);
    pointer-events: none;
    z-index: 2;
    /* Layer 2 (Above Canvas) */
    opacity: 0.1;
}

/* Glow Container */
.glow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
    /* Layer 2 (Above Canvas) */
}

/* Lighting Effects */
.ambient-light {
    position: absolute;
    top: -50%;
    /* Pushed further back */
    left: -50%;
    width: 80vw;
    height: 80vw;
    min-width: 600px;
    min-height: 600px;
    background: radial-gradient(circle, rgba(0, 47, 216, 0.5) 0%, transparent 60%);
    filter: blur(80px);
    animation: breathe 5s infinite ease-in-out;
}

.ambient-light-2 {
    position: absolute;
    bottom: -50%;
    /* Pushed further back */
    right: -50%;
    width: 80vw;
    height: 80vw;
    min-width: 600px;
    min-height: 600px;
    background: radial-gradient(circle, rgba(0, 47, 216, 0.4) 0%, transparent 60%);
    filter: blur(80px);
    animation: drift 6s infinite ease-in-out alternate;
}

@keyframes breathe {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.4);
    }

    /* Massive Pulse */
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }

    100% {
        transform: translate(-100px, 100px) scale(1.2);
        opacity: 0.8;
    }
}

/* Glassmorphism - Sharp & Clear */
.glass-panel {
    background: rgba(0, 0, 0, 0.2);
    /* Very transparant */
    backdrop-filter: blur(2px);
    /* Minimal dimming */
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.sharp-frame {
    background: transparent;
    /* No tint to keep pure black contrast */
    border: 1px solid rgba(255, 255, 255, 0.15);
    /* Keep the subtle border */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: auto;
    /* Explicitly allow interaction */
}

.brutal-btn.glass-btn {
    background: #000000;
    /* Solid Black - Specific enough to beat .brutal-btn */
    backdrop-filter: none !important;
    /* ABSOLUTELY NO BLUR */
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    /* Remove any other filters */
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 999;
    /* Above everything */
    transform: translateZ(0);
    /* Fix sub-pixel rendering */
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-accent);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body:hover .cursor-outline {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
    mix-blend-mode: difference;
}

/* Layout Container */
.brutal-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    border: 0;
    /* Removed outer border for cleaner look */
    position: relative;
    z-index: 10;
    /* Layer 10 (Content) */
}

/* Marquee */
.marquee-strip {
    background: #000000;
    color: #FFFFFF;
    overflow: hidden;
    white-space: nowrap;
    padding: 1rem 0;
    font-family: var(--font-mono);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 0.2em;
}

.marquee-content {
    display: inline-block;
    animation: marquee 20s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Hero Section */
.hero-grid {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 2rem;
}

.header-block {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.mega-title {
    font-size: 18vw;
    line-height: 0.85;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.04em;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-shadow: 0 0 50px rgba(0, 47, 216, 0.2);
}

.mega-title .line-1 {
    color: var(--color-text);
}

.mega-title .line-2 {
    color: transparent;
    -webkit-text-stroke: 2px var(--color-text);
    /* Outline text */
    position: relative;
    top: -1vw;
}

.sub-meta {
    font-family: var(--font-mono);
    margin-top: 1rem;
    font-size: 1rem;
    opacity: 0.6;
    letter-spacing: 0.2em;
    display: flex;
    gap: 2rem;
    justify-content: center;
}

/* Links Block */
.links-block {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
    max-width: 450px;
    z-index: 2;
}

.brutal-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    background: transparent;
    text-decoration: none;
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    pointer-events: auto;
    /* Ensure clickable */
}

.brutal-btn .btn-text,
.brutal-btn .btn-arrow {
    position: relative;
    z-index: 2;
    transition: color 0.2s ease;
}

.hover-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: var(--color-accent);
    z-index: 1;
    transition: width 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.brutal-btn:hover {
    border-color: var(--color-accent) !important;
    transform: translateX(10px);
    box-shadow: 0 0 30px var(--color-accent), inset 0 0 20px rgba(0, 47, 216, 0.2) !important;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    animation: none !important;
    /* Stop pulse/flash so hover takes over */
    background: rgba(0, 47, 216, 0.1);
    /* Subtle fill to boost glow */
}

.brutal-btn:hover .hover-bg {
    width: 100%;
}

.brutal-btn:hover .btn-text,
.brutal-btn:hover .btn-arrow {
    color: #FFFFFF;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Liquid Chrome Effect */
.brutal-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%),
            rgba(255, 255, 255, 0.4) 0%,
            rgba(0, 47, 216, 0.3) 25%,
            transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    /* Below text (z-2) but above hover-bg (z-1) */
    pointer-events: none;
    mix-blend-mode: overlay;
}

.brutal-btn:hover::before {
    opacity: 1;
}

.btn-arrow {
    font-size: 1.5rem;
}

/* Logo */
.logo-main {
    max-width: 280px;
    /* Drastically reduced size */
    width: 100%;
    height: auto;
    /* Removed drop-shadow per user request */
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* Footer Minimal */
.footer-minimal {
    text-align: center;
    padding: 2rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Time Display Box */
.time-box {
    margin-top: 2.5rem;
    /* Increased spacing per user request */
    padding: 1.45rem 2rem;
    /* Increased to match button height (arrow adds ~0.5rem) */
    background-color: #FFFFFF;
    color: #000000;
    font-family: var(--font-mono);
    /* Already matches buttons */
    font-size: 1rem;
    /* Match button size */
    font-weight: 600;
    /* Match button weight */
    letter-spacing: 0.1em;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4), inset 0 0 10px rgba(0, 0, 0, 0.1);
    user-select: none;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 450px;
    /* Match links-block width */
    width: 100%;
    font-variant-numeric: tabular-nums;
    /* Fix jitter */
}

@keyframes boxPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.4), inset 0 0 10px rgba(0, 0, 0, 0.1);
    }

    50% {
        box-shadow: 0 0 35px rgba(255, 255, 255, 0.6), inset 0 0 15px rgba(0, 0, 0, 0.05);
    }
}

/* Guest Book Removed */
z-index: 100;
display: flex;
flex-direction: column;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
overflow: hidden;
font-family: var(--font-mono);
}

.gb-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--color-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: grab;
    /* Indicates draggable */
    user-select: none;
    transition: background 0.2s;
}

.gb-header:active {
    cursor: grabbing;
    background: rgba(255, 255, 255, 0.1);
}

.gb-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gb-toggle {
    background: transparent;
    border: none;
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 1rem;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}

/* Collapsed State */
.guestbook-glass.collapsed {
    height: 40px !important;
    /* Only header height */
    overflow: hidden;
}

.guestbook-glass.collapsed .gb-feed,
.guestbook-glass.collapsed .gb-form {
    display: none;
}

.gb-status {
    color: #00ff41;
    /* Hacker green or use Accent Blue? */
    animation: blink 2s infinite;
}

.gb-feed {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.gb-feed::-webkit-scrollbar {
    width: 4px;
}

.gb-feed::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

.gb-entry {
    font-size: 0.8rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.gb-name {
    color: var(--color-accent);
    font-weight: 700;
    margin-right: 0.3rem;
}

.gb-msg {
    color: rgba(255, 255, 255, 0.8);
}

.gb-time {
    display: block;
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 0.2rem;
}

.gb-form {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#gb-name,
#gb-msg {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.5rem;
    border-radius: 4px;
    outline: none;
}

#gb-msg {
    resize: none;
    height: 60px;
}

#gb-name::placeholder,
#gb-msg::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.gb-btn {
    background: var(--color-accent);
    color: white;
    border: none;
    padding: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    border-radius: 2px;
}

.gb-btn:hover {
    box-shadow: 0 0 10px var(--color-accent);
}

@media (max-width: 768px) {
    .guestbook-glass {
        display: none !important;
    }
}

.pulsate {
    animation: boxPulse 2s ease-in-out infinite;
}

/* Footer Status */
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.footer-item {
    padding: 1.5rem;
    border-right: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-item:last-child {
    border-right: none;
    text-align: right;
    align-items: flex-end;
}

.footer-item .label {
    opacity: 0.5;
    font-size: 0.75rem;
}

.value.blink {
    color: #00FF00;
    animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* Mobile */
@media (max-width: 768px) {

    /* Hide Cursor on Mobile */
    .cursor-dot,
    .cursor-outline {
        display: none !important;
    }

    .mega-title {
        font-size: 22vw;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        border-top: none;
    }

    .footer-item {
        border-right: none;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        flex-direction: row;
        justify-content: space-between;
        padding: 1rem;
    }

    .footer-item:last-child {
        align-items: center;
    }

    /* Scaling for Mobile */
    .ambient-light,
    .ambient-light-2 {
        /* Force offsets to handle the fixed min-width of 600px on small screens */
        top: -450px !important;
        left: -450px !important;
    }

    .ambient-light-2 {
        top: auto !important;
        left: auto !important;
        bottom: -450px !important;
        right: -450px !important;
    }

    .logo-main {
        max-width: 200px;
    }

    .brutal-btn {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Center Beam (Mobile Optimized) */
    .center-beam {
        width: 100% !important;
        background: transparent !important;
        /* Explicitly transparent */
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
        /* Maximum Softness: Triangle Gradient (0% -> 50% -> 100%) */
        mask-image: linear-gradient(to right, transparent 0%, black 50%, transparent 100%);
        -webkit-mask-image: linear-gradient(to right, transparent 0%, black 50%, transparent 100%);
    }

    /* Mobile Cycling Flash (Restored & Blued) */
    .links-block .brutal-btn {
        background: #000000;
        /* Safety Fallback */
        animation: mobileFlash 4.5s infinite;
        /* 1.5s per button * 3 buttons = 4.5s total loop */
    }

    .links-block .brutal-btn:nth-child(1) {
        animation-delay: 0s;
    }

    .links-block .brutal-btn:nth-child(2) {
        animation-delay: 1.5s;
    }

    .links-block .brutal-btn:nth-child(3) {
        animation-delay: 3.0s;
    }
}

/* Center Beam (Desktop Default) */
.center-beam {
    position: fixed;
    top: 50%;
    /* Center vertically */
    left: 50%;
    transform: translate(-50%, -50%);
    /* perfectly centered */
    width: 600px;
    /* Wide area for soft fade */
    height: 100vh;
    /* Full Height */
    background: transparent;
    /* Explicitly transparent */
    backdrop-filter: blur(6px);
    /* Stronger blur since no color */
    -webkit-backdrop-filter: blur(6px);
    z-index: 2;
    /* Layer 2 (Above Canvas) */
    pointer-events: none;
    /* Maximum Softness: Triangle Gradient */
    mask-image: linear-gradient(to right, transparent 0%, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 50%, transparent 100%);
}

@keyframes mobileFlash {

    /* Idle State (Black with subtle blue tint border) */
    0%,
    5%,
    45%,
    100% {
        border-color: rgba(255, 255, 255, 0.2);
        transform: translateX(0);
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
        text-shadow: none;
        background-color: #000000 !important;
        /* Force reset to black */
        color: var(--color-text);
    }

    /* Active Pulse */
    15% {
        border-color: var(--color-accent);
        /* Blue Border */
        background-color: var(--color-accent) !important;
        /* Blue Fill */
        color: #FFFFFF;
        /* White Text */
        transform: translateX(5px);
        box-shadow: 0 0 30px var(--color-accent);
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    }
}

/* DESKTOP PULSE (Subtle Breathing) */
@keyframes desktopPulse {

    0%,
    100% {
        border-color: rgba(255, 255, 255, 0.2);
        box-shadow: 0 0 0 transparent;
    }

    50% {
        border-color: rgba(255, 255, 255, 0.6);
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    }
}

@media (min-width: 769px) {
    .links-block .brutal-btn {
        animation: desktopPulse 3s infinite ease-in-out;
    }

    .links-block .brutal-btn:nth-child(1) {
        animation-delay: 0s;
    }

    .links-block .brutal-btn:nth-child(2) {
        animation-delay: 0.3s;
    }

    .links-block .brutal-btn:nth-child(3) {
        animation-delay: 0.6s;
    }
}