/* Core Design System for EmoJin Website */

:root {
    /* Color Palette */
    --bg-dark: #080512;
    --bg-cosmic: #0c0817;
    --card-bg: rgba(20, 14, 36, 0.7);
    --card-border: rgba(33, 26, 55, 0.8);
    --text-light: #faf8fe;
    --text-muted: #a59fb6;
    
    /* Branding Colors */
    --primary: #d0bcff;
    --primary-dark: #381e72;
    --brand-purple: #6750A4;
    
    /* Neon Accents */
    --neon-pink: #ff007f;
    --neon-purple: #7b2cbf;
    --neon-blue: #00f0ff;
    --neon-gold: #ffd700;
    --neon-green: #00e676;
    
    /* Gradients */
    --gradient-glow: linear-gradient(135deg, var(--neon-pink), var(--neon-purple), var(--neon-blue), var(--neon-gold));
    --gradient-text: linear-gradient(90deg, #ff1744, #ff8f00, #2979ff);
    --gradient-hero: radial-gradient(circle at 50% 50%, rgba(123, 44, 191, 0.15) 0%, transparent 60%);
    
    /* Typography */
    --font-primary: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Glowing Effects */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--gradient-hero);
    pointer-events: none;
    z-index: -2;
}

/* Floating Emojis Background container */
#floating_background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.floating-bubble {
    position: absolute;
    bottom: -100px;
    font-size: 2rem;
    opacity: 0.15;
    animation: floatUp 15s linear infinite;
    user-select: none;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.15;
    }
    90% {
        opacity: 0.15;
    }
    100% {
        transform: translateY(-120vh) rotate(360deg);
        opacity: 0;
    }
}

/* Layout Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 2px;
    color: var(--text-light);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.nav-brand img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1.5px solid var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--neon-blue);
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    text-align: center;
    position: relative;
}

.hero-glow-card {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: 32px;
    background-image: linear-gradient(var(--bg-cosmic), var(--bg-cosmic)), var(--gradient-glow);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    padding: 4rem 2rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 40px rgba(123, 44, 191, 0.3);
    animation: pulseGlow 4s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 30px rgba(123, 44, 191, 0.2);
    }
    100% {
        box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 60px rgba(123, 44, 191, 0.5), 0 0 20px rgba(0, 240, 255, 0.2);
    }
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 900;
    letter-spacing: 6px;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(255, 23, 68, 0.3));
}

.hero p.tagline {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 2.5rem auto;
    font-weight: 300;
}

.download-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--text-light);
    color: var(--bg-dark);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 800;
    text-decoration: none;
    font-size: 1.1rem;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.25);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.download-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--primary);
    background: var(--primary);
}

.banner-showcase {
    margin-top: 4rem;
    perspective: 1000px;
}

.banner-showcase img {
    max-width: 100%;
    width: 750px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.8), 0 0 30px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: rotateX(8deg) rotateY(-2deg);
    transition: all 0.5s ease;
}

.banner-showcase img:hover {
    transform: rotateX(0deg) rotateY(0deg) scale(1.02);
    box-shadow: 0 20px 50px rgba(0,0,0,0.9), 0 0 40px rgba(0, 240, 255, 0.2);
}

/* Feature Grid */
.features {
    padding: 6rem 0;
    background: rgba(12, 8, 23, 0.5);
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--neon-pink);
    margin: 0.75rem auto 0 auto;
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(208, 188, 255, 0.4);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 25px rgba(208, 188, 255, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.feature-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary);
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Game Modes Showcase */
.modes {
    padding: 6rem 0;
}

.modes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.mode-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1.25rem 2rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.mode-row:hover {
    border-color: var(--border-hover-color, var(--neon-pink));
    background: rgba(255, 255, 255, 0.02);
    transform: translateX(10px);
}

.mode-icon {
    min-width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    background: var(--mode-gradient);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.mode-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.mode-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Interactive Sandbox Demo Section */
.sandbox {
    padding: 6rem 0;
    background: rgba(8, 5, 18, 0.7);
    border-top: 1px solid var(--card-border);
}

.sandbox-container {
    max-width: 650px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 28px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 15px 45px rgba(0,0,0,0.6);
    position: relative;
    overflow: hidden;
}

.sandbox-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.sandbox-header {
    margin-bottom: 2rem;
}

.sandbox-header span {
    font-size: 0.85rem;
    background: var(--primary-dark);
    color: var(--primary);
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-weight: 800;
    letter-spacing: 1px;
}

.sandbox-puzzle {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 3.5rem;
    margin: 2rem 0;
    animation: breathing 3s ease-in-out infinite alternate;
}

@keyframes breathing {
    0% { transform: scale(0.97); }
    100% { transform: scale(1.03); }
}

.sandbox-input-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sandbox-input-row {
    display: flex;
    gap: 0.75rem;
}

.sandbox-input-row input {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1rem;
    font-family: var(--font-primary);
    font-size: 1.1rem;
    color: var(--text-light);
    outline: none;
    transition: all 0.3s ease;
}

.sandbox-input-row input:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.sandbox-input-row button {
    background: var(--gradient-glow);
    border: none;
    border-radius: 16px;
    padding: 0 1.5rem;
    color: #080512;
    font-weight: 800;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

.sandbox-input-row button:hover {
    transform: scale(1.03);
    box-shadow: 0 0 20px rgba(255, 0, 127, 0.4);
}

.sandbox-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    cursor: pointer;
    display: inline-block;
    margin-top: 0.5rem;
    transition: color 0.2s ease;
}

.sandbox-hint:hover {
    color: var(--neon-gold);
}

.sandbox-feedback {
    min-height: 40px;
    margin-top: 1rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.feedback-success {
    color: var(--neon-green);
    text-shadow: 0 0 10px rgba(0, 230, 118, 0.3);
}

.feedback-close {
    color: var(--neon-gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.feedback-error {
    color: #ff1744;
}

.sandbox-score {
    margin-top: 2rem;
    border-top: 1px solid var(--card-border);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.sandbox-score strong {
    color: var(--neon-gold);
}

/* Footer styling */
footer {
    border-top: 1px solid var(--card-border);
    padding: 4rem 0;
    text-align: center;
    background: #06030e;
}

.footer-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 500px;
    margin: 0 auto 2rem auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--neon-blue);
}

.footer-copy {
    color: rgba(165, 159, 182, 0.4);
    font-size: 0.8rem;
}

/* Confetti overlay for sandbox success */
#confetti_canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .hero h1 {
        font-size: 3.5rem;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 1.25rem;
    }
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    .hero {
        padding: 4rem 0;
    }
    .hero-glow-card {
        padding: 3rem 1.25rem;
    }
    .hero h1 {
        font-size: 2.5rem;
        letter-spacing: 3px;
    }
    .banner-showcase img {
        transform: none;
    }
    .banner-showcase img:hover {
        transform: scale(1.01);
    }
    .mode-row {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem;
    }
    .sandbox-input-row {
        flex-direction: column;
    }
    .sandbox-input-row button {
        padding: 1rem;
    }
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}
