/* Firebase Login Styles */
.auth-container {
    max-width: 400px;
    margin: 50px auto;
    background: #2d2d2d;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.auth-container h2 {
    color: #ffd700;
    margin-bottom: 20px;
}

.login-btn {
    background: white;
    color: #1a1a1a;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px auto;
    transition: all 0.2s;
    width: 100%;
    max-width: 300px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.3);
}

.login-btn img {
    width: 20px;
    height: 20px;
}

.guest-btn {
    background: #4a9aea;
    color: white;
}

.user-info {
    background: #3a3a3a;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.user-details {
    text-align: left;
    flex-grow: 1;
}

.user-name {
    font-weight: bold;
    color: #ffd700;
    font-size: 0.95em;
}

.user-email {
    font-size: 0.8em;
    color: #b0b0b0;
}

.logout-btn {
    background: #d32f2f;
    padding: 6px 14px;
    font-size: 0.85em;
}

.hidden {
    display: none;
}

.sync-status {
    background: #2a4a5a;
    padding: 8px;
    border-radius: 5px;
    margin-bottom: 12px;
    font-size: 0.85em;
}

.sync-icon {
    color: #4a9aea;
}

.sync-icon.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.auth-note {
    color: #808080;
    margin-top: 20px;
    font-size: 0.85em;
    line-height: 1.5;
}

/* Main Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

h1 {
    color: #ffd700;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    color: #b0b0b0;
    font-size: 1.2em;
    margin-bottom: 20px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.stat-box {
    background: #3a3a3a;
    padding: 15px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.stat-label {
    color: #b0b0b0;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.stat-value {
    color: #ffd700;
    font-size: 2em;
    font-weight: bold;
}

.progress-bar {
    background: #2a2a2a;
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    margin-top: 20px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-fill {
    background: linear-gradient(90deg, #4a9aea 0%, #6bb6ff 100%);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    transition: width 0.3s ease;
    width: 0%;
}

.warning-box {
    background: #3a2d1a;
    border: 2px solid #ffd700;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.warning-box strong {
    color: #ffd700;
}

.warning-box a {
    color: #4a9aea;
    text-decoration: none;
}

.warning-box a:hover {
    text-decoration: underline;
}

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.search-box {
    flex: 1;
    min-width: 250px;
    padding: 12px 20px;
    background: #3a3a3a;
    border: 2px solid #4a4a4a;
    border-radius: 8px;
    color: white;
    font-size: 1em;
}

.search-box:focus {
    outline: none;
    border-color: #4a9aea;
}

button {
    padding: 12px 24px;
    background: #4a9aea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.2s;
}

button:hover {
    background: #3a7aca;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 154, 234, 0.3);
}

button.secondary {
    background: #5a5a5a;
}

button.secondary:hover {
    background: #4a4a4a;
}

.traders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.trader-section {
    background: #2d2d2d;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.trader-section:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.trader-header {
    background: linear-gradient(135deg, #3a3a3a 0%, #4a4a4a 100%);
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.trader-header:hover {
    background: linear-gradient(135deg, #4a4a4a 0%, #5a5a5a 100%);
}

.trader-name {
    color: #ffd700;
    font-size: 1.3em;
    font-weight: bold;
}

.quest-count {
    background: #4a9aea;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
}

.quest-list {
    max-height: 600px;
    overflow-y: auto;
    padding: 0;
}

.trader-section.collapsed .quest-list {
    max-height: 0;
    overflow: hidden;
}

.quest-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #3a3a3a;
    transition: background 0.2s;
    gap: 12px;
}

.quest-item:hover {
    background: #353535;
}

.quest-item:last-child {
    border-bottom: none;
}

.quest-level {
    background: #4a9aea;
    color: white;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.85em;
    font-weight: bold;
    min-width: 50px;
    text-align: center;
}

.quest-name {
    flex: 1;
    color: #e0e0e0;
}

.checkbox {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #4a9aea;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #808080;
    font-size: 0.9em;
}

footer p {
    margin: 5px 0;
}

/* Scrollbar Styling */
.quest-list::-webkit-scrollbar {
    width: 8px;
}

.quest-list::-webkit-scrollbar-track {
    background: #2a2a2a;
}

.quest-list::-webkit-scrollbar-thumb {
    background: #4a9aea;
    border-radius: 4px;
}

.quest-list::-webkit-scrollbar-thumb:hover {
    background: #3a7aca;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8em;
    }
    
    .traders-grid {
        grid-template-columns: 1fr;
    }
    
    .stats {
        gap: 15px;
    }
    
    .stat-box {
        padding: 10px 20px;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .search-box {
        min-width: 100%;
    }
}
