/* Child-friendly, colorful design */
body {
    margin: 0;
    padding: 20px;
    font-family: 'Comic Sans MS', 'Segoe UI Emoji', system-ui, sans-serif;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
    color: #2d3748;
    min-height: 100vh;
}

/* Game header with back button */
.game-header {
    width: 100%;
    max-width: 1100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto 1rem;
    gap: 20px;
}

.back-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Fun header styling - angepasster Abstand */
h1 {
    margin: 0;
    font-size: 2.5rem;
    color: #fff;
    text-shadow: 
        2px 2px 0px #4299e1,
        4px 4px 0px #3182ce,
        6px 6px 10px rgba(0,0,0,0.3);
    font-weight: bold;
    letter-spacing: 1px;
    animation: bounce 2s ease-in-out infinite;
    line-height: 1.2;
    flex: 1;
    text-align: center;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.game-description {
    margin-bottom: 2rem;
}

.game-description p {
    margin: 0;
    font-size: 1.2rem;
    color: #1a202c;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.95);
    padding: 15px 30px;
    border-radius: 25px;
    display: inline-block;
    backdrop-filter: blur(10px);
    line-height: 1.4;
    border: 3px solid #4299e1;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
}

/* Canvas container - enlarged for full game content */
#p5-container {
    display: flex;
    justify-content: center;
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 30px;
    margin: 20px auto;
    max-width: 1100px;
    min-height: 660px;
    box-shadow: 
        0 10px 30px rgba(0,0,0,0.2),
        0 0 0 5px rgba(255,255,255,0.8),
        0 0 0 10px #4299e1;
    border: 3px solid #fff;
    overflow: visible;
}

#p5-container canvas {
    cursor: default;
    touch-action: none; /* Prevent touch scrolling/zooming */
    -webkit-touch-callout: none; /* Prevent callout on long press */
    -webkit-user-select: none; /* Prevent text selection */
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Add some floating elements for decoration */
body::before {
    content: '🌟';
    position: fixed;
    top: 20%;
    left: 5%;
    font-size: 2rem;
    animation: float 3s ease-in-out infinite;
    z-index: -1;
}

body::after {
    content: '🎈';
    position: fixed;
    top: 30%;
    right: 5%;
    font-size: 2rem;
    animation: float 4s ease-in-out infinite reverse;
    z-index: -1;
}

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

/* Responsive design für kleinere Bildschirme */
@media (max-width: 1100px) {
    .game-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .back-btn {
        align-self: flex-start;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .game-description p {
        font-size: 1rem;
        padding: 10px 20px;
    }
    
    #p5-container {
        margin: 10px;
        padding: 15px;
        transform: scale(0.9);
        transform-origin: center top;
    }
    
    body {
        padding: 10px;
    }
}

@media (max-width: 600px) {
    .game-header {
        gap: 8px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .game-description p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    #p5-container {
        transform: scale(0.8);
        padding: 8px;
        margin: 5px;
    }
    
    body::before,
    body::after {
        display: none;
    }
    
    /* Improve touch targets on small screens */
    .back-btn {
        padding: 12px 20px;
        font-size: 1.1rem;
        min-height: 44px; /* Apple's recommended minimum touch target */
    }
    
    /* Prevent zoom on double tap */
    * {
        touch-action: manipulation;
    }
}
  