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

body {
    font-family: 'VT323', monospace;
    background: linear-gradient(135deg, #0f051a 0%, #1a0533 25%, #2d1b5e 50%, #0f051a 100%);
    color: #00ff88;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Animated background particles */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 0.8; }
}

.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #00ff88;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

/* Game Container */
#game-container {
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

/* HUD Styles */
.game-hud {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(15, 5, 26, 0.95);
    border-bottom: 2px solid #00ff88;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 255, 136, 0.3);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    color: #00ff88;
    text-shadow: 0 0 10px #00ff88;
}

.logo i {
    font-size: 18px;
    animation: pulse 2s ease-in-out infinite;
}

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

.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.level-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.level {
    color: #ffff00;
    font-weight: bold;
    text-shadow: 0 0 5px #ffff00;
}

.xp-bar {
    width: 200px;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #00ff88;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00ccaa);
    transition: width 0.5s ease;
    box-shadow: inset 0 0 10px rgba(0, 255, 136, 0.8);
}

.xp-text {
    font-size: 12px;
    color: #00ff88;
}

.stats {
    display: flex;
    gap: 20px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
    color: #ffff00;
    text-shadow: 0 0 5px #ffff00;
}

/* Game World */
.game-world {
    padding-top: 70px;
    min-height: 100vh;
    position: relative;
}

/* Screen Management */
.screen {
    display: none;
    min-height: calc(100vh - 70px);
    padding: 40px 20px;
    position: relative;
}

.screen.active {
    display: block;
    animation: screenFadeIn 0.5s ease-in-out;
}

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

.screen-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* Typography */
h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 0 20px #00ff88;
}

h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00;
}

h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #00ccff;
    text-shadow: 0 0 5px #00ccff;
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: #aaaaff;
    line-height: 1.5;
}

/* Glitch Text Effect */
.glitch-text {
    position: relative;
    animation: glitch 3s ease-in-out infinite;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

/* Buttons */
.start-button, .nav-button, .tool-button {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #00ff88, #00ccaa);
    color: #0f051a;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
    text-shadow: none;
}

.start-button:hover, .nav-button:hover, .tool-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.5);
    background: linear-gradient(135deg, #00ccaa, #00ff88);
}

.nav-button.secondary {
    background: linear-gradient(135deg, #666, #888);
    color: #fff;
}

.nav-button.secondary:hover {
    background: linear-gradient(135deg, #888, #aaa);
}

.start-button-container {
    margin: 40px 0;
}

/* Impact Goals */
.impact-goals {
    margin-top: 60px;
}

.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.goal {
    background: rgba(0, 255, 136, 0.1);
    border: 2px solid #00ff88;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.goal:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
    background: rgba(0, 255, 136, 0.2);
}

.goal i {
    font-size: 2rem;
    color: #ffff00;
}

/* Learning Paths */
.learning-paths {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.path-card {
    background: rgba(0, 255, 136, 0.1);
    border: 2px solid #00ff88;
    border-radius: 15px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.path-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 255, 136, 0.4);
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ccff;
}

.path-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    text-align: center;
}

.path-card h3 {
    text-align: center;
    margin-bottom: 20px;
}

.path-card ul {
    list-style: none;
    margin-bottom: 20px;
}

.path-card li {
    padding: 5px 0;
    color: #aaaaff;
    position: relative;
    padding-left: 20px;
}

.path-card li:before {
    content: "▶";
    position: absolute;
    left: 0;
    color: #00ff88;
}

.path-progress {
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #00ff88;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00ccaa);
    transition: width 0.5s ease;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.dashboard-card {
    background: rgba(0, 255, 136, 0.1);
    border: 2px solid #00ff88;
    border-radius: 15px;
    padding: 30px;
    text-align: left;
}

.metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.metric {
    text-align: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid #00ccff;
}

.metric-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00;
}

.metric-label {
    font-size: 0.9rem;
    color: #aaaaff;
}

/* Achievements */
.achievements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.achievement {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid #666;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.achievement.earned {
    border-color: #ffff00;
    opacity: 1;
    box-shadow: 0 0 15px rgba(255, 255, 0, 0.3);
}

.achievement i {
    font-size: 1.5rem;
    color: #ffff00;
}

/* Success Stories */
.success-stories {
    margin-top: 20px;
}

.story {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid #00ccff;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.story:hover {
    background: rgba(0, 204, 255, 0.1);
    transform: translateX(5px);
}

.story i {
    color: #00ccff;
    font-size: 1.2rem;
    margin-top: 3px;
}

/* AI Tools */
.ai-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.tool-card {
    background: rgba(0, 255, 136, 0.1);
    border: 2px solid #00ff88;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 255, 136, 0.4);
    background: rgba(0, 255, 136, 0.2);
}

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

.tool-card p {
    color: #aaaaff;
    margin-bottom: 20px;
    line-height: 1.5;
}

.tool-button {
    margin-top: 15px;
    font-size: 12px;
    padding: 10px 20px;
}

/* Community */
.community-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.community-card {
    background: rgba(0, 255, 136, 0.1);
    border: 2px solid #00ff88;
    border-radius: 15px;
    padding: 30px;
    text-align: left;
}

.community-card ul {
    list-style: none;
    margin-top: 20px;
}

.community-card li {
    padding: 8px 0;
    color: #aaaaff;
    line-height: 1.4;
}

.community-links {
    margin-top: 50px;
}

.links-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.community-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: rgba(0, 255, 136, 0.1);
    border: 2px solid #00ff88;
    border-radius: 15px;
    text-decoration: none;
    color: #00ff88;
    transition: all 0.3s ease;
    min-width: 120px;
}

.community-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
    background: rgba(0, 255, 136, 0.2);
}

.community-link i {
    font-size: 2rem;
}

/* Navigation */
.navigation-buttons {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-hud {
        padding: 0 10px;
        height: 60px;
    }
    
    .logo span {
        display: none;
    }
    
    .xp-bar {
        width: 120px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
    
    .screen {
        padding: 20px 10px;
    }
    
    .learning-paths {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics {
        grid-template-columns: 1fr;
    }
    
    .achievements {
        grid-template-columns: 1fr;
    }
    
    .ai-tools-grid {
        grid-template-columns: 1fr;
    }
    
    .community-sections {
        grid-template-columns: 1fr;
    }
    
    .links-grid {
        gap: 15px;
    }
    
    .navigation-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    
    .start-button, .nav-button {
        font-size: 12px;
        padding: 12px 20px;
    }
    
    .goals-grid {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 5, 26, 0.8);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00ff88, #00ccaa);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #00ccaa, #00ff88);
}

/* Additional Animations */
@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

.screen-content > * {
    animation: fadeInUp 0.6s ease-out forwards;
}

.screen-content > *:nth-child(2) {
    animation-delay: 0.1s;
}

.screen-content > *:nth-child(3) {
    animation-delay: 0.2s;
}

.screen-content > *:nth-child(4) {
    animation-delay: 0.3s;
}