/* ===== AVATAR DETAIL PAGE STYLES ===== */

/* Avatar Header */
.avatar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    background: transparent;
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    z-index: 20;
}

.avatar-header .page-title {
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Avatar Hero Section */
.avatar-hero {
    position: relative;
    height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(180deg, #1a1a4e 0%, #0f0f2d 100%);
}

.avatar-bg-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.4) 0%, transparent 70%);
    animation: heroGlow 4s ease-in-out infinite;
}

@keyframes heroGlow {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.avatar-3d-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.avatar-3d {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.5),
        0 0 60px rgba(102, 126, 234, 0.3);
    animation: avatarFloat 3s ease-in-out infinite;
}

@keyframes avatarFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.avatar-platform {
    width: 80px;
    height: 20px;
    background: radial-gradient(ellipse, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
    margin-top: 10px;
    animation: platformPulse 3s ease-in-out infinite;
}

@keyframes platformPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(0.8);
        opacity: 0.3;
    }
}

.avatar-name-plate {
    margin-top: 20px;
    text-align: center;
}

.avatar-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.avatar-tags {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.tag {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.tag.level {
    background: var(--accent-gradient);
    color: white;
}

.tag.vip {
    background: var(--warning-gradient);
    color: #333;
}

.tag.city {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
}

/* Avatar Content */
.avatar-content {
    margin-top: -20px;
    position: relative;
    z-index: 10;
}

/* Stats Panel */
.stats-panel {
    padding: var(--spacing-lg);
}

.panel-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

.core-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.core-stat {
    text-align: center;
}

.stat-circle {
    width: 70px;
    height: 70px;
    margin: 0 auto 8px;
    position: relative;
}

.stat-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.stat-circle .stat-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 8;
}

.stat-circle .stat-fill {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: calc(283 - (283 * var(--percent) / 100));
    transition: stroke-dashoffset 1s ease;
}

.stamina-circle .stat-fill {
    stroke: #38ef7d;
}

.hunger-circle .stat-fill {
    stroke: #f2c94c;
}

.health-circle .stat-fill {
    stroke: #eb3349;
}

.mood-circle .stat-fill {
    stroke: #4facfe;
}

.stat-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-center .stat-icon {
    font-size: 18px;
}

.stat-center .stat-value {
    font-size: 14px;
    font-weight: 700;
}

.core-stat .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.core-stat .stat-max {
    font-size: 11px;
    color: var(--text-muted);
}

/* Status Effects */
.status-effects {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-glass);
}

.effect-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
}

.effect-item.positive {
    background: rgba(56, 239, 125, 0.1);
}

.effect-item.neutral {
    background: rgba(79, 172, 254, 0.1);
}

.effect-item.negative {
    background: rgba(244, 92, 67, 0.1);
}

.effect-icon {
    font-size: 24px;
}

.effect-info {
    flex: 1;
}

.effect-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.effect-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.effect-time {
    font-size: 12px;
    color: var(--text-muted);
}

/* Avatar Tabs */
.avatar-tabs {
    display: flex;
    gap: var(--spacing-sm);
    background: var(--bg-glass);
    padding: 6px;
    border-radius: var(--radius-lg);
}

.avatar-tab {
    flex: 1;
    padding: 10px 8px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.avatar-tab.active {
    background: var(--primary-gradient);
    color: white;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Skills Grid */
.skills-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.skill-card {
    padding: var(--spacing-md);
}

.skill-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.skill-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.skill-icon-wrapper.gathering {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.skill-icon-wrapper.manufacturing {
    background: linear-gradient(135deg, #4a4a4a 0%, #6a6a6a 100%);
}

.skill-icon-wrapper.commerce {
    background: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%);
}

.skill-icon-wrapper.transport {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.skill-icon-wrapper.construction {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

.skill-icon-wrapper.social {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.skill-info {
    flex: 1;
}

.skill-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.skill-level {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.level-badge {
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.level-exp {
    font-size: 12px;
    color: var(--text-muted);
}

.skill-progress {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
}

.skill-progress .progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.skill-bonuses {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.bonus {
    font-size: 12px;
    padding: 4px 10px;
    background: rgba(56, 239, 125, 0.1);
    color: var(--success);
    border-radius: var(--radius-sm);
}

.bonus.locked {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

/* Equipment Tab */
.equipment-preview {
    padding: var(--spacing-lg);
    display: flex;
    justify-content: center;
}

.equipment-avatar {
    position: relative;
    width: 160px;
    height: 200px;
    background: var(--bg-glass);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.equip-slot {
    position: absolute;
    width: 44px;
    height: 44px;
    background: var(--bg-glass);
    border: 2px solid var(--border-glass);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.equip-slot:hover {
    border-color: var(--primary);
    transform: scale(1.1);
}

.equip-slot.head {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.equip-slot.body {
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
}

.equip-slot.pants {
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
}

.equip-slot.shoes {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.equip-slot.accessory {
    top: 60px;
    right: -30px;
}

.equip-slot.backpack {
    top: 60px;
    left: -30px;
}

.equipment-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.equip-item {
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.equip-item.empty {
    opacity: 0.6;
}

.equip-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.equip-icon.empty-slot {
    font-size: 24px;
    color: var(--text-muted);
    border: 2px dashed var(--border-glass);
    background: transparent;
}

.equip-info {
    flex: 1;
}

.equip-info h4 {
    font-size: 15px;
    margin-bottom: 4px;
}

.rarity {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.rarity.common {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.rarity.rare {
    background: rgba(118, 75, 162, 0.3);
    color: #c084fc;
}

.rarity.epic {
    background: rgba(244, 92, 67, 0.3);
    color: #f45c43;
}

.equip-stats {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.equip-durability {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

.durability-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.durability-fill {
    height: 100%;
    background: var(--success-gradient);
}

.equip-action {
    padding: 8px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.equip-action:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.equip-action.primary {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
}

.equipment-summary {
    padding: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.equipment-summary h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

.summary-stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.summary-stat {
    flex: 1;
    min-width: 100px;
    text-align: center;
    padding: var(--spacing-sm);
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
}

.summary-stat .stat-name {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.summary-stat .stat-bonus {
    font-size: 16px;
    font-weight: 700;
    color: var(--success);
}

/* Licenses Tab */
.licenses-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.license-card {
    padding: var(--spacing-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.license-card.pending {
    flex-direction: column;
}

.license-card.pending>div:first-child,
.license-card.pending>div:nth-child(2) {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    width: 100%;
}

.license-card.locked {
    opacity: 0.6;
}

.license-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.license-card.active .license-icon {
    background: var(--success-gradient);
}

.license-info {
    flex: 1;
}

.license-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.license-info p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.license-meta {
    display: flex;
    gap: var(--spacing-md);
    font-size: 12px;
}

.license-status {
    font-weight: 500;
}

.license-status.valid {
    color: var(--success);
}

.license-status.pending {
    color: var(--warning);
}

.license-status.locked {
    color: var(--text-muted);
}

.license-expiry,
.license-requirement {
    color: var(--text-muted);
}

.license-progress {
    width: 100%;
    margin-top: var(--spacing-md);
}

.license-progress .progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.license-progress .progress-fill {
    height: 100%;
    background: var(--warning-gradient);
}

.license-progress span {
    font-size: 11px;
    color: var(--text-muted);
}

/* Achievements Tab */
.achievement-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.achievement-stat .stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.achievement-stat .stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.achievements-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.achievement-item {
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.achievement-item.locked {
    opacity: 0.5;
}

.achievement-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.achievement-item.completed .achievement-icon {
    background: var(--warning-gradient);
}

.achievement-info {
    flex: 1;
}

.achievement-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.achievement-info p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.achievement-date {
    font-size: 11px;
    color: var(--text-muted);
}

.achievement-progress {
    margin-top: 6px;
}

.achievement-progress .progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.achievement-progress .progress-fill {
    height: 100%;
    background: var(--accent-gradient);
}

.achievement-progress span {
    font-size: 11px;
    color: var(--text-muted);
}

.achievement-reward {
    font-size: 14px;
    font-weight: 600;
    color: var(--warning);
    white-space: nowrap;
}