/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #090909;
    color: #fff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    transition: background-color 1s ease;
}

/* Particles container */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    background: #FFD21A;
    border-radius: 50%;
    opacity: 0.7;
    animation: float 15s infinite linear;
    box-shadow: 0 0 10px rgba(255, 210, 26, 0.8);
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-100vh) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* Main container */
.container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    height: 80vh;
    gap: 50px;
    position: relative;
    z-index: 10;
}

/* Moon wrapper - now in top left corner with fade-in animation */
.moon-wrapper {
    position: absolute;
    top: 30px;
    left: 30px;
    width: 240px; /* 3 times bigger than original 80px */
    height: 240px; /* 3 times bigger than original 80px */
    display: flex;
    align-items: center;
    justify-content: center;
    animation: moonFadeIn 2s ease-out forwards;
    opacity: 0;
    z-index: 20;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.moon-wrapper:hover {
    transform: scale(1.05);
}

@keyframes moonFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* SVG Moon */
.moon-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 15px rgba(255, 210, 26, 0.7));
    transition: all 0.8s ease;
}

/* Moon light effect - golden glow */
.moon-light {
    position: absolute;
    width: 360px; /* 3 times bigger than original 120px */
    height: 360px; /* 3 times bigger than original 120px */
    background: radial-gradient(circle, rgba(255, 210, 26, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    animation: moonGlowPulse 3s infinite alternate;
    opacity: 0;
    z-index: 15;
}

.moon-wrapper:hover .moon-light {
    opacity: 1;
}

@keyframes moonGlowPulse {
    0% { transform: scale(0.8); opacity: 0.3; }
    100% { transform: scale(1.2); opacity: 0.6; }
}

/* Form container - compact version */
.form-container {
    background: rgba(20, 20, 30, 0.7);
    backdrop-filter: blur(12px);
    border-radius: 15px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    padding: 30px;
    width: 100%;
    max-width: 320px;
    transform: translateX(30px);
    opacity: 0;
    transition: all 1.2s ease;
    /* Initially hidden */
    animation: none;
    z-index: 30;
}

/* Animation will be triggered by JavaScript after moon click */
.form-container.show {
    animation: formAppear 1.2s ease-out forwards;
    opacity: 0;
    transform: translateX(30px);
}

@keyframes formAppear {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation for hiding form */
.form-container.hide {
    animation: formHide 1.2s ease-out forwards;
    opacity: 1;
    transform: translateX(30px);
}

@keyframes formHide {
    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

.form-wrapper {
    text-align: center;
}

.form-wrapper h1 {
    font-size: 24px;
    margin-bottom: 8px;
    color: #fff;
    animation: fadeInUp 0.8s ease-out;
}

.form-wrapper p {
    color: #aaa;
    margin-bottom: 20px;
    font-size: 13px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Input groups */
.input-group {
    position: relative;
    margin-bottom: 15px;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.input-group i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #FFD21A;
    font-size: 14px;
}

.input-group input {
    width: 100%;
    padding: 12px 12px 12px 35px;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    font-size: 14px;
    color: #fff;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-bottom-color: #FFD21A;
    box-shadow: 0 2px 0 0 rgba(255, 210, 26, 0.3);
}

.input-group label {
    position: absolute;
    top: 12px;
    left: 35px;
    color: #aaa;
    pointer-events: none;
    transition: all 0.3s ease;
    font-size: 14px;
    transform: translateY(0);
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
    top: -10px;
    font-size: 10px;
    color: #FFD21A;
}

.underline {
    position: absolute;
    bottom: 0;
    left: 35px;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, #FFD21A, #FF8C00);
    transition: width 0.5s ease;
    z-index: 2;
}

.input-group input:focus ~ .underline {
    width: calc(100% - 35px);
}

.password-group .toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.password-group .toggle-password:hover {
    color: #FFD21A;
}

/* Login button */
.login-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #FFD21A, #FF8C00);
    color: #090909;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(255, 210, 26, 0.3);
    margin-top: 15px;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 210, 26, 0.5);
    transition: all 0.3s ease;
}

.login-btn:active {
    transform: translateY(0);
    transition: all 0.1s ease;
}

/* Divider */
.divider {
    margin: 20px 0;
    position: relative;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.divider p {
    color: #aaa;
    font-size: 13px;
    position: relative;
    display: inline-block;
    padding: 0 12px;
    background: rgba(20, 20, 30, 0.7);
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

/* Social login */
.social-login {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease-out 1s both;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    font-size: 14px;
}

.social-btn.google {
    background: #DB4437;
    color: white;
}

.social-btn.github {
    background: #333;
    color: white;
}

.social-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
}

.social-btn:hover::before {
    transform: translateX(100%);
}

/* Signup link */
.signup-link {
    color: #aaa;
    font-size: 13px;
    animation: fadeInUp 0.8s ease-out 1.2s both;
}

.signup-link a {
    color: #FFD21A;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.signup-link a:hover {
    color: #FF8C00;
    text-decoration: underline;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive design */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
        height: auto;
        padding: 40px 20px;
        gap: 30px;
    }
    
    .form-container {
        max-width: 100%;
        margin-top: 0;
    }
    
    .moon-wrapper {
        transform: scale(0.8);
        bottom: -80px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 20px;
    }
    
    .form-container {
        padding: 25px 15px;
    }
    
    .social-login {
        gap: 12px;
    }
    
    .social-btn {
        width: 40px;
        height: 40px;
        font-size: 13px;
    }
    
    /* Adjust moon position for mobile */
    .moon-wrapper {
        top: 20px;
        left: 20px;
        width: 180px;
        height: 180px;
        bottom: -60px;
    }
    
    .moon-light {
        width: 270px;
        height: 270px;
    }
}

/* Additional animations for moon */
.moon-wrapper {
    animation-delay: 0.5s;
}

.moon-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 210, 26, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(20px);
    animation: moonGlowPulse 5s infinite alternate;
    opacity: 0;
}

@keyframes moonGlowPulse {
    0% { opacity: 0.3; transform: scale(0.8); }
    100% { opacity: 0.6; transform: scale(1.2); }
}

/* Sun animation */
.sun {
    animation: sunGlow 2s ease-in-out infinite alternate;
}

@keyframes sunGlow {
    0% { filter: drop-shadow(0 0 15px rgba(255, 210, 26, 0.7)); }
    100% { filter: drop-shadow(0 0 30px rgba(255, 210, 26, 0.9)); }
}