/* Authentication Page Styles */

.auth-container {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        180deg,
        #87CEEB 0%,
        #90D8F5 50%,
        #6AB8E8 65%,
        #5D9E31 65%,
        #4A8A21 72%,
        #866044 72%
    );
    padding: 20px;
}

.auth-wrapper {
    background: var(--bg-secondary);
    border-radius: 2px;
    box-shadow: 0 8px 0 rgba(0,0,0,0.35), 0 12px 40px rgba(0,0,0,0.4),
                inset 0 1px 0 rgba(255,255,255,0.3);
    border: 2px solid var(--border-color);
    max-width: 450px;
    width: 100%;
    padding: 40px;
    animation: slideInUp 0.5s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.auth-form h2 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 30px;
    font-family: 'Press Start 2P', monospace;
    font-size: 1.1rem;
    line-height: 1.5;
    text-shadow: 1px 1px rgba(0,0,0,0.15);
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 2px;
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.15);
}

.form-group input:focus {
    outline: none;
    border-color: var(--mc-grass, #5D9E31);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.15), 0 0 0 3px rgba(93, 158, 49, 0.2);
    background: var(--bg-secondary);
}

.form-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.btn-auth {
    width: 100%;
    padding: 14px;
    background: #5D9E31;
    color: white;
    border: none;
    border-radius: 2px;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
    font-weight: 400;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    margin-top: 20px;
    text-shadow: 1px 1px #000;
    box-shadow: inset -3px -4px 0 rgba(0,0,0,0.35), inset 3px 3px 0 rgba(255,255,255,0.15);
}

.btn-auth:hover {
    background: #6DBB3A;
    transform: translateY(-1px);
    box-shadow: inset -3px -4px 0 rgba(0,0,0,0.35), inset 3px 3px 0 rgba(255,255,255,0.2), 0 4px 12px rgba(93,158,49,0.4);
}

.btn-auth:active {
    transform: translateY(1px);
    box-shadow: inset -1px -2px 0 rgba(0,0,0,0.35);
}

.btn-auth:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-toggle {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.link-btn {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: inherit;
    padding: 0;
}

.link-btn:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Messages */
.error-message,
.success-message {
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 0.95rem;
    display: none;
    animation: fadeIn 0.3s ease;
}

.error-message {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.error-message.show,
.success-message.show {
    display: block;
}

.success-message {
    background-color: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 40px 20px;
}

.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-wrapper {
        padding: 25px;
    }

    .auth-form h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

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

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input {
        padding: 10px 12px;
        font-size: 0.95rem;
    }

    .btn-auth {
        padding: 11px;
        font-size: 0.95rem;
    }

    .auth-toggle {
        font-size: 0.9rem;
    }
}

/* Dark Theme */
[data-theme="dark"] .auth-wrapper {
    background: #2d2d2d;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .form-group input {
    background: #1a1a1a;
    color: #e0e0e0;
}

[data-theme="dark"] .form-group input:focus {
    background: #2d2d2d;
}