/* ========================================
   Auth Pages — 1xBet Concurso
   ======================================== */

:root {
    --bg-dark: #0D1B2A;
    --bg-card: #13243B;
    --bg-input: #0D1B2A;
    --border-color: #1E3A5F;
    --border-focus: #1A8FD1;
    --primary: #1A8FD1;
    --primary-light: #4FC3F7;
    --text-primary: #FFFFFF;
    --text-secondary: #8BA3C2;
    --text-muted: #5A7A9E;
    --error: #EF5350;
    --error-bg: rgba(239, 83, 80, 0.1);
    --success: #66BB6A;
    --google-bg: #FFFFFF;
    --google-text: #3C4043;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --glow: 0 0 20px rgba(26, 143, 209, 0.3);
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Exo 2', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background pattern */
.auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}

.auth::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(26, 143, 209, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(79, 195, 247, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Card */
.auth__card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow);
}

/* Logo */
.auth__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    margin-bottom: 1.5rem;
}

.auth__logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.auth__logo-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

/* Title */
.auth__title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.auth__subtitle {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

.auth__subtitle strong {
    color: var(--primary-light);
}

/* Form */
.auth__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Fields */
.auth__field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.auth__field--row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.auth__field--checkbox {
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
}

/* Labels */
.auth__form label:not(.auth__checkbox-label),
.auth__label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

/* Inputs */
.auth__input,
.auth__form input[type="text"],
.auth__form input[type="email"],
.auth__form input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Exo 2', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.auth__input:focus,
.auth__form input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(26, 143, 209, 0.15);
}

.auth__input::placeholder,
.auth__form input::placeholder {
    color: var(--text-muted);
}

/* Error state */
.auth__field--error .auth__input,
.auth__field--error input {
    border-color: var(--error);
}

.auth__field--error .auth__input:focus,
.auth__field--error input:focus {
    box-shadow: 0 0 0 3px rgba(239, 83, 80, 0.15);
}

/* Form errors */
.auth__form .form-error-message,
.auth__form ul li {
    color: var(--error);
    font-size: 0.8rem;
    margin-top: 0.15rem;
}

.auth__form ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth__error-global ul li {
    color: var(--error);
    font-size: 0.8rem;
}

/* Alert */
.auth__alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.auth__alert--error {
    background: var(--error-bg);
    border: 1px solid rgba(239, 83, 80, 0.3);
    color: var(--error);
}

/* Checkbox */
.auth__checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    user-select: none;
}

.auth__checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.auth__checkbox-custom {
    display: inline-block;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 1.5px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-input);
    transition: all 0.2s;
    position: relative;
}

.auth__checkbox:checked + .auth__checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.auth__checkbox:checked + .auth__checkbox-custom::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.auth__checkbox:focus + .auth__checkbox-custom {
    box-shadow: 0 0 0 3px rgba(26, 143, 209, 0.15);
}

.auth__link--inline {
    color: var(--primary-light);
    text-decoration: none;
}

.auth__link--inline:hover {
    text-decoration: underline;
}

/* Buttons */
.auth__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.auth__btn--primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: var(--glow);
    margin-top: 0.5rem;
}

.auth__btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(26, 143, 209, 0.5);
}

.auth__btn--primary:active {
    transform: translateY(0);
}

.auth__btn--google {
    background: var(--google-bg);
    color: var(--google-text);
    font-family: 'Exo 2', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid #dadce0;
}

.auth__btn--google:hover {
    background: #f7f8f8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Twitch button */
.auth__btn--twitch {
    background: #9146FF;
    color: #FFFFFF;
    font-family: 'Exo 2', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid #9146FF;
}

.auth__btn--twitch:hover {
    background: #7c2ff0;
    box-shadow: 0 2px 12px rgba(145, 70, 255, 0.35);
}

.auth__btn--twitch .auth__btn-icon {
    width: 20px;
    height: 20px;
}

.auth__btn--twitch .auth__btn-icon path {
    fill: #FFFFFF;
}

/* OAuth buttons row */
.auth__oauth-row {
    display: flex;
    gap: 0.75rem;
}

.auth__oauth-row .auth__btn {
    flex: 1;
    min-width: 0;
}

.auth__btn-icon {
    width: 20px;
    height: 20px;
}

/* Divider */
.auth__divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0;
}

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

.auth__divider span {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Links */
.auth__link {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

.auth__link--small {
    font-size: 0.8rem;
    font-weight: 400;
}

/* Footer text */
.auth__footer-text {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 480px) {
    .auth {
        padding: 1rem 0.75rem;
    }

    .auth__card {
        padding: 2rem 1.25rem;
        border-radius: var(--radius-sm);
    }

    .auth__title {
        font-size: 1.5rem;
    }

    .auth__field--row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .auth__card {
        max-width: 400px;
    }
}

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

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