/* Auth-specific styles with esports gaming aesthetic */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--bg);
}

.auth-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(34, 211, 238, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(250, 204, 21, 0.15) 0%, transparent 50%);
    z-index: 0;
}

.auth-bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(12, 15, 24, 0.85) 1px, transparent 1px),
        linear-gradient(90deg, rgba(12, 15, 24, 0.85) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 1;
}

.auth-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 28rem;
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    margin: 2rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--text);
    font-size: 1.875rem;
    font-weight: 700;
}

.auth-logo img {
    width: 2.5rem;
    height: 2.5rem;
    margin-right: 0.75rem;
}

.auth-title {
    font-size: 1.875rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, var(--brand-delta), var(--brand-crown));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-subtitle {
    color: var(--muted);
    font-size: 1.125rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--surface) 92%, transparent);
    color: var(--text);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-delta);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand-delta) 30%, transparent);
}

.form-error {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.btn-auth {
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: none;
    background: linear-gradient(90deg, var(--brand-delta), var(--brand-crown));
    color: #0b1220;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-auth::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

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

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(34, 211, 238, 0.3);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--muted);
}

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

.auth-divider span {
    padding: 0 1rem;
    font-size: 0.875rem;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    font-size: 0.95rem;
}

.auth-link {
    color: var(--brand-delta);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: var(--brand-crown);
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--muted);
    font-size: 0.95rem;
}

/* Gaming decorative elements */
.auth-decoration {
    position: absolute;
    z-index: 1;
}

.decoration-1 {
    top: 10%;
    left: 10%;
    width: 80px;
    height: 80px;
    border: 2px solid var(--brand-delta);
    opacity: 0.3;
    transform: rotate(45deg);
}

.decoration-2 {
    bottom: 15%;
    right: 15%;
    width: 60px;
    height: 60px;
    border: 2px solid var(--brand-crown);
    opacity: 0.3;
    transform: rotate(45deg);
}

.decoration-3 {
    top: 20%;
    right: 20%;
    width: 40px;
    height: 40px;
    border: 2px solid var(--brand-delta);
    opacity: 0.2;
    transform: rotate(45deg);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .auth-card {
        padding: 1.5rem;
        margin: 1rem;
    }

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

    .auth-links {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
}

/* Dark mode adjustments */
:root[data-theme="dark"] .auth-bg-pattern {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

/* Animation for form elements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: fadeInUp 0.5s ease-out;
}

.form-group {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.btn-auth { animation-delay: 0.4s; }
.auth-links { animation-delay: 0.5s; }


/* Styles for account pages */
.auth-message-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 32rem;
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-lg);
    margin: 2rem;
    text-align: center;
}

.auth-message-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-delta), var(--brand-crown));
    color: #0b1220;
    font-size: 2.5rem;
}

.auth-message-title {
    font-size: 1.875rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--brand-delta), var(--brand-crown));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-message-text {
    color: var(--muted);
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.auth-message-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Form page specific styles */
.auth-form-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 32rem;
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    margin: 2rem;
}

.auth-form-title {
    font-size: 1.875rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-align: center;
    background: linear-gradient(90deg, var(--brand-delta), var(--brand-crown));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-form-subtitle {
    color: var(--muted);
    font-size: 1.125rem;
    text-align: center;
    margin-bottom: 2rem;
}

/* Responsive adjustments for message cards */
@media (max-width: 640px) {
    .auth-message-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .auth-message-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }

    .auth-message-title {
        font-size: 1.5rem;
    }

    .auth-message-actions {
        flex-direction: column;
    }

    .auth-form-card {
        padding: 1.5rem;
        margin: 1rem;
    }
}

/* Improved form field styling */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--surface) 92%, transparent);
    color: var(--text);
    font-size: 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--brand-delta);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand-delta) 30%, transparent),
                0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Style Django form fields specifically */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--surface) 92%, transparent);
    color: var(--text);
    font-size: 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--brand-delta);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand-delta) 30%, transparent),
                0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Form help text */
.form-help {
    font-size: 0.875rem;
    color: var(--muted);
    margin-top: 0.25rem;
}

/* Checkbox styling */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.form-check-input {
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.form-check-label {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.4;
}

/* Error list styling */
.errorlist {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
    color: var(--danger);
    font-size: 0.875rem;
}

.errorlist li {
    margin-bottom: 0.25rem;
}

/* Dark mode adjustments for form fields */
:root[data-theme="dark"] .form-input,
:root[data-theme="dark"] input[type="text"],
:root[data-theme="dark"] input[type="email"],
:root[data-theme="dark"] input[type="password"],
:root[data-theme="dark"] input[type="url"],
:root[data-theme="dark"] input[type="number"],
:root[data-theme="dark"] input[type="tel"],
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
    background: color-mix(in oklab, var(--surface) 85%, transparent);
    border-color: color-mix(in oklab, var(--border) 80%, transparent);
}