:root {
    --bg: #050505;
    --text-main: #e0e0e0;
    --text-muted: #555;
    --accent-red: #ff3333;
    --accent-cyan: #00e5ff;
    --accent-gold: #d4af37;
    --border-color: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: 'Space Grotesk', 'Noto Sans SC', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Subtle pixelated grid background */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image:
        linear-gradient(45deg, #080808 25%, transparent 25%, transparent 75%, #080808 75%, #080808),
        linear-gradient(45deg, #080808 25%, transparent 25%, transparent 75%, #080808 75%, #080808);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    z-index: -2;
}

.container {
    width: 90%;
    max-width: 520px;
    position: relative;
    z-index: 10;
    text-align: center;
}

/* ─── Header ─── */
.header {
    margin-bottom: 3rem;
}

/* ─── Full-text glitch ─── */
.glitch {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 4.5rem;
    font-weight: 300;
    letter-spacing: 0.4rem;
    color: var(--text-main);
    position: relative;
    display: inline-block;
}

/* Both pseudo-elements duplicate the full text */
.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.glitch::before {
    color: var(--accent-red);
    z-index: -1;
    animation: glitch-r 3s cubic-bezier(.25,.46,.45,.94) both infinite;
}

.glitch::after {
    color: var(--accent-cyan);
    z-index: -2;
    animation: glitch-b 2.5s cubic-bezier(.25,.46,.45,.94) reverse both infinite;
}

/* Red channel jitter — moves entire text block */
@keyframes glitch-r {
    0%   { transform: translate(0); }
    2%   { transform: translate(3px, -1px); }
    4%   { transform: translate(-3px, 1px); }
    6%   { transform: translate(0); }
    50%  { transform: translate(0); }
    52%  { transform: translate(-2px, 1px); }
    54%  { transform: translate(2px, -1px); }
    56%  { transform: translate(0); }
    100% { transform: translate(0); }
}

/* Cyan channel jitter — opposite direction */
@keyframes glitch-b {
    0%   { transform: translate(0); }
    2%   { transform: translate(-3px, 1px); }
    4%   { transform: translate(3px, -1px); }
    6%   { transform: translate(0); }
    60%  { transform: translate(0); }
    62%  { transform: translate(2px, 1px); }
    64%  { transform: translate(-2px, -1px); }
    66%  { transform: translate(0); }
    100% { transform: translate(0); }
}

.subtitle {
    font-size: 0.8rem;
    letter-spacing: 4px;
    color: var(--accent-gold);
    margin-top: 0.25rem;
}

/* ─── Body copy ─── */
.body-box {
    margin-bottom: 4rem;
}

.tagline {
    font-size: 1.15rem;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}

.tagline-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ─── Contact Section ─── */
.contact-section { width: 100%; margin-top: 2rem; }
.section-heading { font-size: 0.85rem; letter-spacing: 0.3em; color: var(--text-muted); margin-bottom: 2rem; text-transform: uppercase; }
.contact-grid { display: flex; flex-direction: column; gap: 1rem; }

.contact-card {
    position: relative;
    background: rgba(20, 20, 20, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.contact-card:hover { border-color: rgba(255, 255, 255, 0.15); transform: translateY(-2px); background: rgba(30, 30, 30, 0.6); }

.card-content { display: flex; align-items: center; gap: 1.25rem; position: relative; z-index: 2; }

.platform-icon {
    width: 44px; height: 44px; border-radius: 10px; background: rgba(0, 0, 0, 0.5);
    display: flex; align-items: center; justify-content: center; padding: 10px;
    color: var(--text-main); border: 1px solid rgba(255, 255, 255, 0.05); transition: border-color 0.3s ease;
}
.contact-card:hover .platform-icon { border-color: rgba(255, 255, 255, 0.2); }

.card-info { flex: 1; text-align: left; display: flex; flex-direction: column; gap: 0.25rem; }
.platform { font-size: 0.75rem; letter-spacing: 0.1em; color: var(--text-muted); font-weight: 700; }
.handle { font-size: 1.05rem; color: var(--text-main); font-weight: 500; }

.card-action {
    font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em;
    padding: 0.5rem 0.75rem; border-radius: 8px; background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent; transition: all 0.2s; display: flex; align-items: center; justify-content: center;
}
.contact-card:hover .card-action { color: var(--text-main); background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.1); }

/* Glow Effects */
.card-glow {
    position: absolute; top: 50%; left: 50%; width: 150%; height: 150%;
    transform: translate(-50%, -50%) scale(0); opacity: 0; pointer-events: none;
    border-radius: 50%; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s ease;
    z-index: 0; filter: blur(40px);
}
.discord-glow { background: radial-gradient(circle, rgba(88,101,242,0.15) 0%, transparent 70%); }
.telegram-glow { background: radial-gradient(circle, rgba(34,158,217,0.15) 0%, transparent 70%); }
.wechat-glow { background: radial-gradient(circle, rgba(7,193,96,0.15) 0%, transparent 70%); }
.contact-card:hover .card-glow { transform: translate(-50%, -50%) scale(1); opacity: 1; }

/* QR Code Reveal */
.qr-wrapper {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10;
    margin-bottom: 0px;
    pointer-events: none;
}

.contact-card.has-qr:hover .qr-wrapper {
    max-height: 500px;
    opacity: 1;
    padding: 1.25rem;
    margin-bottom: 10px;
    pointer-events: auto;
}

.qr-code { width: 100%; max-width: 200px; height: auto; border-radius: 8px; display: block; }

/* ─── Mobile ─── */
@media (max-width: 600px) {
    .glitch { font-size: 3rem; }
}
