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

:root {
    --primary-gradient: linear-gradient(135deg, #2c5530 0%, #4a7c59 50%, #6b8e6b 100%);
    --secondary-gradient: linear-gradient(45deg, #8b7355 0%, #a8927a 100%);
    --dark-gradient: linear-gradient(135deg, #1a1f2e 0%, #2d3748 50%, #4a5568 100%);
    --accent-gradient: linear-gradient(45deg, #d4af37 0%, #f7ef8a 100%);
    --glass-bg: rgba(255, 255, 255, 0.98);
    --glass-border: rgba(44, 85, 48, 0.1);
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --accent-color: #2c5530;
    --accent-hover: #225026;
    --success-color: #38a169;
    --error-color: #e53e3e;
    --warning-color: #dd6b20;
    --light-bg: #f7fafc;
    --card-shadow: 0 20px 40px rgba(44, 85, 48, 0.08);
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    background: var(--dark-gradient);
    color: var(--text-primary);
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-primary);
    box-shadow: var(--card-shadow);
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(44, 85, 48, 0.15);
    background: white;
}

/* Language Selector */
.language-selector {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    box-shadow: var(--card-shadow);
}

.language-selector:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(44, 85, 48, 0.15);
    background: white;
}

/* Animated Background */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-gradient);
    z-index: -2;
}

.background::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 50%, rgba(44, 85, 48, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 115, 85, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(212, 175, 55, 0.1) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(-5%, 5%) scale(1.1);
    }
    50% {
        transform: translate(5%, -5%) scale(1.05);
    }
    75% {
        transform: translate(-3%, -3%) scale(1.08);
    }
}

/* Floating geometric shapes */
.floating-elements {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.floating-icon {
    position: absolute;
    color: rgba(255, 255, 255, 0.08);
    font-size: 3rem;
    animation: float 8s ease-in-out infinite;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.05), rgba(44, 85, 48, 0.1));
    animation: floatShape 12s ease-in-out infinite;
    backdrop-filter: blur(10px);
}

.floating-shape:nth-child(1) {
    width: 120px;
    height: 120px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    background: linear-gradient(45deg, rgba(44, 85, 48, 0.12), rgba(74, 124, 89, 0.08));
}

.floating-shape:nth-child(2) {
    width: 180px;
    height: 180px;
    top: 60%;
    right: 10%;
    animation-delay: 3s;
    background: linear-gradient(45deg, rgba(139, 115, 85, 0.1), rgba(168, 146, 122, 0.08));
}

.floating-shape:nth-child(3) {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation-delay: 6s;
    background: linear-gradient(45deg, rgba(212, 175, 55, 0.1), rgba(247, 239, 138, 0.08));
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
        opacity: 0.1;
    }
    25% {
        transform: translateY(-40px) rotate(5deg) scale(1.1);
        opacity: 0.2;
    }
    50% {
        transform: translateY(-20px) rotate(-5deg) scale(0.95);
        opacity: 0.15;
    }
    75% {
        transform: translateY(-50px) rotate(3deg) scale(1.05);
        opacity: 0.18;
    }
}

@keyframes floatShape {
    0%, 100% {
        transform: translateY(0px) scale(1) rotate(0deg);
        opacity: 0.1;
    }
    50% {
        transform: translateY(-60px) scale(1.25) rotate(180deg);
        opacity: 0.25;
    }
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    border-radius: 24px;
    padding: 50px;
    box-shadow:
        var(--card-shadow),
        0 0 0 1px rgba(44, 85, 48, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    width: 100%;
    max-width: 480px;
    animation: cardAppear 1s ease-out;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
    opacity: 0.9;
}

@keyframes cardAppear {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
        filter: blur(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0px);
    }
}

.logo-section {
    text-align: center;
    margin-bottom: 50px;
    animation: logoAppear 1.2s ease-out 0.3s both;
}

@keyframes logoAppear {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: var(--primary-gradient);
    border-radius: 25px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    animation: logoGlow 3s ease-in-out infinite alternate;
    box-shadow: 0 20px 40px rgba(44, 85, 48, 0.2);
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s linear infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

@keyframes logoGlow {
    0% {
        box-shadow: 0 0 30px rgba(44, 85, 48, 0.3);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 0 50px rgba(74, 124, 89, 0.4);
        transform: scale(1.02);
    }
}

.logo-icon i {
    font-size: 2.5rem;
    color: white;
    z-index: 1;
    position: relative;
}

.logo-text {
    font-size: 3rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.logo-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.8;
}

/* Alert Messages */
.alert-error {
    background: linear-gradient(135deg, rgba(229, 62, 62, 0.06), rgba(229, 62, 62, 0.03));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(229, 62, 62, 0.15);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    color: var(--error-color);
    animation: alertSlide 0.5s ease-out;
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: white;
}

.success-notification {
    background: linear-gradient(135deg, rgba(56, 161, 105, 0.06), rgba(56, 161, 105, 0.03));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(56, 161, 105, 0.15);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    color: var(--success-color);
    animation: alertSlide 0.5s ease-out;
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: white;
}

@keyframes alertSlide {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.form-group {
    margin-bottom: 30px;
    animation: formSlide 0.8s ease-out both;
}

.form-group:nth-child(1) {
    animation-delay: 0.6s;
}

.form-group:nth-child(2) {
    animation-delay: 0.8s;
}

@keyframes formSlide {
    0% {
        opacity: 0;
        transform: translateX(-30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 20px 60px 20px 20px;
    border: 2px solid rgba(44, 85, 48, 0.1);
    border-radius: 15px;
    font-size: 1.1rem;
    background: white;
    color: var(--text-primary);
    transition: all 0.4s ease;
    outline: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
}

.form-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-input:focus {
    border-color: var(--accent-color);
    background: white;
    transform: translateY(-3px);
    box-shadow:
        0 15px 35px rgba(44, 85, 48, 0.1),
        0 5px 15px rgba(0, 0, 0, 0.03);
}

.form-input:valid {
    border-color: rgba(56, 161, 105, 0.3);
}

.input-wrapper i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.form-input:focus+i,
.form-input:focus~i {
    color: var(--accent-color);
    transform: translateY(-50%) scale(1.1);
}

.password-toggle {
    cursor: pointer;
    right: 20px !important;
    padding: 5px;
}

.password-toggle:hover {
    color: var(--accent-color);
    transform: translateY(-50%) scale(1.2);
}

/* Advanced Options */
.advanced-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    animation: formSlide 0.8s ease-out 1s both;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-color);
    cursor: pointer;
}

.remember-me label {
    margin: 0;
    font-size: 0.95rem;
    cursor: pointer;
    font-weight: 400;
    color: var(--text-secondary);
}

.forgot-password a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.forgot-password a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.forgot-password a:hover::after {
    width: 100%;
}

.login-btn {
    width: 100%;
    padding: 22px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    animation: buttonSlide 0.8s ease-out 1.2s both;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 15px 30px rgba(44, 85, 48, 0.2);
}

.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.6s;
}

.login-btn:hover {
    transform: translateY(-4px);
    box-shadow:
        0 25px 50px rgba(44, 85, 48, 0.3),
        0 0 40px rgba(74, 124, 89, 0.2);
}

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

.login-btn:active {
    transform: translateY(-2px);
}

@keyframes buttonSlide {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Social Login Options */
.social-divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    animation: formSlide 0.8s ease-out 1.4s both;
}

.social-divider::before,
.social-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(44, 85, 48, 0.1);
}

.social-divider span {
    padding: 0 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    white-space: nowrap;
}

.social-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    animation: formSlide 0.8s ease-out 1.6s both;
}

.social-btn {
    flex: 1;
    padding: 15px;
    border: 2px solid rgba(44, 85, 48, 0.1);
    border-radius: 12px;
    background: white;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.social-btn:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 25px rgba(44, 85, 48, 0.1);
}

.signup-link {
    text-align: center;
    margin-top: 30px;
    color: var(--text-secondary);
    animation: formSlide 0.8s ease-out 1.8s both;
}

.signup-link a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
}

.signup-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.signup-link a:hover::after {
    width: 100%;
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .login-card {
        padding: 30px 25px;
        margin: 15px;
        border-radius: 20px;
    }

    .logo-text {
        font-size: 2.2rem;
    }

    .logo-icon {
        width: 80px;
        height: 80px;
    }

    .social-buttons {
        flex-direction: column;
    }

    .advanced-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .theme-toggle,
    .language-selector {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        margin-bottom: 20px;
    }

    .container {
        padding: 10px;
    }
}