/* ========================================
   Super Scene Maker - Main Styles
   ======================================== */

:root {
    --color-teal: #5FC9C4;
    --color-purple: #9B8FD8;
    --color-coral: #E88B7D;
    --color-yellow: #F4D35E;
    --color-green: #A5C882;
    --color-blue: #7BA7D6;
    --color-pink: #ECA8C4;
    --bg-cream: #FFF9F0;
    --text-dark: #3D3D3D;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Fredoka', sans-serif;
    background: linear-gradient(135deg, #FFF9F0 0%, #FFE8E0 100%);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* ========================================
   Header & Logo
   ======================================== */

header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.logo {
    font-family: 'Chewy', cursive;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 400;
    line-height: 1.2;
    margin: 0;
}

.letter {
    display: inline-block;
    animation: bounceIn 0.6s ease-out backwards;
}

.letter-1 { color: var(--color-teal); animation-delay: 0.05s; }
.letter-2 { color: var(--color-purple); animation-delay: 0.1s; }
.letter-3 { color: var(--color-coral); animation-delay: 0.15s; }
.letter-4 { color: var(--color-yellow); animation-delay: 0.2s; }
.letter-5 { color: var(--color-green); animation-delay: 0.25s; }
.letter-6 { color: var(--color-coral); animation-delay: 0.3s; }
.letter-7 { color: var(--color-yellow); animation-delay: 0.35s; }
.letter-8 { color: var(--color-green); animation-delay: 0.4s; }
.letter-9 { color: var(--color-blue); animation-delay: 0.45s; }
.letter-10 { color: var(--color-pink); animation-delay: 0.5s; }
.letter-11 { color: var(--color-purple); animation-delay: 0.55s; }
.letter-12 { color: var(--color-teal); animation-delay: 0.6s; }
.letter-13 { color: var(--color-coral); animation-delay: 0.65s; }
.letter-14 { color: var(--color-yellow); animation-delay: 0.7s; }
.letter-15 { color: var(--color-green); animation-delay: 0.75s; }

/* ========================================
   Play Button
   ======================================== */

.play-button-container {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 10;
}

.play-button {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-teal) 0%, var(--color-blue) 100%);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: pulse 2s ease-in-out infinite;
}

.play-button:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-hover);
}

.play-icon {
    width: 100%;
    height: 100%;
    color: var(--color-teal);
}

/* ========================================
   Scene Grid
   ======================================== */

.scene-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
}

.scene-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: all 0.3s ease;
}

.scene-card:hover {
    transform: translateY(-10px) rotate(2deg);
    box-shadow: var(--shadow-hover);
}

.scene-image {
    width: 100%;
    padding-top: 75%;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Placeholder backgrounds - replace with actual images */
.forest-scene {
    background: linear-gradient(180deg, #8FBC8F 0%, #556B2F 100%);
}

.castle-scene {
    background: linear-gradient(180deg, #B0E0E6 0%, #DDA0DD 100%);
}

.ocean-scene {
    background: linear-gradient(180deg, #87CEEB 0%, #1E90FF 100%);
}

.space-scene {
    background: linear-gradient(180deg, #191970 0%, #4B0082 100%);
}

.pirate-scene {
    background: linear-gradient(180deg, #F0E68C 0%, #20B2AA 100%);
}

.winter-scene {
    background: linear-gradient(180deg, #E0F7FA 0%, #B2EBF2 100%);
}

/* ========================================
   Tagline
   ======================================== */

.tagline {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
    animation: fadeIn 1s ease-out 0.6s backwards;
}

.tagline h2 {
    font-family: 'Chewy', cursive;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.tagline p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: #666;
    line-height: 1.6;
}

/* ========================================
   Footer
   ======================================== */

footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 2px dashed rgba(0, 0, 0, 0.1);
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-dark);
    text-decoration: none;
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--color-teal);
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.footer-link:hover {
    background: var(--color-teal);
    color: white;
    transform: translateY(-2px);
}

.copyright {
    color: #999;
    font-size: 0.9rem;
}

/* ========================================
   Modal
   ======================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 30px;
    padding: 3rem;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.modal-content h2 {
    font-family: 'Chewy', cursive;
    font-size: 2rem;
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.mode-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.mode-button {
    background: linear-gradient(135deg, #FFF 0%, #F8F8F8 100%);
    border: 3px solid var(--color-teal);
    border-radius: 20px;
    padding: 2rem 1rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
    cursor: pointer;
}

.mode-button:hover {
    background: var(--color-teal);
    color: white;
    transform: translateY(-5px) scale(1.05);
    border-color: var(--color-blue);
}

.mode-button.storybook-mode {
    border-color: var(--color-coral);
}

.mode-button.storybook-mode:hover {
    background: var(--color-coral);
    border-color: var(--color-pink);
}

.mode-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.mode-button h3 {
    font-family: 'Chewy', cursive;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.mode-button p {
    font-size: 0.9rem;
    color: #666;
}

.mode-button:hover p {
    color: rgba(255, 255, 255, 0.9);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.close-modal:hover {
    background: #f0f0f0;
    color: var(--text-dark);
    transform: rotate(90deg);
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-20px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(95, 201, 196, 0.7);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(95, 201, 196, 0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

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

    .play-button {
        width: 100px;
        height: 100px;
    }

    .modal-content {
        padding: 2rem 1.5rem;
    }

    .mode-buttons {
        grid-template-columns: 1fr;
    }
}
