/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Quicksand', sans-serif;
    background: linear-gradient(135deg, #90caf9 0%, #b39ddb 40%, #f48fb1 75%, #ffb74d 100%);
    background-size: cover;
    min-height: 100vh;
    color: #1c1e21;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before, body::after {
    content: '';
    position: fixed;
    z-index: 0;
    pointer-events: none;
    opacity: 0.7;
    background-repeat: no-repeat;
    background-size: 180px 180px;
}
body::before {
    top: 32px;
    left: 32px;
    width: 180px;
    height: 180px;
    background-image: url('data:image/svg+xml;utf8,<svg width="180" height="180" xmlns="http://www.w3.org/2000/svg"><circle cx="90" cy="90" r="60" fill="%23ffeb3b"/><g stroke="%23ffc107" stroke-width="8"><line x1="90" y1="30" x2="90" y2="10"/><line x1="90" y1="150" x2="90" y2="170"/><line x1="30" y1="90" x2="10" y2="90"/><line x1="150" y1="90" x2="170" y2="90"/><line x1="132.43" y1="47.57" x2="146.57" y2="33.43"/><line x1="47.57" y1="132.43" x2="33.43" y2="146.57"/><line x1="47.57" y1="47.57" x2="33.43" y2="33.43"/><line x1="132.43" y1="132.43" x2="146.57" y2="146.57"/></g></svg>');
}
body::after {
    bottom: 32px;
    right: 32px;
    width: 180px;
    height: 180px;
    background-image: url('data:image/svg+xml;utf8,<svg width="180" height="180" xmlns="http://www.w3.org/2000/svg"><circle cx="90" cy="90" r="60" fill="%23ffeb3b"/><g stroke="%23ffc107" stroke-width="8"><line x1="90" y1="30" x2="90" y2="10"/><line x1="90" y1="150" x2="90" y2="170"/><line x1="30" y1="90" x2="10" y2="90"/><line x1="150" y1="90" x2="170" y2="90"/><line x1="132.43" y1="47.57" x2="146.57" y2="33.43"/><line x1="47.57" y1="132.43" x2="33.43" y2="146.57"/><line x1="47.57" y1="47.57" x2="33.43" y2="33.43"/><line x1="132.43" y1="132.43" x2="146.57" y2="146.57"/></g></svg>');
}

body.game-bg-active {
    background: linear-gradient(135deg, #90caf9 0%, #b39ddb 40%, #f48fb1 75%, #ffb74d 100%) !important;
    background-size: cover !important;
    background-attachment: fixed !important;
}

body.game-bg-active .game-container,
body.game-bg-active .game-content {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* Cartoon Background Elements */
.cartoon-sun {
    position: fixed;
    top: 30px;
    right: 50px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, #ffeb3b 0%, #ffc107 50%, #ff9800 100%);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 235, 59, 0.6);
    animation: float 6s ease-in-out infinite;
    z-index: -1;
}

.cartoon-sun::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(255, 235, 59, 0.3) 0%, transparent 70%);
    border-radius: 50%;
}

.cartoon-rainbow {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 200px;
    border-radius: 200px 200px 0 0;
    background: linear-gradient(
        to bottom,
        #ff6b9d 0%,
        #ffa726 16.66%,
        #ffeb3b 33.33%,
        #4caf50 50%,
        #2196f3 66.66%,
        #9c27b0 83.33%,
        #e91e63 100%
    );
    opacity: 0.4;
    z-index: -1;
    animation: rainbow-bounce 4s ease-in-out infinite;
}

.cartoon-clouds {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    animation: float-cloud 8s ease-in-out infinite;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

.cloud1 {
    width: 100px;
    height: 40px;
    top: 60px;
    left: 10%;
    animation-delay: 0s;
}

.cloud1::before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 10px;
}

.cloud1::after {
    width: 60px;
    height: 60px;
    top: -30px;
    right: 10px;
}

.cloud2 {
    width: 80px;
    height: 35px;
    top: 120px;
    right: 15%;
    animation-delay: 2s;
}

.cloud2::before {
    width: 40px;
    height: 40px;
    top: -20px;
    left: 8px;
}

.cloud2::after {
    width: 50px;
    height: 50px;
    top: -25px;
    right: 8px;
}

.cloud3 {
    width: 120px;
    height: 45px;
    top: 180px;
    left: 20%;
    animation-delay: 4s;
}

.cloud3::before {
    width: 60px;
    height: 60px;
    top: -30px;
    left: 15px;
}

.cloud3::after {
    width: 70px;
    height: 70px;
    top: -35px;
    right: 15px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Top Navigation Bar */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 32px;
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.2);
    border: 1px solid rgba(255, 182, 193, 0.3);
    backdrop-filter: blur(10px);
}

.nav-left {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    font-size: 2rem;
    color: #ff6b9d;
    animation: bounce 2s infinite;
}

.logo h1 {
    font-size: 2rem;
    color: #ff6b9d;
    font-weight: 700;
}

.nav-right {
    display: flex;
    align-items: center;
}

.login-btn {
    background: linear-gradient(135deg, #ff6b9d, #ffa726);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 157, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
}

.login-btn i {
    font-size: 1rem;
}

/* Main Content */
.main-content {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(255, 107, 157, 0.15);
    border: 1px solid rgba(255, 182, 193, 0.3);
    backdrop-filter: blur(15px);
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.8);
    color: #ff6b9d;
    border: 2px solid rgba(255, 107, 157, 0.3);
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.tab-btn:hover {
    background: rgba(255, 107, 157, 0.1);
    transform: translateY(-1px);
    border-color: #ff6b9d;
}

.tab-btn.active {
    background: #ff9472;
    color: white;
    transform: translateY(-1px);
    border-color: #ff9472;
    box-shadow: 0 2px 8px rgba(255, 107, 157, 0.3);
}

.tab-btn i {
    font-size: 1rem;
}

/* Tab Content */
.tab-content {
    position: relative;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-panel.active {
    display: block;
}

.tab-header {
    text-align: center;
    margin-bottom: 32px;
    padding: 24px;
    background: #ff9472;
    border-radius: 8px;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
}

.tab-header h2 {
    font-size: 2rem;
    margin-bottom: 8px;
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.tab-header h2 i {
    font-size: 1.8rem;
    color: white;
}

.tab-header p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.game-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 0;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 157, 0.1);
    border: 2px solid rgba(255, 182, 193, 0.3);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.game-card:hover {
    box-shadow: 0 4px 16px rgba(255, 107, 157, 0.2);
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.95);
    border-color: #ff6b9d;
}

.game-card:nth-child(2) {
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.1), rgba(255, 204, 153, 0.1));
}

.game-card:nth-child(3) {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.1), rgba(255, 166, 38, 0.1));
}

.game-thumbnail {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

.game-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-thumbnail img {
    transform: scale(1.05);
}

.thumbnail-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 107, 157, 0.9);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
}

.thumbnail-overlay i {
    font-size: 1.5rem;
    color: white;
}

.game-card h3 {
    font-size: 1.25rem;
    color: #ff6b9d;
    margin: 16px 16px 8px 16px;
    font-weight: 600;
}

.game-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 16px 16px 16px;
}

/* Game Area */
.game-area {
    min-height: 500px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e4e6ea;
}

.back-btn {
    background: rgba(255, 255, 255, 0.8);
    color: #1c1e21;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.game-header h2 {
    color: #ff6b9d;
    font-size: 1.75rem;
    font-weight: 700;
}

.score-display {
    background: linear-gradient(135deg, #ff6b9d, #ffa726);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.game-content {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 24px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #e4e6ea;
    backdrop-filter: blur(10px);
}

/* Game-specific styles */
.sound-card {
    position: relative;
    background: linear-gradient(135deg, #ff6b9d 0%, #ffa726 100%);
    color: #fff;
    border-radius: 18px;
    padding: 32px 24px;
    margin: 16px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
}

.sound-card::before {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.4s ease;
}

.sound-card:hover {
    transform: translateY(-6px) rotate(-1deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.sound-card:hover::before {
    transform: scale(1);
}

.sound-card h3 {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.sound-card p {
    color: #fff;
    font-size: 1.1rem;
}


.sound-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.sound-card h3 {
    font-size: 1.75rem;
    color: #ff6b9d;
    margin-bottom: 12px;
    font-weight: 600;
}

.sound-card p {
    color: #65676b;
    font-size: 1rem;
}

.word-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 20px;
    margin: 12px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 180px;
    border: 1px solid #e4e6ea;
    backdrop-filter: blur(10px);
}

.word-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.word-card img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.word-card h4 {
    font-size: 1.1rem;
    color: #1c1e21;
    margin-bottom: 8px;
    font-weight: 600;
}

.breathing-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b9d, #ffa726);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.breathing-circle:hover {
    transform: scale(1.05);
}

.breathing-circle.inhale {
    animation: expand 4s ease-in-out infinite;
}

.breathing-circle.exhale {
    animation: contract 4s ease-in-out infinite;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 32px;
    padding: 16px;
    color: #ff6b9d;
    font-size: 0.85rem;
    font-weight: 400;
}

/* Animations */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 107, 157, 0.4);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(255, 107, 157, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 157, 0);
    }
}

@keyframes expand {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes contract {
    0%, 100% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1);
    }
}

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

@keyframes rainbow-bounce {
    0%, 100% {
        opacity: 0.4;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translateX(-50%) scale(1.05);
    }
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .top-nav {
        padding: 12px 16px;
        border-radius: 8px;
    }
    
    .logo h1 {
        font-size: 1.75rem;
    }
    
    .logo i {
        font-size: 1.75rem;
    }
    
    .login-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .main-content {
        padding: 24px;
        border-radius: 8px;
    }
    
    .tab-navigation {
        flex-direction: column;
        align-items: center;
    }
    
    .tab-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .game-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .breathing-circle {
        width: 120px;
        height: 120px;
        font-size: 1rem;
    }
    
    .cartoon-rainbow {
        width: 250px;
        height: 125px;
    }
    
    .cartoon-sun {
        width: 80px;
        height: 80px;
        top: 20px;
        right: 30px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .logo i {
        font-size: 1.5rem;
    }
    
    .login-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .tab-header h2 {
        font-size: 1.75rem;
    }
    
    .game-card {
        padding: 20px;
    }
    
    .game-icon {
        font-size: 2.5rem;
    }
    
    .cartoon-rainbow {
        width: 200px;
        height: 100px;
    }
    
    .cartoon-sun {
        width: 60px;
        height: 60px;
        top: 15px;
        right: 20px;
    }
    
    .cloud1 {
        width: 80px;
        height: 30px;
    }
    
    .cloud2 {
        width: 60px;
        height: 25px;
    }
    
    .cloud3 {
        width: 100px;
        height: 35px;
    }
}

.sound-btn {
    background: #ffe3ef;
    color: #ff6b9d;
    border: 2px solid #ffb3d9;
    border-radius: 10px;
    padding: 16px 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
    box-shadow: 0 2px 8px rgba(255, 107, 157, 0.05);
}
.sound-btn:hover {
    background: #ffb3d9;
    color: white;
    border-color: #ff6b9d;
}
.sound-btn.selected {
    background: linear-gradient(135deg, #ff6b9d, #ffa726);
    color: white;
    border-color: #ff6b9d;
    box-shadow: 0 4px 16px rgba(255, 107, 157, 0.15);
}

/* Sound Selection Grid */
.sound-selection-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px #0001;
    padding: 32px;
    text-align: center;
}

.sound-btn-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.sound-option-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #ff6b9d;
    border: 2px solid rgba(255, 107, 157, 0.3);
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.sound-option-btn:hover {
    background: rgba(255, 107, 157, 0.1);
    transform: translateY(-1px);
    border-color: #ff6b9d;
}

.sound-option-btn.selected {
    background: linear-gradient(135deg, #ff6b9d, #ffa726);
    color: white;
    transform: translateY(-1px);
    border-color: #ff6b9d;
    box-shadow: 0 2px 8px rgba(255, 107, 157, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sound-btn-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .sound-btn-grid {
        grid-template-columns: 1fr;
    }
    
    .sound-option-btn {
        font-size: 0.85rem;
        padding: 10px 12px;
    }
}

/* Knock Knock Game Styles */
.game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.2);
    border: 1px solid rgba(255, 182, 193, 0.3);
    backdrop-filter: blur(10px);
}

.back-button {
    background: linear-gradient(135deg, #ff6b9d, #ffa726);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
}

.game-info {
    background: rgba(255, 107, 157, 0.1);
    color: #ff6b9d;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    border: 2px solid rgba(255, 107, 157, 0.2);
}

/* Word Category Selection */
.word-category-selection {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 182, 193, 0.3);
    backdrop-filter: blur(10px);
}

.word-category-selection h3 {
    color: #ff6b9d;
    font-size: 1.8rem;
    margin-bottom: 24px;
    font-weight: 600;
}

.category-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.category-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #ff6b9d;
    border: 2px solid rgba(255, 107, 157, 0.3);
    padding: 16px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Quicksand', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    min-width: 120px;
}

.category-btn:hover {
    background: rgba(255, 107, 157, 0.1);
    transform: translateY(-2px);
    border-color: #ff6b9d;
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.2);
}

.category-btn.selected {
    background: linear-gradient(135deg, #ff6b9d, #ffa726);
    color: white;
    transform: translateY(-2px);
    border-color: #ff6b9d;
    box-shadow: 0 4px 16px rgba(255, 107, 157, 0.3);
}

/* Category pills for checklist */
.category-pill {
    position: relative;
    background: rgba(255,255,255,0.9);
    border: 2px solid #ff6b9d55;
    color: #ff6b9d;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 30px;
    transition: all 0.25s ease;
    user-select:none;
}

.category-pill input {
    display:none;
}

.category-pill:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.2);
}

.category-pill.selected {
    background: linear-gradient(135deg, #ff6b9d 0%, #ffa726 100%);
    color:#fff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(255, 107, 157, 0.4);
}

.fancy-select {
    background: rgba(255,255,255,0.95);
    border:2px solid #ff6b9d55;
    border-radius:12px;
    padding:10px 40px 10px 16px; /* extra right padding for arrow */
    min-width:120px;
    font-family:'Quicksand',sans-serif;
    font-size:1rem;
    color:#ff6b9d;
    cursor:pointer;
    box-shadow:0 2px 6px rgba(0,0,0,0.1);
    transition:all 0.25s ease;
    appearance:none;
    -webkit-appearance:none;
    -moz-appearance:none;
    text-align:center;
    background-image:url('data:image/svg+xml;utf8,<svg fill="%23ff6b9d" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat:no-repeat;
    background-position:right 16px center;
    background-size:14px;
}
.fancy-select:hover {
    border-color:#ff6b9d;
    box-shadow:0 4px 10px rgba(255,107,157,0.2);
}
.fancy-select:focus {
    outline:none;
    box-shadow:0 0 0 3px rgba(255,107,157,0.3);
}

.categories-container .instructions {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255,107,157,0.25);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(255,107,157,0.15);
    color:#5a5a5a;
    margin-bottom: 24px;
}

.categories-container .instructions h3 {
    font-size:2.2rem;
    background:linear-gradient(135deg,#ff6b9d 0%, #ffa726 100%);
    -webkit-background-clip:text;
    background-clip:text;
    -webkit-text-fill-color:transparent;
    text-align:center;
    margin-bottom:20px;
    font-weight:700;
    text-shadow:none;
}

.categories-sound-title {
    text-align:center;
    font-size:2.3rem;
    font-weight:700;
    background:linear-gradient(135deg,#ff6b9d 0%, #ffa726 100%);
    -webkit-background-clip:text;
    background-clip:text;
    -webkit-text-fill-color:transparent;
    margin-bottom:20px;
}

.category-description {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    background: rgba(255, 182, 193, 0.1);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 182, 193, 0.2);
}

/* Doors Game */
.doors-game {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.doors-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.door {
    position: relative;
    width: 100%;
    height: 280px;
    perspective: 1000px;
    cursor: pointer;
    transition: transform 0.3s ease;
    min-width: 200px;
    padding: 8px;
    background: linear-gradient(135deg, #8d6e63, #6d4c41);
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.door:hover {
    transform: scale(1.05);
}

.door-front, .door-back {
    position: absolute;
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    top: 8px;
    left: 8px;
    backface-visibility: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    border: 4px solid;
}

.door-front {
    background: linear-gradient(135deg, var(--door-color), var(--door-color-dark));
    border-color: var(--door-color-dark);
    transform: rotateY(0deg);
    transition: transform 0.6s ease;
    position: relative;
}

.door-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    border-radius: 12px;
    pointer-events: none;
}

.door-front::after {
    content: '';
}

.door-back {
    background: linear-gradient(135deg, #ff6b9d, #ffa726);
    border-color: #ff6b9d;
    transform: rotateY(180deg);
    transition: transform 0.6s ease;
}

.door.opened .door-front {
    transform: rotateY(-180deg);
}

.door.opened .door-back {
    transform: rotateY(0deg);
}

.door-knob {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-radius: 50%;
    border: 3px solid #b8860b;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

.door-knob::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #b8860b;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.word-reveal {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.word-reveal .word-icon {
    font-size: 3rem;
    margin-bottom: 5px;
}

.word-reveal .word-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Door Colors */
.door.blue {
    --door-color: #42a5f5;
    --door-color-dark: #1976d2;
}

.door.yellow {
    --door-color: #ffeb3b;
    --door-color-dark: #fbc02d;
}

.door.red {
    --door-color: #ef5350;
    --door-color-dark: #d32f2f;
}

.door.orange {
    --door-color: #ff9800;
    --door-color-dark: #f57c00;
}

.door.green {
    --door-color: #66bb6a;
    --door-color-dark: #388e3c;
}

.door.purple {
    --door-color: #ab47bc;
    --door-color-dark: #7b1fa2;
}

.door.pink {
    --door-color: #ec407a;
    --door-color-dark: #c2185b;
}

.door.brown {
    --door-color: #8d6e63;
    --door-color-dark: #5d4037;
}

/* Responsive Design for Knock Knock */
@media (max-width: 1024px) {
    .doors-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        max-width: 900px;
    }
    
    .door {
        height: 220px;
        min-width: 160px;
    }
}

@media (max-width: 768px) {
    .doors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        max-width: 600px;
    }
    
    .door {
        height: 200px;
        min-width: 150px;
    }
    
    .category-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .category-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .word-category-selection {
        padding: 24px;
        margin: 0 16px;
    }
}

@media (max-width: 480px) {
    .doors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        max-width: 400px;
    }
    
    .door {
        height: 160px;
        min-width: 120px;
    }
    
    .word-reveal {
        font-size: 1.1rem;
    }
    
    .game-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .door-knob {
        width: 24px;
        height: 24px;
        right: 15px;
    }
    
    .door-knob::after {
        width: 6px;
        height: 6px;
    }
}

/* Dress Up Game Styles */
#dress-up-container .game-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    padding: 24px 0;
}
.dressup-character-select {
    display: flex;
    gap: 40px;
    margin-bottom: 32px;
    justify-content: center;
}
.dressup-character-btn {
    background: #fff6fa;
    border: 2px solid #ffb3d9;
    border-radius: 16px;
    padding: 24px 32px;
    font-family: 'Quicksand', sans-serif;
    font-size: 1.2rem;
    color: #ff6b9d;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px #ffb3d944;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.dressup-character-btn.selected, .dressup-character-btn:hover {
    background: linear-gradient(135deg, #ffb3d9, #ffa726);
    color: #fff;
    border-color: #ff6b9d;
    box-shadow: 0 4px 16px #ffb3d944;
}
.dressup-character-img {
    width: 100px;
    height: 160px;
    object-fit: contain;
    margin-bottom: 8px;
}
.dressup-stage {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: center;
    gap: 48px;
    margin-top: 24px;
    width: 100%;
}
.dressup-character {
    position: relative;
    width: 180px;
    height: 320px;
    background: #fff6fa;
    border-radius: 24px;
    box-shadow: 0 4px 24px #ffb3d944;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: visible;
}
.dressup-wardrobe {
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 8px #ffb3d944;
    padding: 18px 12px;
    min-width: 120px;
    align-items: center;
}
.dressup-wardrobe-title {
    color: #ff6b9d;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.dressup-item {
    background: #ffe3ef;
    border: 2px solid #ffb3d9;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 1.1rem;
    color: #ff6b9d;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dressup-item.selected, .dressup-item:hover {
    background: linear-gradient(135deg, #ffb3d9, #ffa726);
    color: #fff;
    border-color: #ff6b9d;
}
.dressup-controls {
    margin-top: 24px;
    display: flex;
    gap: 16px;
    justify-content: center;
}
.dressup-btn {
    background: #ffb3d9;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 28px;
    font-size: 1.1rem;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px #ffb3d944;
    transition: all 0.2s;
}
.dressup-btn:hover {
    background: linear-gradient(135deg, #ff6b9d, #ffa726);
    color: #fff;
}
@media (max-width: 900px) {
    .dressup-stage {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }
    .dressup-character {
        width: 140px;
        height: 240px;
    }
}
@media (max-width: 600px) {
    .dressup-character-select {
        flex-direction: column;
        gap: 20px;
    }
    .dressup-stage {
        flex-direction: column;
        gap: 16px;
    }
    .dressup-character {
        width: 100px;
        height: 180px;
    }
    .dressup-wardrobe {
        min-width: 80px;
        padding: 10px 4px;
    }
}

.site-blurb {
    width: 100%;
    max-width: 520px;
    margin: 20px auto 0 auto;
    padding: 14px 12px 10px 12px;
    background: linear-gradient(135deg, rgba(255, 245, 157, 0.85) 0%, rgba(255, 182, 193, 0.85) 100%);
    border-radius: 22px;
    box-shadow: 0 4px 24px #ffd1a944;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 36px;
}
.site-blurb-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ff8a65;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-family: 'Quicksand', sans-serif;
    background: linear-gradient(90deg, #ff8a65 0%, #d81b60 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 8px #fffde788;
}
.site-blurb-desc {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 0;
    font-family: 'Quicksand', sans-serif;
    background: linear-gradient(90deg, #ff8a65 0%, #d81b60 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #d81b60;
    opacity: 1;
    text-shadow: 0 1px 4px #fffde766;
}
@media (max-width: 600px) {
    .site-blurb-title {
        font-size: 1.05rem;
    }
    .site-blurb-desc {
        font-size: 0.85rem;
    }
    .site-blurb {
        margin-top: 8px;
        padding: 8px 3px 4px 3px;
        border-radius: 14px;
        margin-bottom: 22px;
    }
}

.rainbow-logo {
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
    margin-bottom: 2px;
}

/* Header Gradient Override */
.top-nav {
    background: linear-gradient(135deg, #ff6b9d 0%, #ffa726 100%) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}
.top-nav .logo h1,
.top-nav .logo i {
    color: #ffffff !important;
}

/* Pixie Dust Game Styles */
.pixie-dust-thumbnail {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffb3d9, #ff69b4, #ff1493);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sparkle {
    position: absolute;
    font-size: 1.5rem;
    animation: sparkle-twinkle 2s ease-in-out infinite;
    opacity: 0.8;
}

.sparkle1 {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.sparkle2 {
    top: 30%;
    right: 25%;
    animation-delay: 0.3s;
}

.sparkle3 {
    bottom: 30%;
    left: 30%;
    animation-delay: 0.6s;
}

.sparkle4 {
    bottom: 20%;
    right: 20%;
    animation-delay: 0.9s;
}

.sparkle5 {
    top: 50%;
    left: 15%;
    animation-delay: 1.2s;
}

.sparkle6 {
    top: 60%;
    right: 15%;
    animation-delay: 1.5s;
}

@keyframes sparkle-twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
}

.game-card:hover .pixie-dust-thumbnail {
    background: linear-gradient(135deg, #ff69b4, #ff1493, #c71585);
}

.game-card:hover .sparkle {
    animation-duration: 1.5s;
} 