@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

:root {
    --primary: #8d6e63;
    --secondary: #d6c6a2;
    --success: #6d8764;
    --bg: #f4eee0;
    --text: #4e342e;

    --earth-tan: #eaddcf;
    --earth-sand: #d6c6a2;
    --earth-clay: #d7ccc8;
    --earth-cream: #f5f5f5;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    line-height: 1.6;
}

header {
    background: var(--secondary);
    color: var(--text);
    padding: 3.5rem 2rem;
    text-align: center;
    border-bottom: 8px solid #bdae8a;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

header h1 {
    font-size: 3.5rem;
    margin: 0;
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow: 2px 2px 0px rgba(255,255,255,0.3);
}

header p {
    font-size: 1.3rem;
    opacity: 0.8;
    font-weight: 700;
}

nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: white;
    width: fit-content;
    margin: -25px auto 40px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(78,52,46,0.1);
    border: 3px solid var(--secondary);
}

nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    padding: 12px 24px;
    border-radius: 10px;
    transition: all 0.2s;
    text-transform: uppercase;
    font-size: 0.9rem;
}

nav a:hover {
    background: var(--secondary);
}

.container {
    max-width: 1100px;
    margin: 0 auto 5rem;
    padding: 0 1.5rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px,1fr));
    gap: 2.5rem;
}

.card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(78,52,46,0.05);
    border: 2px solid #e0d7c6;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-8px);
}

.card.theme-blue { background-color: #efebe9; }
.card.theme-green { background-color: #f5f5f5; }
.card.theme-purple { background-color: var(--earth-tan); }
.card.theme-orange { background-color: var(--earth-sand); }
.card.theme-pink { background-color: var(--earth-clay); }

button {
    background: var(--text);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 0 #2d1b18;
    transition: all 0.1s;
}

button:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #2d1b18;
}

button:hover {
    filter: brightness(1.2);
}

.btn-play {
    background: white !important;
    color: var(--text) !important;
    box-shadow: 0 6px 0 #d6c6a2 !important;
    border: 2px solid #d6c6a2 !important;
}

input, select, textarea {
    width: 100%;
    padding: 16px;
    margin: 10px 0;
    border: 2px solid #d6c6a2;
    border-radius: 12px;
    background: white;
    font-family: inherit;
    font-weight: 700;
    color: var(--text);
}

.hidden {
    display: none !important;
}

/* Sensory Themes - Re-unified to Beige/Brown */
body.calm-theme {
    --primary: #a1887f;
    --secondary: #d7ccc8;
    --bg: #efebe9;
    --text: #3e2723;
}
body.calm-theme .card, body.calm-theme .kids-card {
    background: #fdfbf9;
    border-color: #d7ccc8;
}
body.calm-theme header {
    background: #d7ccc8;
    border-bottom-color: #bcaaa4;
}

/* ========================= */
/* GAME UI IMPROVEMENTS */
/* ========================= */

.control-box {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.cute-btn {
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 3px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* All buttons now shades of brown/beige */
.btn-pink, .btn-blue, .btn-orange, .btn-green { 
    background: var(--primary); 
    color: white; 
}

/* ========================= */
/* BIG EMOJI GAME BUTTONS */
/* ========================= */

.emotion-options {
    display:flex;
    justify-content:center;
    gap:40px;
    flex-wrap:wrap;
    margin-top:30px;
}

/* UPDATED SIZE FOR VISIBILITY */
.game-shape {
    font-size: 150px;
    width: 250px;
    height: 250px;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s;
    background: white;
    border-radius: 40px;
    border: 6px solid var(--secondary);
    box-shadow: 0 12px 0 var(--secondary);
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    margin: 10px;
}

.game-shape:hover {
    transform: scale(1.05) translateY(-5px);
    background-color: #fffdf5;
}

.game-shape:active {
    transform: translateY(6px);
    box-shadow: 0 4px 0 var(--secondary);
}

/* color circles */

.color-swatch {
    border-radius:50%;
    cursor:pointer;
    transition: transform 0.2s;
}

.color-swatch:hover {
    transform: scale(1.15);
}

/* memory game */

.memory-card .content.hidden {
    visibility:hidden;
}

/* ========================= */
/* KIDS THEME CARDS & PANELS */
/* ========================= */

.kids-card {
    background: #fffdf5;
    border: 4px solid #4e342e;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 10px 10px 0px rgba(78, 52, 46, 0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 280px;
}

.kids-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 12px 12px 0px rgba(78, 52, 46, 0.15);
}

.kids-card .icon {
    font-size: 60px;
    margin-bottom: 15px;
    display: block;
    filter: drop-shadow(0 5px 0 rgba(0,0,0,0.05));
}

.kids-card h3 {
    margin: 8px 0;
    font-size: 1.4rem;
    color: #4e342e;
    font-weight: 800;
}

.kids-card p {
    font-size: 0.9rem;
    color: #6d4c41;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.btn-kids {
    background: white !important;
    color: #4e342e !important;
    border: 3px solid #d6c6a2 !important;
    box-shadow: 0 5px 0 #d6c6a2 !important;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem;
    width: 100%;
    transition: all 0.1s;
}

.kids-card:hover .btn-kids {
    background: var(--secondary) !important;
    border-color: #4e342e !important;
    box-shadow: 0 5px 0 #4e342e !important;
    color: #4e342e !important;
}

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

@media (min-width: 1100px) {
    .grid-kids {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Reverting all theme classes to beige/brown variations */
.card.theme-blue, .kids-card.theme-blue { background-color: #efebe9; }
.card.theme-green, .kids-card.theme-green { background-color: #f5f5f5; }
.card.theme-purple, .kids-card.theme-purple { background-color: var(--earth-tan); }
.card.theme-orange, .kids-card.theme-orange { background-color: var(--earth-sand); }
.card.theme-pink, .kids-card.theme-pink { background-color: var(--earth-clay); }