/* ================================
   CSS Variables - Bright & Energetic Colors
   ================================ */
:root {
    --color-primary: #FF6B35;
    --color-secondary: #F7B801;
    --color-accent: #00D9FF;
    --color-success: #6BCF7F;
    --color-purple: #9B51E0;
    --color-pink: #FF6BCB;

    --color-bg: #FFF8F0;
    --color-bg-alt: #FFF4E6;
    --color-text: #2D3748;
    --color-text-light: #4A5568;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);

    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
    --transition-slow: 0.6s ease;
}

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

body {
    font-family: 'Fredoka', sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* ================================
   Rain Effect
   ================================ */
.rain-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.rain-container.active {
    opacity: 1;
}

.raindrop {
    position: absolute;
    width: 2px;
    height: 20px;
    background: linear-gradient(to bottom, transparent, rgba(0, 217, 255, 0.6), rgba(0, 217, 255, 0.9));
    animation: fall linear infinite;
    border-radius: 50%;
}

@keyframes fall {
    0% {
        transform: translateY(-100px);
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Splash effect when rain hits */
.splash {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(0, 217, 255, 0.4);
    border-radius: 50%;
    animation: splash 0.5s ease-out forwards;
}

@keyframes splash {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* ================================
   Animated Background
   ================================ */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #FFE8D6 0%, #FFDAB9 50%, #FFD6E8 100%);
    overflow: hidden;
}

.sun {
    position: absolute;
    top: 80px;
    right: 120px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, #FDB813 0%, #FF9F1C 100%);
    border-radius: 50%;
    box-shadow: 0 0 60px rgba(253, 184, 19, 0.6);
    animation: pulse 4s ease-in-out infinite;
}

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

.cloud {
    position: absolute;
    background: white;
    border-radius: 100px;
    opacity: 0.7;
    animation: float linear infinite;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 100px;
}

.cloud1 {
    width: 100px;
    height: 40px;
    top: 100px;
    left: -120px;
    animation-duration: 35s;
}

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

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

.cloud2 {
    width: 80px;
    height: 35px;
    top: 200px;
    left: -100px;
    animation-duration: 45s;
    animation-delay: 5s;
}

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

.cloud2::after {
    width: 50px;
    height: 30px;
    top: -12px;
    right: 15px;
}

.cloud3 {
    width: 120px;
    height: 45px;
    top: 300px;
    left: -140px;
    animation-duration: 40s;
    animation-delay: 12s;
}

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

.cloud3::after {
    width: 70px;
    height: 40px;
    top: -18px;
    right: 20px;
}

@keyframes float {
    0% {
        left: -200px;
    }
    100% {
        left: calc(100% + 200px);
    }
}

/* ================================
   Hero Section
   ================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 80px;
    gap: 60px;
    position: relative;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    animation: slideInLeft 1s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-title {
    font-family: 'Righteous', cursive;
    font-size: 120px;
    line-height: 0.9;
    margin-bottom: 20px;
    color: var(--color-primary);
    text-shadow: 4px 4px 0 var(--color-secondary);
    display: flex;
    flex-direction: column;
}

.title-line {
    display: block;
    animation: bounceIn 0.8s ease-out backwards;
}

.title-line:nth-child(1) {
    animation-delay: 0.2s;
}

.title-line:nth-child(2) {
    animation-delay: 0.4s;
    margin-left: 40px;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-10deg);
    }
    50% {
        transform: scale(1.05) rotate(2deg);
    }
    70% {
        transform: scale(0.95) rotate(-1deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.hero-tagline {
    font-family: 'Baloo 2', cursive;
    font-size: 42px;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 24px;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
    animation: slideInLeft 1s ease-out 0.6s backwards;
}

.hero-description {
    font-size: 24px;
    line-height: 1.6;
    color: var(--color-text-light);
    margin-bottom: 48px;
    font-weight: 400;
    animation: slideInLeft 1s ease-out 0.8s backwards;
}

/* ================================
   Login Button
   ================================ */
.login-btn,
.cta-btn {
    font-family: 'Baloo 2', cursive;
    font-size: 28px;
    font-weight: 700;
    padding: 24px 48px;
    border: none;
    border-radius: 60px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-medium);
    display: inline-flex;
    align-items: center;
    gap: 16px;
    animation: slideInLeft 1s ease-out 1s backwards;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover,
.cta-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: var(--shadow-xl);
}

.login-btn:active,
.cta-btn:active {
    transform: translateY(-2px) scale(1.02);
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-icon {
    font-size: 32px;
    transition: transform var(--transition-medium);
}

.login-btn:hover .btn-icon,
.cta-btn:hover .btn-icon {
    transform: rotate(20deg) scale(1.2);
}

/* ================================
   Hero Visual - Weather Showcase
   ================================ */
.hero-visual {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slideInRight 1s ease-out 0.6s backwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.weather-showcase {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
}

.showcase-card {
    background: white;
    border-radius: 24px;
    padding: 32px 40px;
    min-width: 280px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 24px;
    transition: all var(--transition-medium);
    animation: float-card 3s ease-in-out infinite;
}

.showcase-card:nth-child(1) {
    animation-delay: 0s;
    transform: translateX(0);
}

.showcase-card:nth-child(2) {
    animation-delay: 1s;
    transform: translateX(40px);
}

.showcase-card:nth-child(3) {
    animation-delay: 2s;
    transform: translateX(20px);
}

@keyframes float-card {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(1deg);
    }
}

.showcase-card:hover {
    transform: translateY(-8px) rotate(-2deg) scale(1.05);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    font-size: 64px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

.card-temp {
    font-family: 'Baloo 2', cursive;
    font-size: 48px;
    font-weight: 800;
    color: var(--color-text);
}

.card-label {
    font-family: 'Space Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-light);
}

.sunny .card-temp {
    color: var(--color-secondary);
}

.rainy .card-temp {
    color: var(--color-accent);
}

.cloudy .card-temp {
    color: var(--color-purple);
}

/* ================================
   Features Section
   ================================ */
.features {
    padding: 120px 80px;
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}

.features-title {
    font-family: 'Righteous', cursive;
    font-size: 64px;
    text-align: center;
    color: var(--color-primary);
    margin-bottom: 16px;
    text-shadow: 2px 2px 0 var(--color-secondary);
}

.features-subtitle {
    font-size: 24px;
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 80px;
    font-weight: 400;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-medium);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 72px;
    margin-bottom: 24px;
    display: inline-block;
    animation: bounce-gentle 2s ease-in-out infinite;
}

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

.feature-card:nth-child(1) .feature-icon { animation-delay: 0s; }
.feature-card:nth-child(2) .feature-icon { animation-delay: 0.2s; }
.feature-card:nth-child(3) .feature-icon { animation-delay: 0.4s; }
.feature-card:nth-child(4) .feature-icon { animation-delay: 0.6s; }
.feature-card:nth-child(5) .feature-icon { animation-delay: 0.8s; }
.feature-card:nth-child(6) .feature-icon { animation-delay: 1s; }

.feature-title {
    font-family: 'Baloo 2', cursive;
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 16px;
}

.feature-description {
    font-size: 18px;
    line-height: 1.6;
    color: var(--color-text-light);
    font-weight: 400;
}

/* ================================
   CTA Section
   ================================ */
.cta {
    padding: 120px 80px;
    text-align: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-purple) 100%);
}

.cta-title {
    font-family: 'Righteous', cursive;
    font-size: 56px;
    color: white;
    margin-bottom: 40px;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 34px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.login-btn[href] {
    text-decoration: none;
    cursor: pointer;
}

.login-btn[href]:visited {
    color: white;
}

.cta-btn {
    background: white;
    color: var(--color-primary);
}

.cta-btn:hover {
    background: var(--color-bg);
}

/* ================================
   Footer
   ================================ */
.footer {
    padding: 40px 80px;
    text-align: center;
    background: var(--color-text);
    color: white;
    font-family: 'Space Mono', monospace;
    font-size: 14px;
}

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 1200px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 40px 40px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-title {
        font-size: 80px;
    }

    .title-line:nth-child(2) {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 20px;
    }

    .hero-title {
        font-size: 56px;
    }

    .hero-tagline {
        font-size: 28px;
    }

    .hero-description {
        font-size: 18px;
    }

    .login-btn,
    .cta-btn {
        font-size: 22px;
        padding: 20px 36px;
    }

    .features {
        padding: 60px 20px;
    }

    .features-title {
        font-size: 40px;
    }

    .features-subtitle {
        font-size: 18px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .cta {
        padding: 60px 20px;
    }

    .cta-title {
        font-size: 36px;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 36px;
    }

    .login-btn {
        width: 100%;
        max-width: 320px;
    }

    .footer {
        padding: 30px 20px;
        font-size: 12px;
    }

    .sun {
        width: 80px;
        height: 80px;
        top: 60px;
        right: 60px;
    }
}

/* ================================
   Login Modal
   ================================ */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-backdrop:not(.hidden) {
    opacity: 1;
}

.modal-backdrop.hidden {
    pointer-events: none;
}

.login-modal {
    background: white;
    border-radius: 32px;
    max-width: 900px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    transform: scale(0.7);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.modal-backdrop:not(.hidden) .login-modal {
    transform: scale(1);
    opacity: 1;
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

.modal-close-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 50%;
    color: var(--color-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all var(--transition-medium);
}

.modal-close-btn:hover {
    background: var(--color-primary);
    color: white;
    transform: rotate(90deg) scale(1.1);
}

.modal-content-wrapper {
    display: flex;
    min-height: 500px;
}

/* Left Side - Frog Image */
.modal-left {
    flex: 1;
    background: linear-gradient(135deg, #FFE8D6 0%, #FFD6E8 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}

.modal-left::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

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

.frog-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.frog-caption {
    font-family: 'Baloo 2', cursive;
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin-top: 24px;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Right Side - Login Form */
.modal-right {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-title {
    font-family: 'Righteous', cursive;
    font-size: 48px;
    color: var(--color-primary);
    margin-bottom: 12px;
    text-shadow: 2px 2px 0 rgba(247, 184, 1, 0.3);
}

.modal-subtitle {
    font-family: 'Fredoka', sans-serif;
    font-size: 18px;
    color: var(--color-text-light);
    margin-bottom: 40px;
    font-weight: 400;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-family: 'Baloo 2', cursive;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

.form-input {
    font-family: 'Fredoka', sans-serif;
    font-size: 18px;
    padding: 16px 20px;
    border: 3px solid var(--color-bg-alt);
    border-radius: 16px;
    background: var(--color-bg);
    color: var(--color-text);
    transition: all var(--transition-medium);
    outline: none;
}

.form-input:focus {
    border-color: var(--color-accent);
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 217, 255, 0.1);
    transform: translateY(-2px);
}

.form-input::placeholder {
    color: #A0AEC0;
}

/* Submit Button - Frog Hop Animation! */
.submit-btn {
    font-family: 'Baloo 2', cursive;
    font-size: 24px;
    font-weight: 700;
    padding: 18px 36px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #6BCF7F 0%, #4CAF50 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

/* THE IMPRESSIVE FROG HOP ANIMATION! */
.submit-btn:hover {
    animation: frog-hop 1.2s ease-in-out;
}

@keyframes frog-hop {
    /* First big hop */
    0% {
        transform: translateY(0) scaleY(1) scaleX(1);
    }
    5% {
        /* Squash before jump */
        transform: translateY(0) scaleY(0.8) scaleX(1.1);
    }
    15% {
        /* High in the air, stretched */
        transform: translateY(-40px) scaleY(1.15) scaleX(0.9) rotate(-3deg);
    }
    25% {
        /* Landing squash */
        transform: translateY(0) scaleY(0.75) scaleX(1.15) rotate(0deg);
    }

    /* Second medium hop */
    30% {
        transform: translateY(0) scaleY(0.85) scaleX(1.08);
    }
    40% {
        transform: translateY(-25px) scaleY(1.1) scaleX(0.95) rotate(2deg);
    }
    50% {
        transform: translateY(0) scaleY(0.8) scaleX(1.1) rotate(0deg);
    }

    /* Third small hop */
    55% {
        transform: translateY(0) scaleY(0.9) scaleX(1.05);
    }
    65% {
        transform: translateY(-12px) scaleY(1.05) scaleX(0.98) rotate(-1deg);
    }
    75% {
        transform: translateY(0) scaleY(0.9) scaleX(1.05) rotate(0deg);
    }

    /* Settle */
    85% {
        transform: translateY(0) scaleY(1.02) scaleX(0.98);
    }
    100% {
        transform: translateY(0) scaleY(1) scaleX(1);
    }
}

/* Add bounce to the icon during hover */
.submit-btn:hover .btn-icon {
    animation: icon-bounce 1.2s ease-in-out;
}

@keyframes icon-bounce {
    0%, 25%, 50%, 75%, 100% {
        transform: scale(1) rotate(0deg);
    }
    15% {
        transform: scale(1.3) rotate(-10deg);
    }
    40% {
        transform: scale(1.2) rotate(8deg);
    }
    65% {
        transform: scale(1.15) rotate(-5deg);
    }
}

.submit-btn:active {
    transform: scale(0.95);
}

/* Cancel Button */
.cancel-btn {
    font-family: 'Fredoka', sans-serif;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--color-text-light);
    cursor: pointer;
    transition: all var(--transition-medium);
    border-radius: 12px;
}

.cancel-btn:hover {
    background: var(--color-bg);
    color: var(--color-text);
    transform: translateY(-2px);
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content-wrapper {
        flex-direction: column;
    }

    .modal-left {
        padding: 40px 30px;
    }

    .frog-image {
        max-width: 200px;
    }

    .modal-right {
        padding: 40px 30px;
    }

    .modal-title {
        font-size: 36px;
    }

    .modal-subtitle {
        font-size: 16px;
    }

    .submit-btn {
        font-size: 20px;
        padding: 16px 32px;
    }

    .modal-close-btn {
        width: 40px;
        height: 40px;
        top: 16px;
        right: 16px;
    }
}
