@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #FF6B35;
    --primary-dark: #E55A2B;
    --primary-light: #FF8A5B;
    --bg-dark: #1a1d2e;
    --bg-darker: #141620;
    --bg-card: #2a2d3e;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Animated Background Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.particles::before,
.particles::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(255, 107, 53, 0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(0, 188, 212, 0.3), transparent),
        radial-gradient(2px 2px at 50% 50%, rgba(255, 193, 7, 0.2), transparent),
        radial-gradient(2px 2px at 80% 10%, rgba(255, 107, 53, 0.2), transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(0, 188, 212, 0.2), transparent),
        radial-gradient(2px 2px at 33% 50%, rgba(255, 193, 7, 0.3), transparent),
        radial-gradient(2px 2px at 79% 53%, rgba(255, 107, 53, 0.2), transparent);
    background-size: 200px 200px;
    background-position: 0 0, 40px 60px, 130px 270px, 70px 100px, 160px 220px, 90px 150px, 120px 180px;
    animation: particlesFloat 20s linear infinite;
}

.particles::after {
    animation-delay: -10s;
    opacity: 0.5;
}

@keyframes particlesFloat {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-200px);
    }
}

/* Login Container */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    padding: 20px;
}

.login-box {
    background: rgba(42, 45, 62, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
}

.login-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #00BCD4, #FFC107);
    border-radius: 20px 20px 0 0;
}

/* Logo */
.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo i {
    font-size: 60px;
    color: var(--primary);
    filter: drop-shadow(0 8px 20px rgba(255, 107, 53, 0.4));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.login-header p {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Form */
.login-form {
    margin-bottom: 30px;
}

.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-group input {
    width: 100%;
    padding: 16px 50px 16px 50px;
    background: rgba(20, 22, 32, 0.6);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(20, 22, 32, 0.8);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
}

.toggle-password {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary);
}

/* Buttons */
.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.login-btn:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.discord-btn {
    width: 100%;
    padding: 16px;
    background: rgba(88, 101, 242, 0.1);
    border: 2px solid rgba(88, 101, 242, 0.3);
    border-radius: 12px;
    color: #5865F2;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.discord-btn:hover {
    background: rgba(88, 101, 242, 0.2);
    border-color: rgba(88, 101, 242, 0.5);
    transform: translateY(-2px);
}

.discord-btn i {
    font-size: 20px;
}

/* Footer */
.login-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.login-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 15px;
    border-radius: 8px;
}

.login-footer a:hover {
    color: var(--primary);
    background: rgba(255, 107, 53, 0.1);
}

.login-footer a.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Copyright */
.copyright {
    position: fixed;
    bottom: 30px;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    z-index: 1;
}

.copyright a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.copyright a:hover {
    color: var(--primary-light);
}

/* Loading State */
.login-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.login-btn.loading span {
    display: none;
}

.login-btn.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error Message */
.error-message {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #f44336;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    display: none;
    animation: shake 0.3s ease;
}

.error-message.show {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Responsive */
@media (max-width: 768px) {
    .login-container {
        padding: 10px;
    }

    .login-box {
        padding: 40px 30px;
    }

    .login-header h1 {
        font-size: 28px;
    }

    .login-footer {
        flex-direction: column;
        gap: 10px;
    }

    .copyright {
        font-size: 12px;
        padding: 0 20px;
    }
}

/* Success Message */
.success-message {
    display: none;
    background: rgba(88, 214, 141, 0.1);
    border: 1px solid rgba(88, 214, 141, 0.3);
    color: #58D68D;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.success-message.show {
    display: block;
    animation: slideIn 0.3s ease;
}
