/* ===========================
   CSS Variables & Reset
   =========================== */
:root {
    --color-error: #ff4444;
    --color-type: #9945ff;
    --color-reference: #3b82f6;
    --color-warning: #fbbf24;
    --color-hint: #10b981;
    --color-dark: #1a1a2e;
    --color-darker: #16213e;
    --color-light: #f8f9fa;
    --color-accent: #ff6b6b;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.2);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--color-dark);
    background-color: var(--color-light);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===========================
   Language Toggle
   =========================== */
.lang-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 5px;
    background: white;
    padding: 5px;
    border-radius: 25px;
    box-shadow: var(--shadow-md);
}

.lang-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--color-dark);
    font-weight: 600;
    font-size: 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

.lang-btn.active {
    background: var(--gradient-primary);
    color: white;
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    background: var(--gradient-hero);
    color: white;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 68, 68, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    background-size: 200% auto;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #fbbf24;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: white;
    color: var(--color-dark);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

/* Monster Showcase */
.hero-visual {
    position: relative;
    height: 400px;
}

.monster-showcase {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.monster-item {
    position: absolute;
    width: 100px;
    height: 100px;
    animation: float 3s ease-in-out infinite;
    opacity: 0;
    animation: monsterSpawn 0.5s ease-out forwards;
}

.monster-item[data-delay="0"] { animation-delay: 0s; }
.monster-item[data-delay="0.2"] { animation-delay: 0.2s; }
.monster-item[data-delay="0.4"] { animation-delay: 0.4s; }
.monster-item[data-delay="0.6"] { animation-delay: 0.6s; }
.monster-item[data-delay="0.8"] { animation-delay: 0.8s; }

.monster-error {
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
}

.monster-type {
    top: 35%;
    left: 15%;
}

.monster-reference {
    top: 35%;
    right: 15%;
}

.monster-warning {
    bottom: 15%;
    left: 25%;
}

.monster-hint {
    bottom: 15%;
    right: 25%;
}

.monster-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
    animation: breath 2s ease-in-out infinite;
}

@keyframes monsterSpawn {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    60% {
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(360deg);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes breath {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

/* ===========================
   Features Section
   =========================== */
.features {
    padding: 80px 0;
    background: white;
}

.section-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    color: var(--color-dark);
}

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

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-accent);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--color-dark);
}

.feature-card p {
    color: #666;
    line-height: 1.8;
}

/* ===========================
   Monsters Section
   =========================== */
.monsters {
    padding: 80px 0;
    background: linear-gradient(180deg, white 0%, #f8f9fa 100%);
}

.monsters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.monster-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.monster-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.monster-card:hover::before {
    transform: scaleX(1);
}

.monster-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.monster-visual {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    transition: var(--transition);
}

.monster-card:hover .monster-visual {
    transform: scale(1.1) rotate(5deg);
}

.monster-svg-large {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.2));
}

.error-monster .monster-svg-large circle:first-child {
    animation: pulse 2s ease-in-out infinite;
}

.type-monster .monster-svg-large {
    animation: wiggle 3s ease-in-out infinite;
}

.reference-monster .monster-svg-large {
    animation: float 3s ease-in-out infinite;
}

.warning-monster .monster-svg-large {
    animation: bounce 2s ease-in-out infinite;
}

.hint-monster .monster-svg-large {
    animation: breath 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

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

.monster-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--color-dark);
}

.monster-color {
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.monster-card p:last-child {
    color: #666;
    line-height: 1.6;
}

/* ===========================
   How It Works Section
   =========================== */
.how-it-works {
    padding: 80px 0;
    background: white;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.step {
    text-align: center;
    position: relative;
}

.step::after {
    content: '→';
    position: absolute;
    top: 30px;
    right: -20px;
    font-size: 2rem;
    color: var(--color-accent);
    opacity: 0.3;
}

.step:last-child::after {
    display: none;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
    box-shadow: var(--shadow-md);
}

.step h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--color-dark);
}

.step p {
    color: #666;
    line-height: 1.6;
}

/* ===========================
   CTA Section
   =========================== */
.cta {
    padding: 80px 0;
    background: var(--gradient-hero);
    color: white;
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-family: 'Press Start 2P', cursive;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-buttons {
    margin-bottom: 20px;
}

.cta-note {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ===========================
   Footer
   =========================== */
.footer {
    background: var(--color-darker);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--color-accent);
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-section a:hover {
    opacity: 1;
    color: var(--color-accent);
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 968px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-visual {
        height: 300px;
    }

    .section-title {
        font-size: 2rem;
    }

    .step::after {
        display: none;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 80px 0 60px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .features-grid,
    .monsters-grid {
        grid-template-columns: 1fr;
    }

    .monster-showcase {
        transform: scale(0.8);
    }

    .lang-toggle {
        top: 10px;
        right: 10px;
    }

    .cta h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .container {
        padding: 0 15px;
    }

    .feature-card,
    .monster-card {
        padding: 25px 20px;
    }
}

/* ===========================
   Animations & Utilities
   =========================== */
.fade-in {
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .lang-toggle,
    .hero-cta,
    .cta,
    .footer {
        display: none;
    }
}
