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

:root {
    --candy-red: #FF4757;
    --sky-blue: #70A1FF;
    --sunny-yellow: #FFA502;
    --white: #FFFFFF;
    --light-pink: #FFE0E6;
    --light-blue: #E8F4FF;
    --light-yellow: #FFF5E0;
    --dark-gray: #2C3E50;
    --light-gray: #F8F9FA;
    --success-green: #2ED573;
    --error-red: #FF3838;
}

body {
    font-family: 'Comic Neue', cursive;
    background: linear-gradient(135deg, var(--light-pink) 0%, var(--light-blue) 50%, var(--light-yellow) 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background Elements */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-cupcake {
    position: absolute;
    font-size: 2rem;
    animation: float 6s ease-in-out infinite;
    opacity: 0.7;
}

.floating-cupcake:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.floating-cupcake:nth-child(2) { top: 20%; right: 15%; animation-delay: 2s; }
.floating-cupcake:nth-child(3) { bottom: 20%; left: 20%; animation-delay: 4s; }
.floating-cupcake:nth-child(4) { bottom: 30%; right: 10%; animation-delay: 1s; }

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

/* Navigation */
.navbar {
    width: 100%;
    background: linear-gradient(90deg, #60a5fa, #f9a8d4, #fde68a);
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-links li a {
    color: #ffffff;
    font-weight: 500;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease-in-out;
    padding: 5px 0;
}

.nav-links li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #60a5fa, #f9a8d4, #fde68a);
    border-radius: 5px;
    transition: width 0.4s ease;
}

.nav-links li a:hover::after {
    width: 100%;
}

.nav-links li a:hover {
    transform: translateY(-2px);
}

/* Scale Now Navigation Button */
.scale-nav-btn {
    background: linear-gradient(45deg, #60a5fa, #fde68a) !important;
    color: #ffffff !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(96, 165, 250, 0.3) !important;
    display: inline-block !important;
}

.scale-nav-btn:hover {
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.4) !important;
}

.scale-nav-btn::after {
    display: none !important;
}

.cta-btn {
    padding: 10px 20px;
    background: linear-gradient(45deg, #60a5fa, #f9a8d4, #fde68a);
    color: #ffffff;
    font-weight: bold;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.cta-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* Auth Container */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 71, 87, 0.1), transparent);
    animation: rotate 20s linear infinite;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.auth-card:hover::before {
    opacity: 1;
}

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

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.auth-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--candy-red), var(--sky-blue), var(--sunny-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: #666;
    font-size: 1.1rem;
    font-weight: 400;
}

/* Form Styles */
.auth-form {
    position: relative;
    z-index: 1;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.form-label i {
    color: var(--sky-blue);
    width: 16px;
}

.form-input {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-family: 'Comic Neue', cursive;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    color: var(--dark-gray);
}

.form-input:focus {
    outline: none;
    border-color: var(--sky-blue);
    box-shadow: 0 0 0 3px rgba(112, 161, 255, 0.2);
    background: rgba(255, 255, 255, 1);
}

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

.password-input-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    background: rgba(112, 161, 255, 0.1);
    color: var(--sky-blue);
}

.password-strength {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.password-strength.weak {
    color: var(--error-red);
}

.password-strength.medium {
    color: var(--sunny-yellow);
}

.password-strength.strong {
    color: var(--success-green);
}

.error-message {
    background: rgba(255, 56, 56, 0.1);
    border: 2px solid var(--error-red);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: var(--error-red);
    font-weight: 600;
    text-align: center;
    display: none;
    animation: shake 0.5s ease-in-out;
}

.error-message.show {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.auth-button {
    width: 100%;
    padding: 1.2rem;
    color: var(--white);
    border: none;
    border-radius: 20px;
    font-family: 'Comic Neue', cursive;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Login Button Styling */
#loginButton {
    background: linear-gradient(45deg, var(--sky-blue), var(--candy-red));
    box-shadow: 0 8px 25px rgba(112, 161, 255, 0.4);
}

#loginButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(112, 161, 255, 0.5);
}

/* Signup Button Styling */
#signupButton {
    background: linear-gradient(45deg, var(--candy-red), var(--sunny-yellow));
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

#signupButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.5);
}
/* .auth-button:hover removed because hover styles are handled individually above */

.auth-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.auth-footer p {
    color: #666;
    font-size: 1rem;
}

.auth-link {
    color: var(--sky-blue);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-link:hover {
    color: var(--candy-red);
    text-decoration: underline;
}

/* Different styling for login and signup links */
.login-link {
    background: linear-gradient(45deg, var(--sky-blue), var(--candy-red));
    -webkit-background-clip: text;
    color: black;
    background-clip: text;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    border: 2px solid transparent;
    background-origin: border-box;
    background-clip: padding-box, border-box;
    transition: all 0.3s ease;
}

.signup-link {
    background: linear-gradient(45deg, var(--candy-red), var(--sunny-yellow));
    -webkit-background-clip: text;
    color: black;
    background-clip: text;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    border: 2px solid transparent;
    background-origin: border-box;
    background-clip: padding-box, border-box;
    transition: all 0.3s ease;
}

.login-link:hover,
.signup-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: rgb(5, 27, 228);
}

/* User Info Display */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #0b0c6b;
    font-weight: 600;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, var(--candy-red), var(--sunny-yellow));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.logout-btn {
    background: linear-gradient(45deg, #ff4757, #ff3838) !important;
    color: #ffffff;
    border: none !important;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-family: 'Comic Neue', cursive;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3) !important;
}

.logout-btn:hover {
    background: linear-gradient(45deg, #ff3838, #ff2d2d) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .user-info {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    .scale-btn {
        order: -1;
        margin-bottom: 0.5rem;
    }

    .auth-container {
        padding: 1rem;
    }

    .auth-card {
        padding: 2rem;
    }

    .auth-title {
        font-size: 2rem;
    }

    .auth-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .form-input {
        padding: 0.8rem 1rem;
    }

    .auth-button {
        padding: 1rem;
        font-size: 1.1rem;
    }
}