/* ========== DASHBOARD PAGE ========== */
.dashboard-wrapper {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* ---------- Header Profile ---------- */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface, #1a2536);
    border: 1px solid var(--border, #2a3b4e);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--neon, #9fef00);
    box-shadow: 0 0 15px rgba(159, 239, 0, 0.3);
}

.default-avatar {
    background-color: var(--neon-dim, #6b9e1a);
    color: #000;
    font-weight: bold;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.profile-username {
    color: var(--neon, #9fef00);
    font-size: 1.8rem;
    margin: 0;
}

.profile-rank,
.profile-points {
    color: var(--text, #b3b9c5);
    font-size: 0.95rem;
}

.profile-rank strong,
.profile-points strong {
    color: var(--text-bright, #e6eae6);
}

.btn-edit {
    background: linear-gradient(135deg, var(--neon-dim, #6b9e1a), var(--neon, #9fef00));
    color: #000;
    font-weight: bold;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: 0.2s;
}
.btn-edit:hover {
    box-shadow: 0 0 15px rgba(159, 239, 0, 0.5);
}

/* ---------- Tabs Navigation ---------- */
.dashboard-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    background: var(--surface, #1a2536);
    border: 1px solid var(--border, #2a3b4e);
    color: var(--text, #b3b9c5);
    padding: 0.6rem 1.4rem;
    border-radius: 6px 6px 0 0;
    font-family: var(--font-mono);
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.2s;
    border-bottom: none;
}

.tab-btn.active {
    background: var(--bg, #141d2b);
    border-color: var(--neon, #9fef00) var(--neon, #9fef00) transparent;
    color: var(--neon, #9fef00);
    box-shadow: 0 -2px 10px rgba(159, 239, 0, 0.3);
}

.tab-btn:hover:not(.active) {
    border-color: var(--neon-dim, #6b9e1a);
    color: var(--neon-dim);
}

/* ---------- Tab Content ---------- */
.tab-content {
    display: none;
    background: var(--surface, #1a2536);
    border: 1px solid var(--border, #2a3b4e);
    border-radius: 0 8px 8px 8px;
    padding: 1.5rem;
}

.tab-content.active {
    display: block;
}

/* ---------- Stats Tab Cards ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg, #141d2b);
    border: 1px solid var(--border, #2a3b4e);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    transition: 0.2s;
}

.stat-card:hover {
    border-color: var(--neon-dim, #6b9e1a);
    box-shadow: 0 0 15px rgba(159, 239, 0, 0.15);
}

.stat-label {
    display: block;
    color: var(--text, #b3b9c5);
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--neon, #9fef00);
}

/* ---------- Challenges Tab ---------- */
/* ---------- Challenges Tab (Updated) ---------- */
.solved-challenges h3 {
    color: var(--neon, #9fef00);
    margin-bottom: 1rem;
}

.challenge-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.challenge-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border, #2a3b4e);
    color: var(--text-bright, #e6eae6);
    transition: background ease 0.3s;
    border-radius: 0.5rem;
}

.challenge-item:hover {
    background: #2a3b4e;
    cursor: pointer;
}

.challenge-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    flex: 1;
}

.challenge-name {
    font-weight: bold;
    color: var(--neon-dim, #6b9e1a);
}

.challenge-date {
    color: var(--text, #b3b9c5);
    margin-left: auto;
    white-space: nowrap;
}

.first-blood-badge {
    color: #ffbd2e;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 0.4rem;
    text-shadow: 0 0 5px rgba(255, 189, 46, 0.6);
}

.no-solves {
    color: var(--text);
    padding: 1rem;
}

/* ---------- ✨ Modal (Creative Edit Profile) ✨ ---------- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 20, 0.9);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-card {
    background: var(--surface, #1a2536);
    border: 1px solid var(--neon, #9fef00);
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 0 40px rgba(159, 239, 0, 0.2);
    position: relative;
    animation: slideUp 0.3s ease-out;
}

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

.modal-close {
    position: absolute;
    top: 0.8rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text, #b3b9c5);
    font-size: 2rem;
    cursor: pointer;
    transition: 0.2s;
}

.modal-close:hover {
    color: var(--neon, #9fef00);
    transform: rotate(45deg);
}

.modal-title {
    color: var(--neon, #9fef00);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.field-group {
    margin-bottom: 1.2rem;
}

.field-group label {
    display: block;
    color: var(--text-bright, #e6eae6);
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.field-group input,
.field-group textarea {
    width: 100%;
    padding: 0.7rem;
    background: var(--bg, #141d2b);
    border: 1px solid var(--border, #2a3b4e);
    border-radius: 5px;
    color: var(--text-bright, #e6eae6);
    font-family: var(--font-mono);
    transition: 0.2s;
}

.field-group input:focus,
.field-group textarea:focus {
    outline: none;
    border-color: var(--neon, #9fef00);
    box-shadow: 0 0 10px rgba(159, 239, 0, 0.3);
}

.btn-submit {
    background: var(--neon, #9fef00);
    color: #000;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-family: var(--font-mono);
    transition: 0.2s;
    text-transform: uppercase;
}

.btn-submit:hover {
    background: var(--neon-dim, #6b9e1a);
    box-shadow: 0 0 15px rgba(159, 239, 0, 0.4);
}

.profile-status {
    color: #93c3df;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
    display: block;
}

/* ---------- Profile Lamps ---------- */
.profile-lamps {
    color: #ffbd2e;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.profile-lamps strong {
    color: #f59e0b;
    font-size: 1.1rem;
}

/* ---------- Lamp Card in Stats ---------- */
.lamp-card {
    border-color: rgba(255, 189, 46, 0.3) !important;
}

.lamp-card:hover {
    border-color: #f59e0b !important;
    box-shadow: 0 0 15px rgba(255, 189, 46, 0.3) !important;
}

.lamp-value {
    color: #f59e0b !important;
    text-shadow: 0 0 10px rgba(255, 189, 46, 0.5);
}