* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00ff88;
    --secondary: #ff00ff;
    --accent: #00d4ff;
    --dark: #0a0e27;
    --darker: #050814;
    --text: #ffffff;
    --text-dim: #a0a0a0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--darker);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Animated Background Stars */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: 
        radial-gradient(2px 2px at 20px 30px, white, transparent),
        radial-gradient(2px 2px at 60px 70px, white, transparent),
        radial-gradient(1px 1px at 50px 50px, white, transparent),
        radial-gradient(1px 1px at 130px 80px, white, transparent),
        radial-gradient(2px 2px at 90px 10px, white, transparent);
    background-size: 200px 200px;
    animation: starsMove 20s linear infinite;
    opacity: 0.3;
}

@keyframes starsMove {
    from { transform: translateY(0); }
    to { transform: translateY(-200px); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(255, 0, 255, 0.1));
    border-radius: 20px;
    margin-bottom: 30px;
    border: 2px solid rgba(0, 255, 136, 0.3);
}

.glitch {
    font-size: 4rem;
    font-weight: bold;
    text-transform: uppercase;
    position: relative;
    color: var(--primary);
    animation: glitch 2s infinite;
}

@keyframes glitch {
    0%, 90%, 100% { transform: translate(0); }
    92% { transform: translate(-2px, 2px); }
    94% { transform: translate(2px, -2px); }
    96% { transform: translate(-2px, -2px); }
    98% { transform: translate(2px, 2px); }
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-top: 10px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 30px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 10px;
    border: 2px solid var(--accent);
    min-width: 120px;
}

.stat-label {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.stat-value {
    color: var(--accent);
    font-size: 2rem;
    font-weight: bold;
}

/* Navigation */
.game-menu {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.menu-btn {
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(0, 255, 136, 0.3);
    color: var(--text);
    font-size: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.menu-btn:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.3);
}

.menu-btn.active {
    background: var(--primary);
    color: var(--dark);
    border-color: var(--primary);
}

/* Sections */
.section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-align: center;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.game-card {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05), rgba(255, 0, 255, 0.05));
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.3);
}

.game-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.5));
}

.game-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.game-card p {
    color: var(--text-dim);
    margin-bottom: 20px;
}

.play-btn {
    padding: 12px 30px;
    background: var(--primary);
    color: var(--dark);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-btn:hover {
    background: var(--accent);
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.5);
}

/* About Section */
.about-content {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.profile-card {
    max-width: 600px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
}

.avatar {
    font-size: 6rem;
    margin-bottom: 20px;
}

.profile-card h3 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.profile-card p {
    color: var(--text-dim);
    line-height: 1.8;
    margin-bottom: 30px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-btn {
    padding: 10px 25px;
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid var(--accent);
    color: var(--accent);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: var(--accent);
    color: var(--dark);
    transform: translateY(-2px);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 0, 255, 0.3);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary);
    box-shadow: 0 10px 30px rgba(255, 0, 255, 0.3);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.skill-card h3 {
    color: var(--secondary);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.skill-tags span {
    padding: 8px 15px;
    background: rgba(255, 0, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 0, 255, 0.4);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 15px;
    padding: 30px;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.project-card h3 {
    color: var(--accent);
    font-size: 1.3rem;
}

.badge {
    padding: 5px 12px;
    background: rgba(0, 255, 136, 0.2);
    border-radius: 15px;
    font-size: 0.8rem;
}

.project-card p {
    color: var(--text-dim);
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tech span {
    padding: 6px 12px;
    background: rgba(0, 212, 255, 0.2);
    border-radius: 15px;
    font-size: 0.85rem;
    border: 1px solid rgba(0, 212, 255, 0.4);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--dark);
    border: 3px solid var(--primary);
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 0, 0, 0.2);
    transform: rotate(90deg);
}

#gameTitle {
    text-align: center;
    color: var(--primary);
    margin-bottom: 20px;
}

#gameContainer {
    background: var(--darker);
    border: 2px solid var(--accent);
    border-radius: 10px;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.game-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.control-btn {
    padding: 12px 30px;
    background: var(--primary);
    color: var(--dark);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: var(--accent);
    transform: scale(1.05);
}

.score-display {
    font-size: 1.5rem;
    color: var(--accent);
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .glitch {
        font-size: 2.5rem;
    }
    
    .stats {
        gap: 20px;
    }
    
    .stat {
        min-width: 100px;
        padding: 10px 20px;
    }
    
    .section h2 {
        font-size: 2rem;
    }
    
    .modal-content {
        padding: 20px;
    }
}
