/**
 * Authentication screen styles for multi-user airline management system.
 * Dark theme optimized for aviation/gaming aesthetic.
 */

/* Authentication Screen Container */
#authScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: clamp(32px, 7vw, 140px);
    z-index: 9999;
    font-family: 'Segoe UI', Inter, system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
}

/* Background image with subtle Ken Burns */
.auth-bg {
    position: absolute;
    inset: 0;
    /* User image (force direct file, not random) */
    background-image: url('https://unsplash.com/photos/Su1gc1A63xE/download?force=true&w=1920');
    background-size: cover;
    background-position: center 40%;
    transform: scale(1.05);
    filter: saturate(1.05) brightness(0.72);
    animation: kenburns 18s ease-in-out infinite alternate;
}

.auth-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(1200px 600px at 70% 30%, rgba(0, 212, 255, 0.15), transparent 60%),
                radial-gradient(900px 500px at 20% 70%, rgba(255, 255, 255, 0.12), transparent 60%),
                linear-gradient(135deg, rgba(10, 16, 30, 0.6), rgba(10, 16, 30, 0.8));
}

/* Subtle world map / network overlay */
/* Map overlay removed per request */

@keyframes slowpan {
    0% { transform: translate3d(0,0,0) scale(1.02); }
    100% { transform: translate3d(-1.5%, 0, 0) scale(1.05); }
}

/* Executive figure overlay removed per request */

@keyframes kenburns {
    0% { transform: scale(1.10) translate3d(0,0,0); }
    100% { transform: scale(1.20) translate3d(0, -1.5%, 0); }
}

/* Centered auth card */
.auth-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
    padding: 2.25rem 2rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 20px 60px rgba(0,0,0,0.45);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: #fff;
    text-align: center;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.2rem;
    letter-spacing: 0.3px;
    margin-bottom: 0.5rem;
}
.brand i { color: #00d4ff; font-size: 1.4rem; }
.brand span { font-weight: 700; }

.tagline {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 1.75rem;
}

.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn-google img { width: 18px; height: 18px; }
.btn-google:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.12);
    box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}

.legal {
    margin-top: 1.25rem;
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Game Screen Container - Full viewport height with flexbox layout */
#gameScreen {
    width: 100%;
    height: 100dvh; /* dynamic viewport height for large/hi-DPI screens */
    display: flex;
    flex-direction: column;
}

/* Ensure the app container takes full height */
#app {
    height: 100dvh; /* align with gameScreen to prevent 1px gaps */
    display: flex;
    flex-direction: column;
}

/* Authentication Container */
/* Legacy container (not used now) */
.auth-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem;
    min-width: 400px;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    color: white;
    text-align: center;
}

/* Logo and Title */
.auth-logo {
    margin-bottom: 2rem;
}

.auth-logo h1 {
    color: #00d4ff;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.auth-logo .subtitle {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 300;
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* Form Containers */
.auth-form-container {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ffffff;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Checkbox */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.form-check input[type=\"checkbox\"] {
    width: auto;
    margin-right: 0.5rem;
    transform: scale(1.2);
}

.form-check label {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00b8e6 0%, #0088bb 100%);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-outline-light {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Form Actions */
.form-actions {
    margin-top: 2rem;
}

.form-actions .btn {
    width: 100%;
    margin-bottom: 1rem;
}

/* Form Switch */
.form-switch {
    margin-top: 2rem;
    text-align: center;
}

.form-switch p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

.form-switch button {
    background: none;
    border: none;
    color: #00d4ff;
    cursor: pointer;
    text-decoration: underline;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.form-switch button:hover {
    color: #00b8e6;
}

/* Messages */
#authMessage {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: none;
    font-weight: 500;
}

.alert-success {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.alert-info {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.alert i {
    margin-right: 0.5rem;
}

/* User Info in Navigation */
#userInfo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#userInfo .airline-name {
    font-weight: 600;
    color: #00d4ff;
}

#userInfo .cash-balance {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        margin: 1rem;
        padding: 2rem;
        min-width: auto;
        max-width: 100%;
    }
    
    .auth-logo h1 {
        font-size: 2rem;
    }
    
    #userInfo {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Loading Animation */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Input Validation Styles */
.form-group input.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.2);
}

.form-group input.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.2);
}

.invalid-feedback {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.valid-feedback {
    color: #28a745;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Game Screen (hidden by default) */
#gameScreen {
    display: none;
}
