/* Base styles */
body {
    font-family: 'Comic Sans MS', 'Marker Felt', 'Arial Rounded MT', sans-serif;
    background-color: #6e63c4; /* Updated pastel purple */
    margin: 0;
    padding: 20px;
    color: #333;
    line-height: 1.6;
}

/* Parallax background */
.parallax {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* behind all content */
    pointer-events: none; /* click-through */
    overflow: hidden;
}

.parallax .layer {
    position: absolute;
    inset: 0;
    background-position: 0 0; /* will be driven by JS */
    background-size: 50vmin auto; /* uniform scale: width scales, height preserves aspect ratio */
    background-repeat: repeat; /* tile the image */
    will-change: background-position;
    background-color: transparent;
}

/* Layer image bindings (namespaced to parallax) */
.parallax .layer.red { background-image: url('red.png'); }
.parallax .layer.yellow { background-image: url('yellow.png'); }
.parallax .layer.green { background-image: url('green.png'); }
.parallax .layer.blue { background-image: url('blue.png'); }

/* Header image */
header {
    text-align: center;
    margin-bottom: 16px;
}

.header-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 0 80px #6e63c4; /* add purple glow behind banner */
}

/* Content box */
.content-box {
    background-color: white;
    border-radius: 20px; /* Rounded on all corners including top */
    padding: 25px;
    max-width: 900px;
    margin: 0 auto; /* align with button bar */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 0 80px #6e63c4; /* add big purple glow */
}

/* Navigation buttons */
.button-nav {
    display: flex;
    justify-content: flex-start; /* left align */
    gap: 10px;
    flex-wrap: wrap;
    background: transparent; /* no white box behind buttons */
    max-width: 900px; /* align with content width */
    margin: 0 auto; /* center the bar */
    padding: 10px 12px 0 12px; /* remove bottom padding so it touches the box */
    border-radius: 0; /* no rounding on the bar itself */
    box-shadow: none; /* remove bar shadow */
    position: relative; /* for shadow effects */
    filter: drop-shadow(0 -2px 80px #6e63c4); /* upward-only glow behind buttons */
}

.nav-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 18px 18px 0 0; /* unrounded bottom */
    font-family: 'Comic Sans MS', sans-serif;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    color: transparent; /* hide text */
    text-shadow: none; /* remove text shadow */
}

.nav-btn:hover {
    transform: none; /* no scaling or movement */
    box-shadow: none; /* remove bottom shadow */
}

/* Button colors */
.red {
    background-color: #ff6b6b;
    color: #b01e40;
}
.yellow {
    background-color: #ffd93d;
    color: #d17217;
}
.green {
    background-color: #6bcf7f;
    color: #0d8080;
}
.blue {
    background-color: #4dabf7;
    color: #4363d1;
}

/* Hover background colors as requested */
.red:hover { background-color: #ff7da5; }
.yellow:hover { background-color: #ffe75c; }
.green:hover { background-color: #7fe08c; }
.blue:hover { background-color: #6ec4f5; }

/* Sections */
.sections {
    padding: 20px;
    text-align: center; /* center section text */
}

section {
    display: none;
}

section.active {
    display: block;
}

h2 {
    color: #7e57c2;
    margin-top: 0;
    font-size: 28px;
}

/* Keep lists readable when text is centered */
.sections ul {
    display: inline-block;
    text-align: left;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive design */
@media (max-width: 600px) {
    .button-nav {
        flex-direction: row;
        align-items: center;
        gap: 5px; /* a touch more space */
        flex-wrap: nowrap; /* keep in one line */
        overflow-x: auto; /* allow scroll if still too wide */
        -webkit-overflow-scrolling: touch;
        white-space: nowrap; /* prevent wrapping */
        padding: 8px 10px 0 10px; /* slightly roomier */
    }
    
    .nav-btn {
        width: 80px; /* updated exact width per request */
        margin-bottom: 0;
        padding: 8px 0; /* slightly larger touch area */
        font-size: 12px; /* text is hidden, keep small */
        text-align: center;
        flex: 0 0 auto; /* don't grow */
        min-width: 0; /* allow shrinking */
        overflow: hidden; /* prevent overflow */
    }
    
    .content-box {
        padding: 15px;
    }
}
