:root {
    --banana-yellow: #FFE135;
    --banana-gold: #FFC300;
    --magic-purple: #DDA0DD;
    --soft-lavender: #E6E6FA;
    --cream-white: #FFFDD0;
    --deep-purple: #9B59B6;
    --warm-orange: #FFB347;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Quicksand', sans-serif;
    background: linear-gradient(135deg, var(--cream-white) 0%, var(--soft-lavender) 50%, var(--magic-purple) 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.app {
    min-height: 100vh;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(180deg, 
        var(--banana-yellow) 0%, 
        var(--banana-gold) 30%, 
        var(--magic-purple) 70%, 
        var(--deep-purple) 100%
    );
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 10;
    padding: 2rem;
}

.hero-title {
    font-family: 'Baloo 2', cursive;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    color: #4a2c4a;
    text-shadow: 3px 3px 0 rgba(255,255,255,0.5);
    margin-bottom: 1rem;
    animation: bounceIn 1s ease-out;
}

.magic-text {
    background: linear-gradient(90deg, var(--deep-purple), var(--banana-gold), var(--deep-purple));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

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

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: #fff;
    font-weight: 500;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.hero-image-container {
    width: clamp(200px, 50vw, 400px);
    height: clamp(200px, 50vw, 400px);
    margin: 0 auto 2rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,225,53,0.3) 100%);
    box-shadow: 
        0 0 60px rgba(255,225,53,0.6),
        0 0 100px rgba(221,160,221,0.4),
        inset 0 0 30px rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    animation: float 4s ease-in-out infinite;
}

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

.hero-image {
    width: 90%;
    height: 90%;
    object-fit: cover;
    border-radius: 50%;
}

.scroll-indicator {
    color: #fff;
    font-size: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

.scroll-arrow {
    font-size: 2rem;
    margin-top: 0.5rem;
    animation: bounce 1s ease-in-out infinite;
}

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

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Sparkles */
.sparkles-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.sparkle {
    position: absolute;
    animation: twinkle 2s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1); }
}

/* Floating Bananas */
.floating-bananas {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-banana {
    position: absolute;
    font-size: 2rem;
    animation: floatUp 5s ease-in-out infinite;
}

@keyframes floatUp {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* Banana Loader */
.banana-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.spinning-banana {
    font-size: 3rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 1rem;
    color: var(--deep-purple);
    font-weight: 600;
}

/* Main Content */
.main-content {
    padding: 4rem 1rem;
}

.superpowers-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Superpower Cards */
.superpower-card {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 4rem;
}

.superpower-card.from-right {
    transform: translateX(100px);
}

.superpower-card.visible {
    opacity: 1;
    transform: translateX(0);
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 2rem;
    box-shadow: 
        0 20px 60px rgba(155,89,182,0.2),
        0 0 0 1px rgba(255,255,255,0.5);
}

@media (min-width: 768px) {
    .card-content {
        flex-direction: row;
        padding: 3rem;
    }
    
    .card-content.flex-row-reverse {
        flex-direction: row-reverse;
    }
}

.card-image-container {
    flex-shrink: 0;
    width: clamp(200px, 40vw, 300px);
    height: clamp(200px, 40vw, 300px);
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--cream-white), var(--soft-lavender));
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-image:hover {
    transform: scale(1.05);
}

.regenerate-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255,255,255,0.9);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.regenerate-btn:hover {
    background: var(--banana-yellow);
    transform: scale(1.05);
}

.card-text {
    flex: 1;
    text-align: center;
}

@media (min-width: 768px) {
    .card-text {
        text-align: left;
    }
    
    .card-content.flex-row-reverse .card-text {
        text-align: right;
    }
}

.card-title {
    font-family: 'Baloo 2', cursive;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--deep-purple);
    margin-bottom: 1rem;
}

.card-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #555;
    line-height: 1.8;
}

/* Error Placeholder */
.error-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--deep-purple);
}

.error-banana {
    font-size: 4rem;
    animation: wobble 1s ease-in-out infinite;
}

@keyframes wobble {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* Quote Banner */
.quote-banner {
    position: relative;
    background: linear-gradient(135deg, var(--deep-purple), var(--magic-purple));
    border-radius: 30px;
    padding: 4rem 2rem;
    margin: 4rem auto;
    max-width: 900px;
    overflow: hidden;
    box-shadow: 
        0 0 60px rgba(155,89,182,0.4),
        inset 0 0 100px rgba(255,255,255,0.1);
}

.quote-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

.quote-text {
    font-family: 'Baloo 2', cursive;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 600;
    color: #fff;
    font-style: italic;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.2);
}

.quote-author {
    font-size: 1.2rem;
    color: var(--cream-white);
    font-weight: 500;
}

/* Custom Generator */
.custom-generator {
    max-width: 700px;
    margin: 4rem auto;
    background: rgba(255,255,255,0.95);
    border-radius: 30px;
    padding: 3rem 2rem;
    box-shadow: 0 20px 60px rgba(155,89,182,0.2);
    text-align: center;
}

.generator-title {
    font-family: 'Baloo 2', cursive;
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--deep-purple);
    margin-bottom: 0.5rem;
}

.generator-subtitle {
    color: #666;
    margin-bottom: 2rem;
}

.generator-input-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 500px) {
    .generator-input-container {
        flex-direction: row;
    }
}

.generator-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 3px solid var(--soft-lavender);
    border-radius: 50px;
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.generator-input:focus {
    border-color: var(--deep-purple);
    box-shadow: 0 0 20px rgba(155,89,182,0.3);
}

.generate-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--banana-yellow), var(--banana-gold));
    border: none;
    border-radius: 50px;
    font-family: 'Baloo 2', cursive;
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a2c4a;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(255,195,0,0.3);
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255,195,0,0.4);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.generated-result {
    margin-top: 2rem;
}

.generated-image {
    max-width: 300px;
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    margin-bottom: 1rem;
}

.result-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.result-caption {
    font-style: italic;
    color: var(--deep-purple);
    font-size: 1.2rem;
}

.share-btn {
    padding: 0.75rem 1.5rem;
    background: var(--deep-purple);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: var(--magic-purple);
    transform: scale(1.05);
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, var(--deep-purple), #4a2c4a);
    color: #fff;
}

.footer-main {
    font-family: 'Baloo 2', cursive;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.footer-link {
    color: var(--banana-yellow);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--banana-gold);
}

.footer-sub {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Utility */
.hidden {
    display: none;
}