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

body {
    background-color: #f7f5ef;
    overflow: hidden;
    font-family: 'Courier New', Courier, monospace;
    color: #1a1a1a;
}

.parallax-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

.layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: repeat;
    background-size: auto 100vh;
}

.layer-back {
    background-image: url('assets/bg_stars.png');
    animation: pan-back 40s linear infinite;
    z-index: 1;
    opacity: 0.8;
}

.layer-front {
    background-image: url('assets/bg_objects.png');
    animation: pan-front 20s linear infinite;
    mix-blend-mode: multiply;
    z-index: 2;
}

@keyframes pan-back {
    from { background-position: 0 0; }
    to { background-position: -2048px 0; }
}

@keyframes pan-front {
    from { background-position: 0 0; }
    to { background-position: -2048px 0; }
}

/* Cinematic Edge Darkening */
.vignette {
    position: absolute;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle at center, transparent 40%, rgba(26,26,26,0.35) 120%);
    pointer-events: none;
    z-index: 15;
}

/* =========================================
   Epic Character Container & Effects
   ========================================= */

.character-container {
    position: absolute;
    top: 50%;
    left: 40%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 400px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: epic-float 2s ease-in-out infinite;
    filter: drop-shadow(0 15px 15px rgba(0,0,0,0.2)) drop-shadow(0 0 30px rgba(144, 19, 254, 0.15));
}

@keyframes epic-float {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(-15px); }
}

/* High Speed Shake */
.jitter-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    animation: hyper-jitter 0.08s linear infinite;
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes hyper-jitter {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    33% { transform: translate(-1.5px, 0px) rotate(-0.2deg); }
    66% { transform: translate(0px, -1.5px) rotate(0.2deg); }
    100% { transform: translate(0px, 0px) rotate(0deg); }
}

/* Pepe Frame Sprites */
.character-frame {
    position: absolute;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0;
}
.character-frame.active {
    opacity: 1;
}


/* Ambient Character Halo */
.character-halo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140%;
    height: 140%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 230, 150, 0.15) 0%, rgba(0, 212, 255, 0.05) 50%, transparent 70%);
    animation: halo-pulse 0.1s infinite alternate;
    z-index: -2;
    pointer-events: none;
    mix-blend-mode: overlay;
}

@keyframes halo-pulse {
    from { transform: translate(-50%, -50%) scale(0.95); opacity: 0.8; }
    to { transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
}

/* Passing Lens Flare Visor Sweep */
.lens-flare {
    position: absolute;
    top: -20%;
    left: -150%;
    width: 60px;
    height: 140%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.8) 50%, transparent 100%);
    transform: skewX(-25deg);
    animation: shine-sweep 3.5s infinite linear;
    z-index: 20;
    mix-blend-mode: screen;
    pointer-events: none;
    filter: blur(5px);
}

@keyframes shine-sweep {
    0% { left: -150%; }
    15% { left: 150%; } 
    100% { left: 150%; } 
}

/* Procedural Speed Lines */
.speed-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(26, 26, 26, 0.4), transparent);
    animation: shoot-left linear infinite;
    z-index: 5;
    pointer-events: none;
    /* Uses hardware acceleration */
    will-change: transform;
}

@keyframes shoot-left {
    from { transform: translateX(110vw); }
    to { transform: translateX(-150vw); }
}

/* =========================================
   UI Layer 
   ========================================= */

.ui-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 20;
    display: flex; flex-direction: column; justify-content: space-between;
    pointer-events: none; 
}

header, .bottom-ui { pointer-events: auto; display: flex; flex-direction: column; align-items: center; }

header { margin-top: 5vh; }

.themed-title {
    font-family: 'Rye', cursive;
    font-size: 5rem;
    color: #f7f5ef;
    text-align: center;
    animation: title-float 4s ease-in-out infinite;
    text-shadow: 
        -2px -2px 0 #1a1a1a,  2px -2px 0 #1a1a1a, -2px  2px 0 #1a1a1a, 2px  2px 0 #1a1a1a,
        8px 8px 0 rgba(26,26,26, 0.9);
    letter-spacing: 4px;
    user-select: none;
}

@keyframes title-float {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-7px) rotate(1deg); }
}

.bottom-ui { margin-bottom: 5vh; gap: 20px; }

/* Contract Box */
.ca-container {
    background-color: rgba(247, 245, 239, 0.85);
    border: 3px dashed #1a1a1a;
    padding: 12px 25px;
    border-radius: 12px;
    font-family: 'Space Mono', monospace;
    font-weight: bold;
    font-size: 1.1rem;
    color: #1a1a1a;
    display: flex; align-items: center; gap: 15px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    box-shadow: 4px 4px 0px rgba(0,0,0,0.15);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ca-container:hover {
    transform: scale(1.03) translateY(-4px);
    box-shadow: 6px 8px 0px rgba(0,0,0,0.2);
    background-color: #ffffff; border-style: solid;
}

.ca-container:active { transform: scale(0.96); box-shadow: 2px 2px 0px rgba(0,0,0,0.1); }

.ca-label { opacity: 0.6; }
.ca-address { letter-spacing: 1px; user-select: none; }
.copy-icon { font-size: 1.3rem; position: relative; top: -2px; }

/* Social Icons */
.social-links {
    display: flex; gap: 20px;
    background-color: rgba(247, 245, 239, 0.6);
    padding: 12px 25px; border-radius: 50px;
    border: 3px solid #1a1a1a;
    backdrop-filter: blur(4px); box-shadow: 4px 4px 0px rgba(0,0,0,0.15);
}

.social-links a {
    display: block; width: 45px; height: 45px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-links a img {
    width: 100%; height: 100%; object-fit: contain;
    filter: grayscale(1) sepia(1) hue-rotate(-50deg) saturate(3) brightness(0.7) contrast(1.5);
    transition: all 0.4s ease;
}

.social-links a:hover { transform: translateY(-8px) scale(1.15) rotate(5deg); }
.social-links a:hover img { filter: none; drop-shadow: 0 10px 8px rgba(0,0,0,0.4); }

/* Toast */
.toast {
    position: fixed; top: -100px; left: 50%; transform: translateX(-50%);
    background-color: #1a1a1a; color: #f7f5ef;
    font-family: 'Space Mono', monospace;
    padding: 15px 35px; border-radius: 50px; font-weight: bold; font-size: 1.1rem;
    box-shadow: 0 15px 30px rgba(0,0,0,0.3); border: 2px solid #f7f5ef;
    transition: top 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); z-index: 1000; pointer-events: none;
}
.toast.show { top: 40px; }
