/* ==========================================================================
   SKYFALL V3 - AUTH PAGES STYLES
   Login, Register, Password Reset
   ========================================================================== */

/* Variables inherit from theme.css */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, #1a0a05 0%, #000000 100%);
    padding: 2rem;
}

/* Background Effects */
.auth-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(234, 88, 12, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(234, 88, 12, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black 0%, transparent 80%);
    animation: authGridPulse 4s ease-in-out infinite alternate;
}

@keyframes authGridPulse {
    0% { opacity: 0.5; }
    100% { opacity: 0.8; }
}

.auth-scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--sf-primary);
    box-shadow: 0 0 10px var(--sf-primary);
    animation: authScan 3s linear infinite;
    opacity: 0.3;
}

@keyframes authScan {
    0% { top: -10%; opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    100% { top: 110%; opacity: 0; }
}

/* Container */
.auth-container {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 10;
    perspective: 1000px;
}

.auth-card {
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.8);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

/* HUD Decorations */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--sf-primary), transparent);
}

.auth-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    z-index: 10;
    pointer-events: none;
    border: 1px solid transparent;
    background:
        linear-gradient(to right, var(--sf-primary) 2px, transparent 2px) 0 0,
        linear-gradient(to bottom, var(--sf-primary) 2px, transparent 2px) 0 0,
        linear-gradient(to left, var(--sf-primary) 2px, transparent 2px) 100% 0,
        linear-gradient(to bottom, var(--sf-primary) 2px, transparent 2px) 100% 0,
        linear-gradient(to right, var(--sf-primary) 2px, transparent 2px) 0 100%,
        linear-gradient(to top, var(--sf-primary) 2px, transparent 2px) 0 100%;
    background-size: 20px 20px;
    background-repeat: no-repeat;
}

/* Forms Transition */
.form-view {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-view.active {
    display: block;
    opacity: 1;
    animation: authFadeIn 0.5s ease forwards;
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Inputs */
.auth-input-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.auth-label {
    position: absolute;
    top: -0.6rem;
    left: 0;
    background: #0a0a0a;
    padding: 0 0.5rem;
    font-size: 0.75rem;
    color: var(--sf-primary);
    font-family: var(--sf-font);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.auth-input,
.auth-textarea,
.auth-select {
    width: 100%;
    background: rgba(10, 10, 10, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0;
    padding: 1rem;
    color: white !important;
    transition: all 0.3s ease;
    font-family: var(--sf-font);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.auth-textarea {
    min-height: 120px;
    resize: vertical;
}

.auth-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23EA580C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    padding-right: 2.5rem;
}

.auth-input:focus,
.auth-textarea:focus,
.auth-select:focus {
    outline: none !important;
    border-color: var(--sf-primary) !important;
    box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.15), inset 0 0 10px rgba(234, 88, 12, 0.1) !important;
    background: rgba(5, 5, 5, 0.95) !important;
    color: white !important;
}

.auth-input:focus-visible,
.auth-textarea:focus-visible,
.auth-select:focus-visible {
    outline: none !important;
}

.auth-input::placeholder,
.auth-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Autofill styling - override browser defaults */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus,
.auth-input:-webkit-autofill:active,
.auth-textarea:-webkit-autofill,
.auth-textarea:-webkit-autofill:hover,
.auth-textarea:-webkit-autofill:focus,
.auth-textarea:-webkit-autofill:active,
.auth-select:-webkit-autofill,
.auth-select:-webkit-autofill:hover,
.auth-select:-webkit-autofill:focus,
.auth-select:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px rgba(10, 10, 10, 0.95) inset !important;
    -webkit-text-fill-color: white !important;
    background-color: rgba(10, 10, 10, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    caret-color: white !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

/* Firefox autofill */
.auth-input:autofill,
.auth-textarea:autofill,
.auth-select:autofill {
    background-color: rgba(10, 10, 10, 0.95) !important;
    color: white !important;
}

.auth-select option {
    background: #0a0a0a;
    color: white;
    padding: 0.5rem;
}

/* Buttons */
.auth-btn {
    width: 100%;
    padding: 1rem;
    background: var(--sf-primary);
    color: white;
    font-weight: bold;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    border: 1px solid var(--sf-primary);
    cursor: pointer;
    box-shadow: 0 0 15px rgba(234, 88, 12, 0.2);
    position: relative;
    overflow: hidden;
    font-family: var(--sf-font);
}

.auth-btn:hover {
    background: #000;
    color: var(--sf-primary);
    box-shadow: 0 0 25px rgba(234, 88, 12, 0.4);
}

.auth-link {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    font-family: var(--sf-font);
    text-decoration: none;
    transition: color 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
    background: none;
    border: none;
    padding: 0;
}

.auth-link:hover {
    color: var(--sf-primary);
}

button.auth-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Auth Logo */
.auth-logo {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--sf-primary), #dc2626);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 0 20px rgba(234, 88, 12, 0.4);
}

.auth-logo span {
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
}

/* Checkbox styling */
.auth-checkbox {
    border-radius: 0.25rem;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.5);
    color: var(--sf-primary);
}

.auth-checkbox:focus {
    ring-color: var(--sf-primary);
}
