:root {
    --bg-darker: #050812;
    --bg-main: #0b0f1a;
    --bg-panel: #151b2b;
    --text-main: #e6e9f5;
    --text-muted: #94a3b8;
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --discord-color: #5865F2;
    --discord-hover: #4752C4;
    --border-color: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(0, 0, 0, 0.3);
    --danger: #ef4444;
    --success: #10b981;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-darker);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.15), transparent 25%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: cover, cover, 30px 30px, 30px 30px;
    background-attachment: fixed;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
}

/* Authentication Wrapper */
.auth-wrapper {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.auth-container {
    background: rgba(21, 27, 43, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header .logo-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.5));
}

.auth-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.auth-header .highlight {
    color: var(--primary-color);
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Tabs */
.auth-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 5px;
    margin-bottom: 25px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    padding: 12px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: var(--bg-panel);
    color: var(--text-main);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Forms */
.auth-form {
    display: none;
    animation: fadeIn 0.4s ease;
}

.auth-form.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i:first-child {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.input-wrapper input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 15px 14px 45px;
    color: var(--text-main);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: rgba(0, 0, 0, 0.5);
}

.toggle-password {
    position: absolute;
    right: 15px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: var(--text-main);
}

/* Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    cursor: pointer;
}

.remember-me input {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Buttons */
.btn-primary {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-discord {
    width: 100%;
    background: var(--discord-color);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-discord:hover {
    background: var(--discord-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.auth-divider span {
    padding: 0 15px;
}

/* 2FA Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

.modal-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.modal-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.tfa-input-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
}

.tfa-digit {
    width: 45px;
    height: 55px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    transition: all 0.2s;
}

.tfa-digit:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.5);
}

.tfa-separator {
    color: var(--text-muted);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 5px;
}

.btn-secondary {
    width: 100%;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}