/* ===== BugTraderYai V8: THE HYPER-DISTORTION PROTOCOL (4D) ===== */

:root {
    --bg-dark: #010204;
    --card-bg: rgba(5, 10, 20, 0.95);
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.6);
    --text-white: #ffffff;
    --text-dim: #94a3b8;
    --glitch-red: rgba(255, 0, 193, 0.7);
    --glitch-blue: rgba(0, 255, 240, 0.7);
}

/* 1. Reset & Global Setup */
* { box-sizing: border-box; }
body {
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans Thai', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.8;
    overflow-x: hidden;
    text-align: center;
}

/* 2. 🌀 มิติที่ 4 บิดเบี้ยว 200% (Animated Background) */
.dimension-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    /* สร้าง Grid ลึกมหาศาล */
    background-image: 
        linear-gradient(rgba(56, 189, 248, 0.15) 2px, transparent 2px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.15) 2px, transparent 2px);
    background-size: 60px 60px;
    background-position: center;
    /* บิดมุมมองให้ลึกสุด */
    transform: perspective(400px) rotateX(60deg) scale(2.5);
    filter: blur(0.5px) contrast(1.2);
    /* Animation Warp แบบบ้าคลั่ง */
    animation: hyperWarp 12s infinite linear;
}

@keyframes hyperWarp {
    0% { transform: perspective(400px) rotateX(60deg) rotateZ(0deg) scale(2.5); background-position: 0 0; }
    25% { transform: perspective(400px) rotateX(65deg) rotateZ(3deg) scale(2.7); filter: hue-rotate(10deg); }
    50% { transform: perspective(400px) rotateX(60deg) rotateZ(0deg) scale(2.5); background-position: -120px -120px; }
    75% { transform: perspective(400px) rotateX(55deg) rotateZ(-3deg) scale(2.3); filter: hue-rotate(-10deg); }
    100% { transform: perspective(400px) rotateX(60deg) rotateZ(0deg) scale(2.5); background-position: -240px -240px; }
}

/* 3. Navigation Bar (Glass Distortion) */
.hub-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px;
    background: rgba(1, 2, 4, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--accent);
}
.hub-nav a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 5px;
    transition: 0.3s;
}
.hub-nav a:hover {
    color: var(--accent);
    text-shadow: 0 0 8px var(--accent);
    background: rgba(56, 189, 248, 0.1);
}

/* 4. Main Content Structure */
main {
    max-width: 850px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* 5. ⚡️ Section Cards แบบ Glitch Effect */
section {
    background: var(--card-bg) !important;
    border: 1px solid rgba(56, 189, 248, 0.4);
    padding: 40px !important;
    border-radius: 15px;
    margin: 40px auto !important;
    backdrop-filter: blur(15px);
    animation: glitchBox 6s infinite;
}

@keyframes glitchBox {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 0, 0, 1); border-color: var(--accent); }
    40% { box-shadow: -10px 0 20px var(--glitch-red), 10px 0 20px var(--glitch-blue); transform: translate(-2px, 1px); }
    42% { transform: translate(2px, -1px); }
    44% { box-shadow: 0 0 20px rgba(0, 0, 0, 1); transform: translate(0, 0); }
}

/* 6. 📺 Glitch Text Setup (h1, h2) */
h1, h2 {
    color: #fff;
    position: relative;
    display: inline-block;
    font-weight: 900;
    letter-spacing: -1px;
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--accent-glow);
}

/* 7. Accordion & List (Modern Style) */
.nav-list {
    list-style: none;
    padding: 0;
    text-align: left;
    display: inline-block;
}
.nav-list li {
    margin-bottom: 12px;
    color: var(--text-white);
}
.nav-list a {
    color: var(--accent);
    text-decoration: none;
    font-weight: bold;
}
.nav-list a:hover { text-decoration: underline; }

/* 8. UI Elements: Shimmer & CTA */
.shimmer {
    background: linear-gradient(90deg, transparent 25%, rgba(56, 189, 248, 0.2) 50%, transparent 75%);
    background-size: 200% 100%;
    animation: shimmer-ani 3s infinite;
}
@keyframes shimmer-ani {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.cta-button {
    display: inline-block;
    margin-top: 25px;
    padding: 18px 50px;
    background: var(--accent);
    color: #000 !important;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 900;
    letter-spacing: 2px;
    transition: 0.3s;
    box-shadow: 0 0 20px var(--accent-glow);
}
.cta-button:hover {
    transform: scale(1.05) skewX(-5deg);
    box-shadow: 0 0 40px var(--accent);
}

footer { padding: 80px 0; color: #475569; letter-spacing: 2px; font-size: 0.8rem; }

@media (max-width: 600px) {
    main { padding: 0 15px; }
    section { padding: 25px !important; }
    h1 { font-size: 2rem; }
}
