/* ========================================
   RPG-элементы для Светозория
   ======================================== */

/* ---------- XP БАР ---------- */
.xp-container {
    width: 100%;
    max-width: 400px;
    margin: 10px 0;
}

.xp-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, 0.15);
    position: relative;
}

.xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #ff8c00, #ff6b00);
    border-radius: 20px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    position: relative;
}

.xp-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.xp-text {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-top: 5px;
    display: flex;
    justify-content: space-between;
}

/* ---------- СТАТИСТИКА ---------- */
.stat-card {
    background: rgba(255, 215, 0, 0.03);
    border: 1px solid rgba(255, 215, 0, 0.08);
    border-radius: var(--radius-md);
    padding: 15px 20px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 215, 0, 0.2);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    font-size: 2em;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5em;
    color: var(--gold);
    font-weight: bold;
    display: block;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85em;
}

/* ---------- АВАТАР ---------- */
.avatar-container {
    position: relative;
    display: inline-block;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #f0a500);
    border: 3px solid var(--gold);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5em;
    flex-shrink: 0;
}

.avatar-frame {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 2px solid transparent;
    animation: frameRotate 8s linear infinite;
}

@keyframes frameRotate {
    0% { border-color: rgba(255, 215, 0, 0.3); transform: rotate(0deg); }
    50% { border-color: rgba(255, 215, 0, 0.8); }
    100% { border-color: rgba(255, 215, 0, 0.3); transform: rotate(360deg); }
}

.avatar-level {
    position: absolute;
    bottom: 0;
    right: 0;
    background: linear-gradient(135deg, #ffd700, #f0a500);
    color: #0a0e1a;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1em;
    border: 2px solid #0a0e1a;
}

/* ---------- ДОСТИЖЕНИЯ ---------- */
.badge-rpg {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.15);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    color: var(--gold);
    transition: var(--transition);
}

.badge-rpg:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: scale(1.05);
}

.badge-rpg.gold {
    background: linear-gradient(135deg, #ffd700, #f0a500);
    color: #0a0e1a;
}

.badge-rpg.silver {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: #0a0e1a;
}

.badge-rpg.bronze {
    background: linear-gradient(135deg, #cd7f32, #b87333);
    color: #0a0e1a;
}

/* ---------- ПРОГРЕСС КВЕСТА ---------- */
.quest-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--gold);
}

.quest-progress .progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.quest-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-dark));
    border-radius: 10px;
    transition: width 1s ease;
}

/* ---------- RPG-ТЕКСТ ---------- */
.text-gold {
    color: var(--gold);
}
.text-muted {
    color: var(--text-muted);
}
.text-secondary {
    color: var(--text-secondary);
}

.text-center {
    text-align: center;
}
.text-right {
    text-align: right;
}

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

.flex {
    display: flex;
}
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.gap-10 { gap: 10px; }
.gap-15 { gap: 15px; }
.gap-20 { gap: 20px; }
.flex-wrap { flex-wrap: wrap; }

/* ---------- СВЕТЯЩИЕСЯ ЭЛЕМЕНТЫ ---------- */
.glow-gold {
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.2);
}

.glow-gold:hover {
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.4);
}

/* ---------- КАРТА ---------- */
#map {
    height: 400px;
    border-radius: var(--radius-md);
    margin-top: 10px;
    border: 1px solid var(--border-gold);
}

.leaflet-popup-content-wrapper {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-gold);
}

.leaflet-popup-tip {
    background: var(--bg-secondary);
}

/* ---------- АРТЕФАКТЫ ---------- */
.artifact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.artifact-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 215, 0, 0.06);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: var(--transition);
}

.artifact-card:hover {
    border-color: rgba(255, 215, 0, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.artifact-name {
    color: var(--gold);
    font-size: 1.1em;
    font-weight: bold;
}

.artifact-price {
    color: var(--text-muted);
    font-size: 0.9em;
}

.artifact-location {
    color: #6a5a4a;
    font-size: 0.85em;
}

.artifact-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.tag {
    display: inline-block;
    background: rgba(255, 215, 0, 0.08);
    color: var(--gold);
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 0.75em;
}

/* ---------- СЕКЦИИ ---------- */
.section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.section.active {
    display: block;
}

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