/**
 * GuardLounge Authentication UI Styles
 */

/* Modal overlay */
#auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

/* Modal container */
.auth-modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 40px;
    border-radius: 15px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    border: 2px solid #0f3460;
}

/* Modal header */
.auth-modal-content h2 {
    color: #00d4ff;
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Form groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #fff;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #0f3460;
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #00d4ff;
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

/* Buttons */
.auth-button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-button:hover {
    background: linear-gradient(135deg, #00eaff 0%, #00b8e6 100%);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
    transform: translateY(-2px);
}

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

/* Secondary button */
.auth-button-secondary {
    background: transparent;
    border: 2px solid #00d4ff;
    color: #00d4ff;
}

.auth-button-secondary:hover {
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.2);
}

/* Close button */
.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: #00d4ff;
    transform: rotate(90deg);
}

/* Form switch link */
.form-switch {
    text-align: center;
    margin-top: 20px;
    color: #aaa;
    font-size: 14px;
}

.form-switch a {
    color: #00d4ff;
    text-decoration: none;
    cursor: pointer;
    font-weight: bold;
}

.form-switch a:hover {
    text-decoration: underline;
}

/* Error messages */
.error-message {
    display: none;
    background-color: rgba(255, 82, 82, 0.2);
    border: 1px solid #ff5252;
    color: #ff5252;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Success message */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: #fff;
    font-weight: bold;
    z-index: 10001;
    display: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.message.success {
    background-color: #4caf50;
}

.message.error {
    background-color: #f44336;
}

.message.info {
    background-color: #2196f3;
}

/* Auth UI in game header */
.auth-ui {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.auth-ui button {
    padding: 10px 20px;
    margin-left: 10px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-ui button:hover {
    background: linear-gradient(135deg, #00eaff 0%, #00b8e6 100%);
    box-shadow: 0 3px 15px rgba(0, 212, 255, 0.4);
}

#user-display {
    display: none;
    color: #000;
    font-weight: bold;
    margin-right: 10px;
}

/* Leaderboard styles */
.leaderboard {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border: 2px solid #0f3460;
}

.leaderboard h3 {
    color: #00d4ff;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    margin-bottom: 8px;
    border-radius: 6px;
    border-left: 3px solid #00d4ff;
}

.leaderboard-entry:nth-child(1) {
    border-left-color: #ffd700;
    background-color: rgba(255, 215, 0, 0.1);
}

.leaderboard-entry:nth-child(2) {
    border-left-color: #c0c0c0;
    background-color: rgba(192, 192, 192, 0.1);
}

.leaderboard-entry:nth-child(3) {
    border-left-color: #cd7f32;
    background-color: rgba(205, 127, 50, 0.1);
}

.leaderboard-rank {
    color: #00d4ff;
    font-weight: bold;
    width: 40px;
}

.leaderboard-username {
    color: #fff;
    flex: 1;
}

.leaderboard-score {
    color: #00d4ff;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 600px) {
    .auth-modal-content {
        padding: 30px 20px;
    }

    .auth-ui {
        top: 10px;
        right: 10px;
    }

    .auth-ui button {
        padding: 8px 15px;
        font-size: 12px;
    }
}
