/* Basic Reset & Body Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Comic Neue', cursive;
    background: linear-gradient(135deg, #f7d7f7, #d8b4fe);
    color: #4a148c;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.main-header {
    background-color: rgba(255, 255, 255, 0.6);
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 5px dashed #c084fc;
}

.main-header h1 {
    color: #9333ea;
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.unicorn-castle-decoration {
    font-size: 2rem;
    margin-top: 5px;
}

/* Home Screen Grid */
.home-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
    flex-grow: 1;
}

.grid-item {
    background-color: #fff;
    border-radius: 15px;
    padding: 25px 20px;
    text-align: center;
    text-decoration: none;
    color: #6b21a8;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 3px solid transparent;
}

.grid-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(147, 51, 234, 0.3);
    border-color: #e9d5ff;
}

.grid-item h2 {
    font-family: 'Fredoka One', cursive;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.grid-item p {
    font-size: 0.9rem;
    color: #7e22ce;
    margin-bottom: 15px;
}

.item-icon {
    font-size: 2.5rem;
    margin-top: auto;
}

/* Specific Item Colors (Alternating) */
.item-reading { background-color: #fce7f3; border-color: #f9a8d4; }
.item-math { background-color: #f3e8ff; border-color: #d8b4fe; }
.item-logic { background-color: #fce7f3; border-color: #f9a8d4; }
.item-coloring { background-color: #f3e8ff; border-color: #d8b4fe; }
.item-choices { background-color: #fce7f3; border-color: #f9a8d4; }
.item-science { background-color: #f3e8ff; border-color: #d8b4fe; }

.item-reading:hover { background-color: #fbcfe8; }
.item-math:hover { background-color: #e9d5ff; }
.item-logic:hover { background-color: #fbcfe8; }
.item-coloring:hover { background-color: #e9d5ff; }
.item-choices:hover { background-color: #fbcfe8; }
.item-science:hover { background-color: #e9d5ff; }

/* Section Page Styles */
.section-content {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 30px;
    margin: 20px;
    border-radius: 15px;
    text-align: center;
    flex-grow: 1;
}

.section-content h1 {
    color: #9333ea;
    font-family: 'Fredoka One', cursive;
    margin-bottom: 20px;
}

.back-link {
    display: inline-block;
    margin-top: 30px;
    padding: 10px 20px;
    background-color: #c084fc;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.back-link:hover {
    background-color: #a855f7;
}

/* Footer */
footer {
    text-align: center;
    padding: 15px;
    margin-top: 20px;
    color: #6b21a8;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .home-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 15px;
    }
    .main-header h1 {
        font-size: 2rem;
    }
    .grid-item h2 {
        font-size: 1.3rem;
    }
    .item-icon {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .home-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
    }
    .main-header h1 {
        font-size: 1.6rem;
    }
    .grid-item h2 {
        font-size: 1.2rem;
    }
    .grid-item p {
        font-size: 0.8rem;
    }
    .item-icon {
        font-size: 1.8rem;
    }
    .section-content {
        margin: 10px;
        padding: 20px;
    }
}
