:root {
    --bg-color: #0b0c10;
    --card-bg: rgba(22, 24, 38, 0.6);
    --text-primary: #e0e6ed;
    --text-secondary: #aeb4d0;
    --accent-primary: #931210;
    --accent-secondary: #ff4b4b;
    
    --color-red: #ff4b4b;
    --color-white: #ffffff;
    --color-green: #00e676;
    --color-yellow: #ffd600;
}

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

body, html {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* ---------- Background Animations (Space & UFO) ---------- */
#space-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at bottom, #1b1c31 0%, #0b0c10 100%);
}

.stars, .twinkling, .clouds {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.stars {
    background: #000 url('https://raw.githubusercontent.com/frontend-joe/css-backgrounds/main/stars.png') repeat top center;
    z-index: 0;
}

.twinkling {
    background: transparent url('https://raw.githubusercontent.com/frontend-joe/css-backgrounds/main/twinkling.png') repeat top center;
    z-index: 1;
    animation: move-twink-back 200s linear infinite;
}

@keyframes move-twink-back {
    from {background-position: 0 0;}
    to {background-position: -10000px 5000px;}
}

/* Planets */
.planet-container {
    position: absolute;
    z-index: 1;
    opacity: 0.8;
}

.planet-ring-huge {
    top: calc(100vh - 1250px);
    right: -750px;
    width: 2000px;
    height: 2000px;
    animation: float-planet 10s ease-in-out infinite alternate;
    pointer-events: none;
}

.planet-primary {
    top: calc(100vh - 550px);
    right: -50px;
    width: 600px;
    height: 600px;
    animation: float-planet 10s ease-in-out infinite alternate;
}



.star-marker {
    position: absolute;
    width: 60px;
    height: 60px;
    z-index: 1;
    pointer-events: none;
    animation: float-planet 6s ease-in-out infinite alternate;
}

.constellation {
    position: absolute;
    width: 200px;
    height: 200px;
    z-index: 1;
    pointer-events: none;
    animation: float-planet-reverse 15s ease-in-out infinite alternate;
}

.wireframe-planet {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(147, 18, 16, 0.4));
}

.spin-slow {
    transform-origin: 200px 200px;
    animation: spin 20s linear infinite;
}

.spin-reverse {
    transform-origin: 200px 200px;
    animation: spin-rev 15s linear infinite;
}

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes spin-rev { 100% { transform: rotate(-360deg); } }

.dash-march {
    animation: march-dash 40s linear infinite;
}

.dash-march-reverse {
    animation: march-dash-reverse 30s linear infinite;
}

@keyframes march-dash {
    to { stroke-dashoffset: -1000; }
}
@keyframes march-dash-reverse {
    to { stroke-dashoffset: 1000; }
}

@keyframes float-planet {
    0% { transform: translateY(0); }
    100% { transform: translateY(-30px); }
}

/* UFO Animation */
.ufo-container {
    position: absolute;
    z-index: 50;
    pointer-events: none;
    animation: fly-ufo 24s linear infinite;
}

#ufo-dodge {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.4s ease-out;
}

#ufo-dodge::after {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    background: transparent;
    border-radius: 50%;
    z-index: 10;
}

.ufo-icon {
    width: 150px;
    animation: ufo-scale 24s linear infinite;
}

.ufo-speech-bubble {
    position: absolute;
    top: -65px;
    left: 50%;
    background: #000;
    border: 2px solid #931210;
    color: #ff4b4b;
    padding: 6px 14px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 16px;
    letter-spacing: 2px;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%) scale(0);
    transform-origin: bottom center;
    animation: ufo-speak 24s linear infinite;
    z-index: 12;
    box-shadow: 0 0 15px rgba(147, 18, 16, 0.4);
    white-space: nowrap;
}

.ufo-speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #931210 transparent transparent transparent;
}

@keyframes ufo-speak {
    0%, 35% { opacity: 0; transform: translateX(-50%) scale(0); }
    37% { opacity: 1; transform: translateX(-50%) scale(1); }
    48% { opacity: 1; transform: translateX(-50%) scale(1); }
    50%, 100% { opacity: 0; transform: translateX(-50%) scale(0); }
}

.entry-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #ff4b4b;
    border-radius: 50%;
    box-shadow: 0 0 20px 10px rgba(255, 75, 75, 0.8);
    animation: entry-dot-scale 24s linear infinite;
    z-index: 9;
}

.exit-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #ff4b4b;
    border-radius: 50%;
    box-shadow: 0 0 20px 10px rgba(255, 75, 75, 0.8);
    animation: exit-dot-scale 24s linear infinite;
    z-index: 9;
}

.exit-star {
    position: absolute;
    width: 60px;
    height: 60px;
    animation: exit-star-blink 24s linear infinite;
    opacity: 0;
    z-index: 11;
}
.hyperspace-star svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
}

@keyframes fly-ufo {
    0%, 4% { transform: translate(90vw, 20vh) rotate(-25deg); animation-timing-function: linear; }
    10% { transform: translate(70vw, 14vh) rotate(-15deg); animation-timing-function: linear; }
    17% { transform: translate(45vw, 14vh) rotate(-5deg); animation-timing-function: linear; }
    25% { transform: translate(25vw, 22vh) rotate(0deg); animation-timing-function: linear; }
    35% { transform: translate(12vw, 38vh) rotate(5deg); animation-timing-function: linear; }
    46% { transform: translate(15vw, 58vh) rotate(10deg); animation-timing-function: linear; }
    58% { transform: translate(35vw, 72vh) rotate(15deg); animation-timing-function: linear; }
    66% { transform: translate(55vw, 70vh) rotate(5deg); animation-timing-function: linear; }
    72% { transform: translate(70vw, 62vh) rotate(0deg); animation-timing-function: linear; }
    74% { transform: translate(80vw, 55vh) rotate(0deg); }
    100% { transform: translate(80vw, 55vh) rotate(0deg); }
}

@keyframes entry-dot-scale {
    0% { transform: scale(0); opacity: 1; }
    6% { transform: scale(3); opacity: 1; }
    9% { transform: scale(6); opacity: 0; }
    10%, 100% { transform: scale(0); opacity: 0; }
}

@keyframes ufo-scale {
    0%, 5% { transform: scale(0.3); opacity: 0; }
    9% { transform: scale(1); opacity: 1; }
    
    69% { transform: scale(1); opacity: 1; }
    74% { transform: scale(0.3); opacity: 0; }
    100% { transform: scale(0); opacity: 0; }
}

@keyframes exit-dot-scale {
    0%, 69% { transform: scale(6); opacity: 0; }
    73% { transform: scale(3); opacity: 1; }
    75% { transform: scale(0); opacity: 0; }
    100% { transform: scale(0); opacity: 0; }
}

@keyframes exit-star-blink {
    0%, 74% { transform: scale(0) rotate(0deg); opacity: 0; }
    75% { transform: scale(1.5) rotate(90deg); opacity: 1; }
    77% { transform: scale(0) rotate(135deg); opacity: 0; }
    100% { transform: scale(0); opacity: 0; }
}

@keyframes hover-ufo {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Custom Cursor Constellation */
#cursor-constellation {
    position: fixed;
    top: 0; left: 0;
    width: 150px; height: 150px;
    margin-left: -75px; margin-top: -75px;
    pointer-events: none;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

#cursor-constellation svg {
    width: 100%; height: 100%;
    animation: rotate-constellation 40s linear infinite;
    filter: drop-shadow(0 0 5px rgba(174, 180, 208, 0.5));
}

@keyframes rotate-constellation {
    100% { transform: rotate(360deg); }
}

/* ---------- Navigation ---------- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background: rgba(11, 12, 16, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(147, 18, 16, 0.3);
    text-decoration: none;
}

.logo span {
    color: var(--accent-secondary);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s, text-shadow 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--accent-primary);
    text-shadow: 0 0 8px var(--accent-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    bottom: -5px;
    left: 0;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* ---------- Main Layout ---------- */
main {
    padding-top: 100px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

section {
    padding: 6rem 20px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    font-weight: 800;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(147, 18, 16, 0.2);
}

/* ---------- Hero Section ---------- */
.hero {
    height: calc(100vh - 100px);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-content {
    animation: fadeIn 1.5s ease-out;
}

.glitch {
    font-size: 4rem;
    font-weight: 800;
    position: relative;
    margin-bottom: 1rem;
}

.highlight-red {
    color: var(--accent-secondary);
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.primary-btn {
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    box-shadow: 0 0 20px rgba(147, 18, 16, 0.4);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(255, 75, 75, 0.6);
}

/* ---------- Features Grid ---------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2.5rem 2rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    display: block;
    position: relative;
    height: 100%;
}

.card-default-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.feature-card:hover .icon-wrapper {
    transform: scale(0);
    opacity: 0;
}

/* Hover Animation Container */
.hover-anim-container {
    position: absolute;
    top: 2.5rem;
    left: 0;
    right: 0;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.4s ease;
    pointer-events: none;
}

.feature-card:hover .hover-anim-container {
    opacity: 1;
    transform: scale(1);
}

/* Card 1: Chat Anim */
.chat-anim {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 150px;
}
.chat-bubble {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
}
.user-bubble {
    background: rgba(255, 255, 255, 0.1);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}
.bot-bubble {
    background: rgba(255, 75, 75, 0.2);
    color: #ff4b4b;
    border: 1px solid rgba(255, 75, 75, 0.4);
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}
.feature-card:hover .user-bubble { animation: popInBubble 3s infinite; }
.feature-card:hover .bot-bubble { animation: popInBubbleBot 3s infinite; }
@keyframes popInBubble {
    0%, 5% { opacity: 0; transform: translateY(10px); }
    10%, 85% { opacity: 1; transform: translateY(0); }
    90%, 100% { opacity: 0; transform: translateY(-10px); }
}
@keyframes popInBubbleBot {
    0%, 25% { opacity: 0; transform: translateY(10px); }
    30%, 85% { opacity: 1; transform: translateY(0); }
    90%, 100% { opacity: 0; transform: translateY(-10px); }
}

/* Card 2: TS Anim */
.ts-anim {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 140px;
    background: rgba(0,0,0,0.5);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.ts-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: #fff;
}
.ts-user i { color: var(--accent-secondary); font-size: 0.9rem; }
.ts-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #444;
    margin-left: auto;
    box-shadow: 0 0 0 transparent;
}
.feature-card:hover .ts-user.user1 .ts-indicator { animation: tsTalkStephan 6s infinite; }
.feature-card:hover .ts-user.user2 .ts-indicator { animation: tsTalkGuest 6s infinite; }
@keyframes tsTalkStephan {
    0%, 35% { background: #444; box-shadow: 0 0 0 transparent; }
    38%, 80% { background: #00e676; box-shadow: 0 0 8px #00e676; }
    83%, 100% { background: #444; box-shadow: 0 0 0 transparent; }
}
@keyframes tsTalkGuest {
    0%, 5% { background: #444; box-shadow: 0 0 0 transparent; }
    8%, 25% { background: #00e676; box-shadow: 0 0 8px #00e676; }
    28%, 100% { background: #444; box-shadow: 0 0 0 transparent; }
}

/* Card 3: Key Anim */
.key-anim {
    position: relative;
    width: 80px; height: 70px;
    display: flex; justify-content: center; align-items: center;
}
.giveaway-gift {
    font-size: 2.5rem;
    color: var(--color-green);
    z-index: 2;
    filter: drop-shadow(0 0 10px rgba(0, 230, 118, 0.5));
}
.feature-card:hover .giveaway-gift {
    animation: giftShake 2s infinite;
}
.giveaway-key {
    position: absolute;
    font-size: 1.2rem;
    color: var(--color-yellow);
    z-index: 1;
    opacity: 0;
}
.feature-card:hover .giveaway-key.k1 { animation: keyPopLeft 2s infinite; }
.feature-card:hover .giveaway-key.k2 { animation: keyPopRight 2s infinite 0.2s; }

@keyframes giftShake {
    0%, 25%, 100% { transform: rotate(0deg) scale(1); }
    5%, 15% { transform: rotate(15deg) scale(1.1); }
    10%, 20% { transform: rotate(-15deg) scale(1.1); }
}
@keyframes keyPopLeft {
    0%, 15% { transform: translate(0, 0) rotate(0deg) scale(0.5); opacity: 0; }
    20% { opacity: 1; }
    50% { transform: translate(-35px, -45px) rotate(-60deg) scale(1.2); opacity: 0; }
    100% { opacity: 0; }
}
@keyframes keyPopRight {
    0%, 15% { transform: translate(0, 0) rotate(0deg) scale(0.5); opacity: 0; }
    20% { opacity: 1; }
    50% { transform: translate(35px, -35px) rotate(60deg) scale(1.2); opacity: 0; }
    100% { opacity: 0; }
}

/* Card 4: Rep Anim */
.rep-anim {
    position: relative;
    width: 80px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.rep-bubble {
    position: absolute;
    font-size: 1rem;
    font-weight: 800;
    color: var(--color-yellow);
    text-shadow: 0 0 10px rgba(255, 214, 0, 0.5);
    opacity: 0;
    white-space: nowrap;
}
.feature-card:hover .rep-bubble.b1 { animation: floatRep 2.5s infinite 0s; }
.feature-card:hover .rep-bubble.b2 { animation: floatRep 2.5s infinite 0.6s; left: -10px; }
.feature-card:hover .rep-bubble.b3 { animation: floatRep 2.5s infinite 1.2s; right: -10px; }
.feature-card:hover .rep-bubble.b4 { animation: floatRep 2.5s infinite 1.8s; left: 10px; top: -10px; }
@keyframes floatRep {
    0% { transform: translateY(20px) scale(0.5); opacity: 0; }
    20% { transform: translateY(0) scale(1.2); opacity: 1; }
    80% { transform: translateY(-40px) scale(1); opacity: 0; }
    100% { transform: translateY(-50px) scale(1); opacity: 0; }
}

.icon-wrapper.red { color: var(--color-red); text-shadow: 0 0 15px var(--color-red); }
.icon-wrapper.white { color: var(--color-white); text-shadow: 0 0 15px var(--color-white); }
.icon-wrapper.green { color: var(--color-green); text-shadow: 0 0 15px var(--color-green); }
.icon-wrapper.yellow { color: var(--color-yellow); text-shadow: 0 0 15px var(--color-yellow); }

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    min-height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    flex-grow: 1;
}

.card-link {
    margin-top: 1.5rem;
    color: var(--accent-primary);
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.feature-card:hover .card-link {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Rules Section ---------- */
.glass-panel {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 3rem;
    backdrop-filter: blur(15px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.rules-intro {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.rule-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(147, 18, 16, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.wide-rule {
    grid-column: 1 / -1;
}

.rule-item:hover {
    transform: translateY(-5px) scale(1.02);
    background: rgba(147, 18, 16, 0.1);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 20px rgba(147, 18, 16, 0.3);
}

.rule-icon {
    font-size: 2rem;
    color: var(--accent-secondary);
    text-shadow: 0 0 15px rgba(255, 75, 75, 0.5);
    background: rgba(255, 255, 255, 0.05);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.rule-item:hover .rule-icon {
    transform: rotate(-10deg) scale(1.1);
}

.rule-item span {
    font-size: 1.1rem;
    font-weight: 600;
}

/* ---------- Links Section ---------- */
.links-wrapper {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.link-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.link-btn:hover {
    background: rgba(147, 18, 16, 0.1);
    border-color: var(--accent-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(147, 18, 16, 0.2);
}

/* ---------- Footer ---------- */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-secondary);
    margin-top: 4rem;
}

/* ---------- Animations ---------- */
.section-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .glitch { font-size: 2.5rem; }
    .subtitle { font-size: 1.2rem; }
    .nav-links { display: none; }
    .features-grid { grid-template-columns: 1fr; }
    .glass-panel { padding: 2rem 1.5rem; }
    .links-wrapper { flex-direction: column; align-items: stretch; }
    .link-btn { justify-content: center; }
}
