/* Authentication Screen Styles */

.auth-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.auth-container {
    background: rgba(13, 13, 13, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 215, 0, 0.2);
    max-width: 400px;
    width: 100%;
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
}

.game-logo {
    font-size: 2.5em;
    font-weight: 900;
    background: linear-gradient(45deg, #ffd700, #ff6b35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.game-subtitle {
    color: #888;
    margin-bottom: 30px;
    font-size: 0.9em;
}

.form-container {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ffd700;
    font-weight: 600;
    font-size: 0.9em;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #ffd700;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group input:invalid {
    border-color: rgba(244, 67, 54, 0.5);
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(45deg, #ffd700, #ff6b35);
    color: #000;
    font-weight: 700;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.3);
}

.btn-google {
    background: #ffffff;
    color: #333;
    font-weight: 600;
}

.btn-google:hover:not(:disabled) {
    background: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: #ffd700;
    border: 2px solid #ffd700;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 215, 0, 0.1);
}

.google-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.divider {
    margin: 25px 0;
    position: relative;
    text-align: center;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.divider span {
    background: rgba(13, 13, 13, 0.95);
    padding: 0 15px;
    color: #888;
    font-size: 14px;
}

.toggle-form {
    margin-top: 20px;
    color: #888;
    font-size: 0.9em;
}

.toggle-form button {
    background: none;
    border: none;
    color: #ffd700;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
    padding: 0;
    margin: 0;
}

.toggle-form button:hover {
    color: #ffed4a;
}

.loading {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
}

.loading.show {
    display: flex;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-top: 3px solid #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.auth-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    z-index: 10001;
    max-width: 400px;
    animation: slideIn 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.auth-notification.success { 
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

.auth-notification.error { 
    background: linear-gradient(45deg, #f44336, #d32f2f);
}

.auth-notification.info { 
    background: linear-gradient(45deg, #2196F3, #1976D2);
}

.auth-notification button {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    margin-left: 10px;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
}

.auth-notification button:hover {
    opacity: 1;
}

@keyframes slideIn {
    from { 
        transform: translateX(100%); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .auth-container {
        margin: 20px;
        padding: 30px 20px;
        border-radius: 15px;
    }
    
    .game-logo {
        font-size: 2em;
    }
    
    .form-group input,
    .btn {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .auth-notification {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}

@media (max-height: 600px) {
    .auth-container {
        padding: 20px;
        max-height: 95vh;
    }
    
    .game-logo {
        font-size: 2em;
        margin-bottom: 5px;
    }
    
    .game-subtitle {
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .divider {
        margin: 15px 0;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .auth-container {
        border: 2px solid #ffd700;
        background: #000000;
    }
    
    .form-group input {
        border: 2px solid #ffd700;
        background: #000000;
    }
    
    .btn-primary {
        background: #ffd700;
        color: #000000;
        border: 2px solid #ffd700;
    }
    
    .btn-google {
        background: #ffffff;
        color: #000000;
        border: 2px solid #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .btn,
    .form-group input,
    .loading-spinner,
    .auth-notification {
        transition: none;
        animation: none;
    }
    
    .loading-spinner {
        border: 3px solid #ffd700;
        border-top: 3px solid rgba(255, 215, 0, 0.3);
    }
}

/* Focus styles for accessibility */
.form-group input:focus-visible,
.btn:focus-visible,
.toggle-form button:focus-visible {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Password visibility toggle (if needed later) */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 4px;
}

.password-toggle:hover {
    color: #ffd700;
}

/* Form validation styles */
.form-group input:valid {
    border-color: rgba(76, 175, 80, 0.5);
}

.form-group.error input {
    border-color: rgba(244, 67, 54, 0.8);
    box-shadow: 0 0 10px rgba(244, 67, 54, 0.3);
}

.form-group.error label {
    color: #f44336;
}

.error-message {
    color: #f44336;
    font-size: 0.8em;
    margin-top: 5px;
    display: block;
}

.success-message {
    color: #4CAF50;
    font-size: 0.8em;
    margin-top: 5px;
    display: block;
}