/* ========================================
   Mercycat Network - Self-Contained Styles
   ======================================== */

:root {
    --primary-color: #b794f6;
    --primary-glow: rgba(183, 148, 246, 0.4);
    --secondary-color: #e879f9;
    --secondary-glow: rgba(232, 121, 249, 0.3);
    --accent-gold: #fbbf24;
    --accent-gold-glow: rgba(251, 191, 36, 0.3);
    --accent-cyan: #22d3ee;
    --accent-cyan-glow: rgba(34, 211, 238, 0.3);

    --bg-dark: #0a0612;
    --bg-overlay: rgba(10, 6, 18, 0.6);

    --text-primary: #f8f4ff;
    --text-secondary: rgba(248, 244, 255, 0.7);
    --text-muted: rgba(248, 244, 255, 0.4);

    --border-glow: rgba(183, 148, 246, 0.25);
    --border-subtle: rgba(183, 148, 246, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Orbitron', 'Noto Serif TC', sans-serif;
    background: #000;
    color: var(--text-primary);
    perspective: 1200px;
}

/* ========================================
   ANIMATION WRAPPER
   ======================================== */
#animation-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, #130924 0%, #000000 80%);
    overflow: hidden;
}

.scene-container {
    transform-style: preserve-3d;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.grid-world {
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    gap: 20px;
    transform-style: preserve-3d;
    width: 120vmax;
    height: 120vmax;
    position: absolute;
}

.grid-block {
    width: 100%;
    height: 100%;
    background: rgba(20, 10, 30, 0.4);
    border: 1px solid rgba(183, 148, 246, 0.15);
    position: relative;
    transform-style: preserve-3d;
    transition: box-shadow 0.3s ease;
}

.grid-block::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(183, 148, 246, 0.05);
    transform: translateZ(1px);
}

.grid-block.active {
    background: rgba(183, 148, 246, 0.2);
    border-color: rgba(232, 121, 249, 0.5);
    box-shadow: 0 0 30px rgba(183, 148, 246, 0.3), inset 0 0 20px rgba(183, 148, 246, 0.1);
}

.grid-block.highlight {
    background: rgba(251, 191, 36, 0.3);
    border-color: #fbbf24;
    box-shadow: 0 0 50px rgba(251, 191, 36, 0.6);
}

/* ========================================
   OVERLAY EFFECTS
   ======================================== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.vignette {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(10, 6, 18, 0.7) 100%);
}

.noise {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.scan-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--primary-glow) 20%,
            var(--primary-color) 50%,
            var(--primary-glow) 80%,
            transparent 100%);
    animation: scanMove 10s linear infinite;
    opacity: 0.3;
}

@keyframes scanMove {
    0% {
        top: -2px;
    }

    100% {
        top: 100%;
    }
}

/* ========================================
   MAIN CONTENT
   ======================================== */
.main-content {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ========================================
   STATUS BAR
   ======================================== */
.status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 50px;
    z-index: 20;
}

.status-left,
.status-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-indicator {
    position: relative;
    width: 10px;
    height: 10px;
}

.pulse-core {
    position: absolute;
    width: 8px;
    height: 8px;
    top: 1px;
    left: 1px;
    background: var(--accent-gold);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-gold), 0 0 20px var(--accent-gold-glow);
}

.pulse-ring {
    position: absolute;
    width: 10px;
    height: 10px;
    border: 1px solid var(--accent-gold);
    border-radius: 50%;
    animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(3);
        opacity: 0;
    }
}

.status-text,
.status-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 4px;
    color: var(--text-muted);
}

.status-divider {
    color: var(--primary-color);
    opacity: 0.5;
    font-size: 10px;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
}

.logo-container {
    text-align: center;
    position: relative;
    z-index: 10;
}

.main-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Cyberpunk Glitchy Title */
.title-mercy {
    font-size: clamp(60px, 12vw, 120px);
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    position: relative;
    letter-spacing: 0.1em;
    text-transform: uppercase;

    background: linear-gradient(180deg,
            #ffffff 0%,
            #e0c3fc 45%,
            #8ec5fc 55%,
            #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    filter: drop-shadow(0 0 20px rgba(142, 197, 252, 0.5));
    animation: textFloat 4s ease-in-out infinite;
}

.title-mercy::before,
.title-mercy::after {
    content: 'MERCYCAT';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.5;
}

.title-mercy::before {
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.title-mercy::after {
    left: -2px;
    text-shadow: 2px 0 #00fff9;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.title-project {
    display: block;
    font-size: clamp(14px, 3vw, 24px);
    letter-spacing: 1.5em;
    color: rgba(255, 255, 255, 0.8);
    margin-top: -10px;
    margin-left: 1.5em;
    font-weight: 300;
    text-shadow: 0 0 10px rgba(183, 148, 246, 0.8);
    animation: fadeInPulse 3s infinite alternate;
}

/* Tagline Container */
.tagline {
    margin-top: 40px;
    padding: 20px 40px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    display: inline-flex;
    gap: 20px;
    border-radius: 4px;
    transform: perspective(500px) rotateX(10deg);
}

.tagline-char {
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    color: #a78bfa;
    margin: 0;
}

.tagline-divider {
    color: var(--primary-color);
    opacity: 0.5;
}

.highlight {
    color: #22d3ee;
    font-weight: bold;
    text-shadow: 0 0 10px #22d3ee;
}

/* Animations */
@keyframes glitch-anim-1 {
    0% {
        clip-path: polygon(0 2%, 100% 2%, 100% 5%, 0 5%);
        transform: translate(0);
    }

    10% {
        clip-path: polygon(0 15%, 100% 15%, 100% 15%, 0 15%);
        transform: translate(-2px);
    }

    20% {
        clip-path: polygon(0 10%, 100% 10%, 100% 20%, 0 20%);
        transform: translate(2px);
    }

    30% {
        clip-path: polygon(0 1%, 100% 1%, 100% 2%, 0 2%);
        transform: translate(0);
    }

    40% {
        clip-path: polygon(0 33%, 100% 33%, 100% 33%, 0 33%);
        transform: translate(0);
    }

    50% {
        clip-path: polygon(0 44%, 100% 44%, 100% 44%, 0 44%);
        transform: translate(0);
    }

    60% {
        clip-path: polygon(0 50%, 100% 50%, 100% 20%, 0 20%);
        transform: translate(0);
    }

    to {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        transform: translate(0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip-path: polygon(0 60%, 100% 60%, 100% 65%, 0 65%);
        transform: translate(0);
    }

    10% {
        clip-path: polygon(0 75%, 100% 75%, 100% 75%, 0 75%);
        transform: translate(2px);
    }

    20% {
        clip-path: polygon(0 60%, 100% 60%, 100% 50%, 0 50%);
        transform: translate(-2px);
    }

    30% {
        clip-path: polygon(0 90%, 100% 90%, 100% 95%, 0 95%);
        transform: translate(0);
    }

    to {
        clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
        transform: translate(0);
    }
}

@keyframes textFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes fadeInPulse {
    0% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
        text-shadow: 0 0 20px rgba(183, 148, 246, 1);
    }
}

/* ========================================
   CORNER ORNAMENTS
   ======================================== */
.corner-ornament {
    position: fixed;
    width: 60px;
    height: 60px;
    color: var(--border-subtle);
    pointer-events: none;
    z-index: 15;
}

.corner-ornament.top-left {
    top: 60px;
    left: 30px;
}

.corner-ornament.top-right {
    top: 60px;
    right: 30px;
}

.corner-ornament.bottom-left {
    bottom: 60px;
    left: 30px;
}

.corner-ornament.bottom-right {
    bottom: 60px;
    right: 30px;
}

.corner-ornament svg {
    width: 100%;
    height: 100%;
}

/* ========================================
   FOOTER
   ======================================== */
.footer-info {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 15;
}

.footer-ornament {
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-subtle));
}

.footer-ornament.right {
    background: linear-gradient(90deg, var(--border-subtle), transparent);
}

.contact {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--text-muted);
    opacity: 0.6;
    transition: all 0.4s ease;
    text-decoration: none;
}

.contact:hover {
    color: var(--primary-color);
    opacity: 1;
    text-shadow: 0 0 15px var(--primary-glow);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .status-bar {
        padding: 20px 25px;
    }

    .tagline {
        flex-direction: column;
        gap: 10px;
    }

    .tagline-divider {
        display: none;
    }

    .corner-ornament {
        width: 40px;
        height: 40px;
    }
}

::selection {
    background: rgba(183, 148, 246, 0.3);
    color: var(--text-primary);
}