.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: var(--bg-main);
    overflow: hidden;
}

/* Animated Scrolling Background */
.auth-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('../images/games-grid-bg.png') repeat;
    background-size: 600px;
    opacity: 0.25;
    z-index: 0;
    animation: panBackground 60s linear infinite;
}

@keyframes panBackground {
    0% { background-position: 0 0; }
    100% { background-position: -600px -600px; }
}

/* Back Button */
.auth-back-btn {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 30px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideDown 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform: translateY(-20px);
    opacity: 0;
}

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

.auth-back-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.8);
    transform: translateX(-4px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.auth-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    padding: 24px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    animation: fadeInDown 0.6s ease forwards;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-logo span {
    color: var(--primary-color);
    text-shadow: var(--shadow-glow);
}

/* Card Popup Animation */
.auth-card {
    background: #111111;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform: scale(0.95);
    opacity: 0;
}

@keyframes popIn {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

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

.auth-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

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

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.auth-input {
    width: 100%;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: var(--radius-sm);
    padding: 12px 14px 12px 42px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color), 0 0 15px rgba(34, 197, 94, 0.15);
    transform: translateX(4px);
    background: #1f1f23;
}

.auth-input:focus + svg {
    color: var(--primary-color);
}

/* Neon Button Animation */
.btn-neon {
    width: 100%;
    background: linear-gradient(90deg, #00f260, #00d050);
    color: #000;
    font-weight: 800;
    padding: 14px;
    border-radius: var(--radius-sm);
    border: none;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
    box-shadow: 0 0 15px rgba(0, 242, 96, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-neon::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-neon:hover {
    box-shadow: 0 0 25px rgba(0, 242, 96, 0.6);
    transform: translateY(-2px);
}

.btn-neon:hover::after {
    transform: rotate(45deg) translateX(100%);
}

.btn-neon:active {
    transform: translateY(0);
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #27272a;
}

.auth-divider::before {
    margin-right: 16px;
}

.auth-divider::after {
    margin-left: 16px;
}

/* Social Buttons Animation */
.social-btn {
    width: 100%;
    background: #18181b;
    border: 1px solid #27272a;
    color: var(--text-primary);
    padding: 12px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.social-btn:hover {
    background: #27272a;
    transform: translateY(-2px);
    border-color: #3f3f46;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.social-btn:active {
    transform: translateY(0);
}

.auth-footer {
    text-align: center;
    margin-top: 32px;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: #4ade80;
    text-decoration: underline;
}

/* View transitions for form toggle */
.view-register, .view-login {
    display: none;
    opacity: 0;
}

.view-register.active, .view-login.active {
    display: block;
    animation: fadeFormIn 0.4s ease forwards;
}

@keyframes fadeFormIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
