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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'SF Pro Display', sans-serif;
    background: #0A0A0A;
    min-height: 100vh;
    color: #FFFFFF;
    overflow-x: hidden;
}

/* Animated background gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 107, 53, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 69, 255, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 140, 66, 0.08) 0%, transparent 50%);
    z-index: 0;
    animation: backgroundShift 20s ease infinite;
}

@keyframes backgroundShift {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

.page-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

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

/* Hero Section */
.hero {
    padding: 100px 24px 80px;
    text-align: center;
    animation: fadeInDown 0.8s ease-out;
    position: relative;
}

.logo {
    width: 100%;
    max-width: 280px;
    height: auto;
    filter: 
        brightness(2.5)
        contrast(1.2)
        drop-shadow(0 0 30px rgba(255, 107, 53, 0.8))
        drop-shadow(0 0 60px rgba(255, 140, 66, 0.6))
        drop-shadow(0 8px 24px rgba(255, 107, 53, 0.4));
    margin-bottom: 60px;
    animation: floatLogo 6s ease-in-out infinite;
    opacity: 0.95;
}

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

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: #FFFFFF;
    margin: 0;
    letter-spacing: -2px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero-title-accent {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1.1;
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C42 30%, #8B45FF 70%, #FF6B35 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 30px 0;
    letter-spacing: -3px;
    animation: gradientFlow 8s ease infinite;
    text-shadow: 0 0 40px rgba(255, 107, 53, 0.5);
}

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

.hero-description {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 400;
    line-height: 1.8;
    max-width: 750px;
    margin: 0 auto 45px;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 45px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    color: #FFFFFF;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-badge:hover {
    transform: translateY(-4px);
    background: rgba(255, 107, 53, 0.15);
    border-color: rgba(255, 107, 53, 0.3);
    box-shadow: 0 12px 48px rgba(255, 107, 53, 0.3);
}

/* Projects Section */
.projects-section {
    padding: 60px 24px 80px;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    text-align: center;
    color: #FFFFFF;
    margin-bottom: 60px;
    text-transform: uppercase;
    opacity: 0.9;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
    margin-bottom: 40px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 20px;
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px 28px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #FF6B35, #8B45FF, transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 107, 53, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.project-card:hover::before {
    transform: translateX(100%);
}

.project-icon {
    font-size: 3.5rem;
    margin-bottom: 24px;
    filter: drop-shadow(0 4px 12px rgba(255, 107, 53, 0.4));
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

.project-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.7;
    margin-bottom: 24px;
    font-weight: 400;
}

.project-status {
    display: inline-block;
    padding: 8px 18px;
    background: rgba(255, 107, 53, 0.15);
    color: #FF8C42;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 107, 53, 0.3);
}

/* Game Section */
.game-section {
    padding: 80px 24px 100px;
    position: relative;
}

.game-container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(30px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    margin: 0 auto 40px;
    max-width: 600px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: fadeInUp 0.8s ease-out;
}

#gameCanvas {
    display: block;
    width: 100%;
    max-width: 800px;
    height: 400px;
    margin: 0 auto 24px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.6),
        0 4px 16px rgba(0, 0, 0, 0.3);
    cursor: crosshair;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.game-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    padding: 40px 35px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    max-width: 420px;
    width: 90%;
    animation: scaleIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10;
}

.game-overlay.hidden {
    display: none;
}

.game-overlay h3 {
    color: #FFFFFF;
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.game-overlay p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    margin-bottom: 14px;
    line-height: 1.6;
    font-weight: 400;
}

.score-display {
    font-size: 1.2rem !important;
    font-weight: 500 !important;
    margin: 20px 0 !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.score-display span {
    font-weight: 700;
    background: linear-gradient(135deg, #FF6B35, #FF8C42);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.evolution-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 24px 0;
    padding: 16px;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 12px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 107, 53, 0.2);
}

#gameOverMessage {
    font-weight: 600;
    color: #FF8C42;
    font-size: 1.1rem;
    margin-top: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C42 100%);
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
    margin-top: 20px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(255, 107, 53, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.game-controls {
    max-width: 800px;
    margin: 0 auto;
}

.score-panel {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.score-item {
    text-align: center;
}

.score-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.6;
    margin-bottom: 8px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.score-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #FF6B35, #FF8C42);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-value-small {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #FF6B35, #FF8C42);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.controls-hint {
    text-align: center;
    padding: 14px;
    background: rgba(139, 69, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(139, 69, 255, 0.2);
    animation: gentlePulse 3s ease-in-out infinite;
}

.controls-hint p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.controls-hint.hidden {
    display: none;
}

.game-info {
    max-width: 600px;
    margin: 40px auto 0;
    padding: 30px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.game-info h4 {
    font-size: 1.4rem;
    color: #FFFFFF;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.game-info ul {
    list-style: none;
    font-size: 1rem;
    line-height: 2;
}

.game-info li {
    padding: 10px 0;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    padding-left: 28px;
    position: relative;
}

.game-info li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #FF8C42;
    font-weight: bold;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.02);
    padding: 50px 24px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 60px;
}

.footer p {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
    margin-bottom: 12px;
}

.footer-links {
    margin-top: 20px;
}

.footer-links a {
    color: #FF8C42;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #FF6B35;
    text-decoration: underline;
}

.footer-links span {
    margin: 0 16px;
    color: rgba(255, 255, 255, 0.3);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.95;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 60px 20px 50px;
    }

    .logo {
        max-width: 240px;
        margin-bottom: 50px;
        filter: 
            brightness(2.5)
            contrast(1.2)
            drop-shadow(0 0 25px rgba(255, 107, 53, 0.8))
            drop-shadow(0 0 50px rgba(255, 140, 66, 0.6));
    }
    
    .hero-title {
        font-size: 2.8rem;
    }

    .hero-title-accent {
        font-size: 3.2rem;
        margin-bottom: 25px;
    }

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

    .hero-badges {
        gap: 12px;
    }

    .hero-badge {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
    
    .section-title {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    #gameCanvas {
        height: 300px;
        max-width: 700px;
    }

    .game-container {
        padding: 28px 20px;
    }

    .game-overlay {
        padding: 30px 25px;
    }

    .game-overlay h3 {
        font-size: 1.6rem;
    }
    
    .game-info {
        padding: 25px 20px;
    }

    .footer {
        padding: 40px 20px;
    }
}

@media (max-width: 480px) {
    .logo {
        max-width: 200px;
        filter: 
            brightness(2.5)
            contrast(1.2)
            drop-shadow(0 0 20px rgba(255, 107, 53, 0.8))
            drop-shadow(0 0 40px rgba(255, 140, 66, 0.6));
    }

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

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

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

    .projects-grid {
        gap: 16px;
    }

    .project-card {
        padding: 32px 24px;
    }

    .project-icon {
        font-size: 3rem;
    }
    
    #gameCanvas {
        height: 250px;
        max-width: 100%;
    }

    .score-value {
        font-size: 1.5rem;
    }

    .game-info ul {
        font-size: 0.95rem;
    }

    .hero-badges {
        flex-direction: column;
        align-items: center;
    }

    .hero-badge {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}
