/* auth.css */

/* In the .account-widget rule, add a padding-bottom */
.account-widget {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    padding-bottom: 10px; /* Keep this from the previous fix */
}

.account-button {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #4caf50;
}

/* In the .account-dropdown rule, change the 'top' value */
.account-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 5px); /* Change this from top: 120% */
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    min-width: 160px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.account-widget.active .account-dropdown {
    display: block;
}

.account-dropdown a {
    color: #f0f0f0;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-size: 14px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.account-dropdown a:hover {
    background-color: rgba(76, 175, 80, 0.3);
}

#logout-btn {
    color: #ff5c5c;
}
#logout-btn:hover {
    background-color: rgba(255, 92, 92, 0.3) !important;
}

/* Auth Form Container */
.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.auth-container h1 {
    margin-bottom: 30px;
    color: #fff;
}

.auth-form .input-group {
    margin-bottom: 20px;
    text-align: left;
}

.auth-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #ccc;
}

.auth-form input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.auth-form input:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3);
}

.auth-form button {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.auth-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.auth-switch-link {
    margin-top: 20px;
    color: #ccc;
}

.auth-switch-link a {
    color: #4caf50;
    font-weight: bold;
    text-decoration: none;
}

/* Style for the container showing the linked Discord name */
.discord-info {
    padding: 10px 16px 5px; /* Add some padding */
    font-size: 13px;
    color: #ccc;
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Separator line */
    text-align: left;
}

.discord-info strong {
    color: #fff;
    font-weight: 600;
}

/* Style for the Unlink button */
#unlink-discord-btn {
    cursor: pointer;
    color: #ff9c9c; /* A softer red */
    padding-top: 5px;
}

#unlink-discord-btn:hover {
    background-color: rgba(255, 92, 92, 0.3) !important;
    color: #ffcdcd !important;
}

/* --- Signup Prompt Styles --- */

.prompt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(8px); /* This creates the blur effect */
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.prompt-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.prompt-window {
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    padding: 30px 40px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    color: #fff;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.prompt-overlay.visible .prompt-window {
    transform: scale(1);
}

.prompt-window h2 {
    margin-top: 0;
    color: #4caf50;
    font-size: 1.8em;
}

.prompt-window p {
    font-size: 1.1em;
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 15px;
    font-weight: 600;
}

#close-prompt-btn {
    margin-top: 20px;
    padding: 12px 30px;
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

#close-prompt-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* --- Daily Reward Modal Styles --- */
.daily-reward-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3001;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* This makes the modal visible when the script adds the display:flex property */
.daily-reward-overlay[style*="display: flex;"] {
    opacity: 1;
    visibility: visible;
}

.daily-reward-window {
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 30px 40px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    color: #fff;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.daily-reward-overlay[style*="display: flex;"] .daily-reward-window {
    transform: scale(1);
}


.daily-reward-window.success {
    border: 1px solid rgba(76, 175, 80, 0.4);
    box-shadow: 0 8px 32px rgba(76, 175, 80, 0.2);
}

.daily-reward-window.cooldown {
    border: 1px solid rgba(255, 193, 7, 0.4);
    box-shadow: 0 8px 32px rgba(255, 193, 7, 0.2);
}

.daily-reward-window h2 {
    margin-top: 0;
    font-size: 1.8em;
}

.daily-reward-window.success h2 { color: #4caf50; }
.daily-reward-window.cooldown h2 { color: #ffc107; }

.daily-reward-window img {
    width: 80px;
    height: 80px;
    margin: 10px 0;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}

.daily-reward-window p {
    font-size: 1.2em;
    color: #ccc;
    margin: 10px 0 20px 0;
}

#daily-reward-timer {
    font-weight: bold;
    font-size: 1.4em;
    color: #ffc107;
}

.daily-reward-window button {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 1em;
    transition: all 0.3s ease;
}

.daily-reward-window.success button {
    background: linear-gradient(135deg, #4caf50, #45a049);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.daily-reward-window.cooldown button {
    background: linear-gradient(135deg, #ffc107, #ffb300);
    color: #1a1a1a;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.daily-reward-window button:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}
