:root {
    --bg-color: #fdfdfd;
    --text-color: #050505;
    --text-muted: #666666;
    --accent-purple: #9b72ff;
    --accent-green: #b4ff8c;
    --accent-blue: #8ba6ff;

    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);

    --input-bg: rgba(0, 0, 0, 0.03);
    --input-border: rgba(0, 0, 0, 0.1);
    --input-focus: rgba(155, 114, 255, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Background Blobs for theme consistency */
.bg-shape {
    position: absolute;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.6;
    border-radius: 50%;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-purple);
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-green);
    bottom: -150px;
    right: 10%;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: var(--accent-blue);
    top: 20%;
    right: -50px;
}

/* Auth Container */
.auth-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 460px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s, transform 0.2s;
    align-self: flex-start;
}

.back-link:hover {
    color: var(--text-color);
    transform: translateX(-3px);
}

/* The Glass Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.08);
    border-radius: 28px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

/* Tabs */
.tab-controls {
    display: flex;
    position: relative;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s;
}

.tab-btn.active {
    color: var(--text-color);
}

.tab-indicator {
    position: absolute;
    bottom: -2px;
    left: 0;
    height: 2px;
    width: 50%;
    background-color: var(--text-color);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Forms */
.auth-form {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.auth-form.active-form {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h2 {
    font-family: 'Syne', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 0.5rem;
}

.form-desc {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

/* Inputs */
.input-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
}

.rules {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

input {
    width: 100%;
    padding: 1rem 1.2rem;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text-color);
    outline: none;
    transition: all 0.2s;
}

input:focus {
    background-color: #fff;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 4px var(--input-focus);
}

/* Submit Button */
.submit-btn {
    width: 100%;
    margin-top: 1rem;
    padding: 1.2rem;
    background-color: var(--text-color);
    color: var(--bg-color);
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Feedback message */
.form-feedback {
    margin-top: 1.5rem;
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
    min-height: 1.5rem;
    /* Reserve space */
}

.success-text {
    color: #2e7d32;
}

.error-text {
    color: #d32f2f;
}

.discord-btn {
    margin-top: 0.6rem;
    display: inline-flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    background: #5865f2;
    color: #ffffff;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.discord-btn:hover {
    background: #4752c4;
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(88, 101, 242, 0.3);
}

.legal-footer {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 14px;
}

.legal-footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.83rem;
    font-weight: 500;
}

.legal-footer a:hover {
    color: var(--text-color);
}

@media (max-width: 480px) {
    .glass-panel {
        padding: 2rem;
    }

    h2 {
        font-size: 2rem;
    }
}
