/* Color Splash - Main Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Fredoka', cursive;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #FF6B35;
    margin: 0;
}

.nav-logo .tagline {
    font-size: 0.9rem;
    color: #666;
    font-weight: 400;
}

.nav-menu {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-btn {
    background: linear-gradient(45deg, #FF6B35, #F7931E);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Fredoka', cursive;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
    padding-top: 100px;
}

.screen.active {
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Home Screen */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80vh;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    line-height: 1.6;
}

/* Age Selector */
.age-selector {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.age-selector h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.age-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.age-btn {
    background: linear-gradient(45deg, #4ECDC4, #44A08D);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Fredoka', cursive;
}

.age-btn:hover, .age-btn.selected {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.4);
    background: linear-gradient(45deg, #44A08D, #4ECDC4);
}

/* Game Modes */
.game-modes {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.game-modes h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.mode-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.mode-card:hover {
    transform: translateY(-5px);
    border-color: #FF6B35;
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
}

.mode-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.mode-card h4 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.mode-card p {
    color: #666;
    line-height: 1.5;
}

/* Co-op Section */
.coop-section {
    text-align: center;
    border-top: 2px solid #eee;
    padding-top: 2rem;
}

.coop-section h3 {
    color: #333;
    margin-bottom: 1rem;
}

.btn-coop {
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    color: white;
    border: none;
    padding: 1.2rem 2.5rem;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Fredoka', cursive;
    margin-bottom: 1rem;
}

.btn-coop:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
}

/* Hero Visual */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.color-preview {
    position: relative;
    width: 300px;
    height: 300px;
}

.floating-color {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.floating-color:nth-child(1) { top: 20px; left: 120px; }
.floating-color:nth-child(2) { top: 80px; right: 50px; }
.floating-color:nth-child(3) { bottom: 80px; right: 80px; }
.floating-color:nth-child(4) { bottom: 20px; left: 100px; }
.floating-color:nth-child(5) { top: 120px; left: 50px; }
.floating-color:nth-child(6) { top: 180px; right: 120px; }

/* Features Section */
.features-section {
    background: rgba(255, 255, 255, 0.95);
    margin: 4rem 0;
    padding: 4rem 0;
}

.features-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 3rem;
    font-weight: 600;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* Instructions and Tabs */
.instructions-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: white;
    color: #666;
    border: 2px solid #eee;
    padding: 1rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Fredoka', cursive;
}

.tab-btn.active, .tab-btn:hover {
    background: linear-gradient(45deg, #FF6B35, #F7931E);
    color: white;
    border-color: #FF6B35;
    transform: translateY(-2px);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 2rem;
    text-align: center;
}

/* Instruction Grid */
.instruction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.instruction-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.step-number {
    position: absolute;
    top: -15px;
    left: 20px;
    background: linear-gradient(45deg, #FF6B35, #F7931E);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.instruction-card h3 {
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
    margin-top: 10px;
}

.instruction-card p {
    color: #666;
    line-height: 1.6;
}

/* Color Mixing Examples */
.mixing-examples {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.mix-example {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.color-demo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #333;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.mix-example span {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.mix-example p {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-3px);
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tool-card h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.tool-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Co-op Info */
.coop-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.coop-feature {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.coop-feature h3 {
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

.coop-feature p {
    color: #666;
    line-height: 1.6;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
}

.gallery-placeholder {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 3rem;
    text-align: center;
    border: 3px dashed #ccc;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.gallery-placeholder p {
    color: #666;
    line-height: 1.6;
}

/* Utility Classes */
.btn {
    background: linear-gradient(45deg, #FF6B35, #F7931E);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Fredoka', cursive;
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Game Layout */
.game-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    margin-top: 80px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.game-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.game-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.game-layout {
    display: flex;
    min-height: calc(100vh - 160px);
    gap: 20px;
    padding: 20px;
}

.tools-panel {
    order: 1;
    flex-shrink: 0;
}

.canvas-container {
    order: 2;
    flex: 1;
}

.education-panel {
    order: 3;
    flex-shrink: 0;
    width: 280px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 20px;
    color: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-height: 80vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.education-panel::-webkit-scrollbar {
    width: 6px;
}

.education-panel::-webkit-scrollbar-track {
    background: transparent;
}

.education-panel::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.education-section {
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.education-section h3 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.learning-content {
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    padding: 15px;
    border-radius: 10px;
    font-size: 0.95em;
    line-height: 1.5;
}

/* Player info and turn system */
.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #2c3e50;
    font-weight: 600;
}

.turn-timer {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Achievements */
.achievements {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.achievement {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.achievement.locked {
    opacity: 0.5;
}

.achievement.unlocked {
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.achievement-icon {
    font-size: 1.5em;
    width: 30px;
    text-align: center;
}

.achievement-info {
    flex: 1;
}

.achievement-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.achievement-desc {
    font-size: 0.85em;
    opacity: 0.9;
}

/* Light Explorer */
.light-explorer {
    text-align: center;
    padding: 20px;
}

.prism-container {
    position: relative;
    height: 100px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.light-beam {
    width: 40px;
    height: 4px;
    background: linear-gradient(90deg, transparent, white, transparent);
    position: absolute;
    left: 20%;
    transition: all 0.5s ease;
}

.light-beam.active {
    width: 60%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.prism {
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 35px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.prism:hover {
    transform: scale(1.1);
    border-bottom-color: white;
}

.rainbow {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    width: 100px;
    height: 20px;
    display: none;
    border-radius: 10px;
    overflow: hidden;
}

.rainbow-band {
    height: 100%;
    flex: 1;
}

.light-explanation {
    font-size: 0.9em;
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    padding: 10px;
    border-radius: 8px;
}

/* Challenge cards */
.challenges-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.challenge-card {
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.challenge-card:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.challenge-card h4 {
    margin: 0 0 8px 0;
    font-weight: 600;
}

.challenge-card p {
    margin: 0;
    font-size: 0.9em;
    opacity: 0.8;
}

/* Achievement notification */
.achievement-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.5s ease;
}

.achievement-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-content {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #2c3e50;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 250px;
}

.notification-icon {
    font-size: 2em;
}

.notification-text {
    flex: 1;
}

.notification-title {
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.notification-desc {
    font-size: 0.9em;
    opacity: 0.8;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-in {
    animation: slideInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .mode-grid {
        grid-template-columns: 1fr;
    }
    
    .age-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .age-btn {
        width: 100%;
        max-width: 250px;
    }
    
    .screen {
        padding-top: 120px;
    }
    
    .container {
        padding: 1rem;
    }
    
    .mixing-examples {
        gap: 1rem;
    }
    
    .mix-example {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
    
    .instructions-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .tab-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .game-layout {
        flex-direction: column;
        padding: 10px;
    }
    
    .tools-panel {
        width: 100%;
        order: 2;
    }
    
    .canvas-container {
        width: 100%;
        order: 1;
    }
    
    .education-panel {
        width: 100%;
        max-width: none;
        order: 3;
    }
}
