:root {
    /* The "Cotton Candy Sky" soft background gradient */
    /* --bg-gradient: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%); */
        background: linear-gradient(to right, #b3ffff, #fcb69f);
        /* background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%); */
    --font-main: 'Comic Sans MS', 'Chalkboard SE', 'Marker Felt', sans-serif;
}

body {
    margin: 0;
    font-family: var(--font-main);
    background: var(--bg-gradient);
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

header { margin-top: 30px; }

/* Mobile Screen Fix to prevent overlap */
@media (max-width: 600px) {
    header { margin-top: 85px; } 
    
    .bubble-btn {
        padding: 8px 12px !important;
        font-size: 0.85rem !important;
    }
    .cursor-dropdown select {
        padding: 6px 10px !important;
        font-size: 12px !important;
    }
}

.title {
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    color: #c23989;
    margin: 5px 20px; 
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.7);
}

.subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: #333;
    margin-top: 0; margin-bottom: 15px; 
}

/* Frosted Glass Effect for Ads */
.ad-container {
    /* width: 100%; display: flex; justify-content: center; */
    width: 100%; display: none; justify-content: center;
    margin: 10px 0 20px 0; position: relative; z-index: 40; 
    padding: 0 15px; box-sizing: border-box;
}

.ad-space {
    background: rgba(255, 255, 255, 0.35); 
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 3px dashed rgba(255, 152, 0, 0.7); 
    border-radius: 15px; width: 100%; max-width: 728px; min-height: 90px; 
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1); color: #555;
    font-size: 0.9rem; font-family: sans-serif; font-weight: bold; overflow: hidden;
}

.page-wrapper {
    flex: 1; width: 100%; max-width: 1200px; margin: auto;
    padding: 0 20px; box-sizing: border-box; position: relative; z-index: 20;
}

/* Flexbox Matrix Layout */
.container {
    display: flex; flex-wrap: wrap; justify-content: center; 
    gap: 25px; margin: 10px auto 30px auto; max-width: 1050px; 
}

/* === UNIVERSAL CARD BASE (Backgrounds are now injected by JS) === */
.card {
    width: 300px; 
    height: 280px;
    flex-grow: 0; flex-shrink: 0;
    border-radius: 25px;
    text-decoration: none;
    color: white; 
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
    border-bottom: 8px solid rgba(0,0,0,0.2); 
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}

/* Fallback background just in case JS fails to load */
.card { background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%); }

@media (max-width: 700px) {
    .card { width: 100%; max-width: 400px; }
}

.card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 12px 20px rgba(0,0,0,0.25);
}
.card:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
}

/* Subtle highlight to the top of all cards for a 3D effect */
.card::after {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(255,255,255,0.25), transparent); pointer-events: none;
}

/* Translucent App Icons */
.card-icon {
    font-size: 45px; 
    width: 80px; height: 80px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px; border-radius: 16px; font-weight: bold;
    background: rgba(255, 255, 255, 0.25); 
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    line-height: 1; z-index: 2; 
}

.card:hover .card-icon { 
    transform: rotate(10deg) scale(1.1); 
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.content { padding: 5px; width: 100%; z-index: 2; position: relative; }

/* Big Text */
.big-text {
    font-size: clamp(1.6rem, 2.2vw, 2rem);
    font-weight: bold; display: block; margin-bottom: 8px;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.15); 
}

/* Solid White Pill Badges with dark text (Looks great on any random color!) */
.small-text {
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    font-weight: bold; display: inline-block; padding: 5px 15px; border-radius: 15px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid white;
    color: #444; /* Dark grey ensures it's readable */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Solid White Play Buttons with dark icons */
.play-btn {
    width: 40px; height: 40px; display: flex; align-items: center;
    justify-content: center; font-size: 16px; border-radius: 50%;
    margin-top: 15px; transition: transform 0.2s;
    background: white; 
    color: #444; /* Dark grey play icon */
    box-shadow: 0 4px 0 rgba(0,0,0,0.15);
    z-index: 2; position: relative;
}
.card:hover .play-btn { transform: scale(1.1); }

/* Frosted Glass for SEO Intro Box (Justified text) */
.seo-intro-box {
    max-width: 900px; margin: 10px auto 30px auto; padding: 20px 30px; 
    background: rgba(255, 255, 255, 0.35); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 2px solid rgba(255, 255, 255, 0.6); border-radius: 20px;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem); color: #222; line-height: 1.6;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1); position: relative; z-index: 30; 
}
.seo-intro-box p { 
    margin: 0; 
    text-align: justify; 
}

/* Animations */
.dancing { animation: dance 1.5s infinite alternate ease-in-out; }
@keyframes dance { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
.bouncing { animation: bounce 2s infinite ease-in-out; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Floating Bubbles */
#bubble-container {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 100%;
    overflow: hidden; pointer-events: none; z-index: 10;
}
.bubble {
    position: absolute; bottom: -60px; width: clamp(40px, 6vw, 60px); height: clamp(40px, 6vw, 60px);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: clamp(1rem, 1.5vw, 1.5rem); font-weight: bold; color: #0d47a1; pointer-events: none; 
    animation: floatUp linear forwards; box-shadow: inset -5px -5px 15px rgba(0,0,0,0.1), 0 5px 15px rgba(0,0,0,0.1); opacity: 0.5; 
}
@keyframes floatUp { from { transform: translateY(0) scale(1); } to { transform: translateY(-110vh) scale(1.2); opacity: 0; } }

/* Footer */
.footer {
    text-align: center; padding: 20px 15px; background: #2c3e50; color: white;
    margin-top: 20px; position: relative; z-index: 20;
}
.footer a { color: #ffcc00; text-decoration: none; margin: 0 10px; display: inline-block; padding: 5px 0; font-size: 1rem; transition: color 0.2s; }
.footer a:hover { color: #fff; text-decoration: underline; }
.copyright { margin-top: 10px; font-size: 0.85rem; color: #aaa; }

/* Cursor Dropdown */
.cursor-dropdown { position: fixed; top: 15px; left: 15px; z-index: 999; }
.cursor-dropdown select {
    padding: 8px 15px; border-radius: 20px; border: 2px solid #00bcd4; font-size: 14px;
    font-weight: bold; background: white; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.1); outline: none;
}

/* Floating Parent Bubble Button */
.bubble-btn {
    position: fixed; top: 15px; right: 15px; background: linear-gradient(135deg, #ff9800, #ff4081);
    color: white; padding: 10px 18px; border-radius: 40px; font-weight: bold; text-decoration: none;
    box-shadow: 0 8px 18px rgba(0,0,0,0.3); z-index: 999; animation: floaty 2.5s infinite alternate ease-in-out;
    border: 2px solid white; font-size: clamp(0.85rem, 1.2vw, 1rem);
}
@keyframes floaty { from { transform: translateY(0); } to { transform: translateY(-5px); } }
.bubble-btn:hover { transform: scale(1.1); }

/* Cursors */
button, a, .clickable, .letter { cursor: url("images/cursors/dinosaur_fire.png") 16 16, pointer; }