/* Authentication Overlay */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6); /* Dimmed background */
    backdrop-filter: blur(5px); /* Slight blur for focus */
    z-index: 10000; /* Topmost */
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-overlay.active {
    display: flex;
    opacity: 1;
}

/* Auth Box Container */
.auth-box {
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid var(--text-gold, #ffd700);
    border-radius: 10px;
    width: 400px;
    max-width: 90%;
    padding: 0; /* Padding handled by children */
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.15);
    position: relative;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.auth-overlay.active .auth-box {
    transform: translateY(0);
}

/* Close Button */
.close-auth {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-silver, #c0c0c0);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}

.close-auth:hover {
    color: white;
}

/* Tabs Header */
.auth-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid #333;
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 15px;
    color: var(--text-silver, #c0c0c0);
    font-family: 'Starcraft Regular', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    position: relative;
}

.auth-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.auth-tab.active {
    color: var(--text-gold, #ffd700);
    background: rgba(255, 215, 0, 0.05);
}

/* Active Tab Indicator Line */
.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--text-gold, #ffd700);
    box-shadow: 0 -2px 5px rgba(255, 215, 0, 0.5);
}

/* Content Area */
.auth-content {
    padding: 25px;
}

.auth-view {
    display: none; /* Toggled by JS */
    animation: fadeAuthIn 0.3s ease;
}

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

.auth-view h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--text-gold, #ffd700);
    text-align: center;
    font-family: 'Starcraft Regular', sans-serif;
    font-size: 1.5rem;
    text-transform: uppercase;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-silver, #c0c0c0);
    font-size: 0.9rem;
    font-family: 'Audiowide Regular', sans-serif;
}

.form-group input {
    width: 100%;
    padding: 12px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    color: white;
    font-family: 'Audiowide Regular', sans-serif;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--text-gold, #ffd700);
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.2);
}

/* Name Row for Registration */
.name-row {
    display: flex;
    gap: 10px;
}

.name-row .form-group {
    flex: 1;
}

/* Submit Button */
.btn-glow {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background: rgba(128, 0, 128, 0.2);
    border: 1px solid var(--primary-glow, #00ff00);
    color: var(--primary-glow, #00ff00);
    font-family: 'Starcraft Regular', sans-serif;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    border-radius: 4px;
}

.btn-glow:hover {
    background: var(--primary-glow, #00ff00);
    color: black;
    box-shadow: 0 0 15px var(--primary-glow, #00ff00);
}

/* Helper Text */
.auth-helper {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
    margin-top: 15px;
}

.auth-helper a {
    color: var(--text-silver, #c0c0c0);
    text-decoration: none;
}

.auth-helper a:hover {
    color: var(--text-gold, #ffd700);
    text-decoration: underline;
}