/**
 * Kajarbi 54 Gamification Styles
 * User Profile & Badge System
 */

/* ================================
   CSS Variables
   ================================ */
:root {
    --gam-bg-primary: #0d0d1a;
    --gam-bg-secondary: #1a1a2e;
    --gam-bg-tertiary: #252540;
    --gam-border: #2d2d44;
    --gam-gold: #c9a227;
    --gam-gold-light: #d4af37;
    --gam-text-primary: #ffffff;
    --gam-text-secondary: #a0a0a0;
    --gam-text-muted: #666666;
}

/* ================================
   User Profile - Full Layout
   ================================ */
.kajarbi-profile {
    max-width: 900px;
    margin: 0 auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Profile Header */
.profile-header {
    background: var(--gam-bg-secondary);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.profile-header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: var(--gam-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar-initials {
    font-size: 28px;
    font-weight: 700;
    color: var(--gam-bg-primary);
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--gam-text-primary);
    margin: 0 0 8px 0;
}

.profile-level {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--gam-bg-primary);
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.profile-stats {
    display: flex;
    gap: 32px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--gam-text-primary);
}

.stat-label {
    font-size: 11px;
    color: var(--gam-text-secondary);
    letter-spacing: 1px;
}

.profile-actions {
    flex-shrink: 0;
}

.btn-edit-profile {
    display: inline-block;
    padding: 12px 24px;
    background: var(--gam-text-primary);
    color: var(--gam-bg-primary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-edit-profile:hover {
    background: var(--gam-gold);
    transform: translateY(-2px);
}

/* Progress Section */
.profile-progress {
    background: var(--gam-bg-secondary);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.progress-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gam-text-primary);
    margin: 0 0 8px 0;
}

.progress-hint {
    font-size: 14px;
    color: var(--gam-text-secondary);
    margin: 0 0 16px 0;
}

.progress-bar {
    height: 8px;
    background: var(--gam-bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gam-gold) 0%, var(--gam-gold-light) 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.profile-progress.max-level {
    background: linear-gradient(135deg, var(--gam-bg-secondary) 0%, rgba(201, 162, 39, 0.1) 100%);
    border: 1px solid var(--gam-gold);
}

.profile-progress.max-level .progress-title {
    color: var(--gam-gold);
}

/* Badges Section */
.profile-badges,
.profile-all-badges {
    background: var(--gam-bg-secondary);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gam-text-primary);
    margin: 0 0 20px 0;
}

.badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.badge-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.3s ease;
}

.badge-item:hover .badge-icon {
    transform: scale(1.1);
}

.badge-name {
    font-size: 11px;
    color: var(--gam-text-secondary);
    text-align: center;
}

.no-badges {
    color: var(--gam-text-muted);
    font-size: 14px;
    margin: 0;
}

/* All Badges List */
.badges-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.badge-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--gam-bg-tertiary);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.badge-list-item:hover {
    background: rgba(201, 162, 39, 0.1);
}

.badge-list-item .badge-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.badge-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.badge-list-item .badge-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gam-text-primary);
    text-align: left;
}

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

.badge-status {
    color: var(--gam-text-muted);
}

.badge-list-item.locked {
    opacity: 0.6;
}

.badge-list-item.locked .badge-icon {
    filter: grayscale(100%);
}

/* ================================
   Profile Card (Compact/Mobile)
   ================================ */
.kajarbi-profile-card {
    background: var(--gam-bg-secondary);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    max-width: 280px;
    margin: 0 auto;
}

.card-header {
    margin-bottom: 20px;
}

.card-label {
    font-size: 10px;
    color: var(--gam-text-secondary);
    letter-spacing: 3px;
}

.card-avatar {
    width: 80px;
    height: 80px;
    background: var(--gam-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.card-avatar .avatar-initials {
    font-size: 28px;
    font-weight: 700;
    color: var(--gam-bg-primary);
}

.card-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--gam-text-primary);
    margin: 0 0 12px 0;
}

.card-level {
    display: inline-block;
    padding: 6px 16px;
    border: 2px solid var(--gam-gold);
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    color: var(--gam-text-primary);
    letter-spacing: 1px;
    margin-bottom: 24px;
}

.card-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    padding: 20px 0;
    border-top: 1px solid var(--gam-border);
    border-bottom: 1px solid var(--gam-border);
    margin-bottom: 10px;
}

.card-stats .stat-item {
    text-align: center;
}

.card-stats .stat-value {
    font-size: 24px;
}

.card-stats .stat-label {
    font-size: 10px;
}

.card-badges {
    background: var(--gam-bg-tertiary);
    border-radius: 8px;
    padding: 16px;
}

.badges-label {
    display: block;
    font-size: 12px;
    color: var(--gam-text-primary);
    font-weight: 600;
    margin-bottom: 12px;
    text-align: left;
}

.badges-icons {
    display: flex;
    gap: 12px;
}

.mini-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* ================================
   Leaderboard
   ================================ */
.kajarbi-leaderboard {
    background: var(--gam-bg-secondary);
    border-radius: 12px;
    padding: 24px;
}

.leaderboard-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gam-text-primary);
    margin: 0 0 20px 0;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--gam-bg-tertiary);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    background: rgba(201, 162, 39, 0.1);
}

.leaderboard-item .rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--gam-text-secondary);
    background: var(--gam-bg-primary);
    border-radius: 50%;
}

.leaderboard-item .rank.top-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffb800 100%);
    color: var(--gam-bg-primary);
}

.leaderboard-item .rank.top-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
    color: var(--gam-bg-primary);
}

.leaderboard-item .rank.top-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #b87333 100%);
    color: var(--gam-bg-primary);
}

.leader-avatar {
    width: 40px;
    height: 40px;
    background: var(--gam-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-initials.small {
    font-size: 14px;
    font-weight: 700;
    color: var(--gam-bg-primary);
}

.leader-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.leader-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gam-text-primary);
}

.leader-level {
    font-size: 11px;
    font-weight: 500;
}

.leader-points {
    font-size: 14px;
    font-weight: 700;
    color: var(--gam-gold);
}

/* ================================
   Badges Showcase
   ================================ */
.kajarbi-badges-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.showcase-badge {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--gam-bg-secondary);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.showcase-badge:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.showcase-badge .badge-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.showcase-badge .badge-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.showcase-badge .badge-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--gam-text-primary);
}

.showcase-badge .badge-desc {
    font-size: 13px;
    color: var(--gam-text-secondary);
}

.showcase-badge.locked {
    opacity: 0.5;
}

/* ================================
   Login Prompt
   ================================ */
.kajarbi-profile-login {
    background: var(--gam-bg-secondary);
    border-radius: 12px;
    padding: 48px;
    text-align: center;
    color: var(--gam-text-secondary);
    font-size: 16px;
}

.kajarbi-profile-login a {
    color: var(--gam-gold);
    text-decoration: none;
    font-weight: 600;
}

.kajarbi-profile-login a:hover {
    text-decoration: underline;
}

/* ================================
   Responsive Styles
   ================================ */
@media (max-width: 768px) {
    .profile-header-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .profile-actions {
        width: 100%;
        margin-top: 16px;
    }
    
    .btn-edit-profile {
        width: 100%;
        text-align: center;
    }
    
    .badge-list-item {
        flex-wrap: wrap;
    }
    
    .kajarbi-badges-showcase {
        grid-template-columns: 1fr;
    }
}

/* ================================
   Dark Theme Override (default)
   ================================ */
body.institute-dashboard-page .kajarbi-profile,
body.institute-dashboard-page .kajarbi-profile-card,
body.institute-dashboard-page .kajarbi-leaderboard,
body.institute-dashboard-page .kajarbi-badges-showcase {
    color: var(--gam-text-primary);
}

/* ================================
   Animations
   ================================ */
@keyframes badge-unlock {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

.badge-item.newly-earned .badge-icon {
    animation: badge-unlock 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes points-pop {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-30px) scale(1.5);
        opacity: 0;
    }
}

.points-notification {
    position: fixed;
    top: 100px;
    right: 24px;
    background: var(--gam-gold);
    color: var(--gam-bg-primary);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    animation: points-pop 1s ease forwards;
    z-index: 9999;
}

/* ================================
   Citizen's Journey - Tier Colors
   ================================ */
:root {
    --tier-citizen: #6b7280;
    --tier-federalist: #3b82f6;
    --tier-ambassador: #a855f7;
    --tier-architect: #c9a227;
}

/* ================================
   Citizenship Dashboard
   ================================ */
.citizenship-dashboard {
    background: var(--gam-bg-secondary);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.dashboard-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--gam-text-secondary);
    letter-spacing: 2px;
    margin: 0 0 8px 0;
}

.dashboard-tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: white;
}

.dashboard-tier-badge.tier-citizen { background: var(--tier-citizen); }
.dashboard-tier-badge.tier-federalist { background: var(--tier-federalist); }
.dashboard-tier-badge.tier-ambassador { background: var(--tier-ambassador); }
.dashboard-tier-badge.tier-architect { background: linear-gradient(135deg, var(--tier-architect) 0%, #b8860b 100%); }

.dashboard-points {
    text-align: right;
}

.points-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--gam-gold);
}

.points-label {
    font-size: 11px;
    color: var(--gam-text-secondary);
    letter-spacing: 1px;
}

/* Journey Progress Track */
.journey-progress {
    margin-bottom: 32px;
}

.progress-track {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
}

.progress-track::before {
    content: '';
    position: absolute;
    left: 48px;
    right: 48px;
    top: 50%;
    height: 4px;
    background: var(--gam-bg-tertiary);
    transform: translateY(-50%);
    z-index: 1;
}

.progress-track::after {
    content: '';
    position: absolute;
    left: 48px;
    top: 50%;
    height: 4px;
    background: linear-gradient(90deg, var(--tier-citizen), var(--tier-federalist), var(--tier-ambassador), var(--tier-architect));
    transform: translateY(-50%);
    z-index: 2;
    width: var(--progress-width, 0%);
    max-width: calc(100% - 96px);
    transition: width 0.5s ease;
}

.tier-station {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.tier-marker {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: var(--gam-bg-tertiary);
    border: 3px solid var(--gam-border);
    transition: all 0.3s ease;
}

.tier-station.completed .tier-marker {
    background: var(--gam-gold);
    border-color: var(--gam-gold);
    box-shadow: 0 0 20px rgba(201, 162, 39, 0.4);
}

.tier-station.current .tier-marker {
    border-color: var(--gam-gold);
    animation: pulse-glow 2s ease-in-out infinite;
}

.tier-station.locked .tier-marker {
    opacity: 0.5;
}

.tier-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gam-text-muted);
    letter-spacing: 0.5px;
}

.tier-station.completed .tier-label,
.tier-station.current .tier-label {
    color: var(--gam-text-primary);
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(201, 162, 39, 0.3); }
    50% { box-shadow: 0 0 25px rgba(201, 162, 39, 0.6); }
}

/* Progress Stats */
.progress-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--gam-border);
}

.progress-stat {
    text-align: center;
    padding: 16px;
    background: var(--gam-bg-tertiary);
    border-radius: 12px;
}

.progress-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--gam-text-primary);
}

.progress-stat-label {
    font-size: 11px;
    color: var(--gam-text-secondary);
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* ================================
   Mission Control Widget
   ================================ */
.mission-control {
    background: var(--gam-bg-secondary);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.mission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.mission-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gam-text-primary);
    letter-spacing: 1px;
    margin: 0;
}

.mission-count {
    font-size: 12px;
    color: var(--gam-text-secondary);
}

.mission-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mission-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--gam-bg-tertiary);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mission-item:hover {
    background: rgba(201, 162, 39, 0.1);
    transform: translateX(4px);
}

.mission-item.completed {
    opacity: 0.6;
}

.mission-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--gam-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.mission-item.completed .mission-checkbox {
    background: var(--gam-gold);
    border-color: var(--gam-gold);
}

.mission-checkbox svg {
    width: 14px;
    height: 14px;
    color: var(--gam-bg-primary);
    opacity: 0;
}

.mission-item.completed .mission-checkbox svg {
    opacity: 1;
}

.mission-content {
    flex: 1;
}

.mission-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gam-text-primary);
    margin-bottom: 4px;
}

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

.mission-reward {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(201, 162, 39, 0.2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gam-gold);
}

.mission-item.completed .mission-reward {
    background: var(--gam-bg-secondary);
    color: var(--gam-text-muted);
}

/* ================================
   Digital ID Card
   ================================ */
.digital-id-card {
    background: linear-gradient(135deg, var(--gam-bg-secondary) 0%, var(--gam-bg-tertiary) 100%);
    border-radius: 16px;
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.digital-id-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.id-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.id-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.id-logo-icon {
    width: 48px;
    height: 48px;
    background: var(--gam-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.id-logo-text {
    font-size: 18px;
    font-weight: 800;
    color: var(--gam-text-primary);
    letter-spacing: 2px;
}

.id-number {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    color: var(--gam-text-secondary);
    background: var(--gam-bg-primary);
    padding: 8px 16px;
    border-radius: 8px;
}

.id-body {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.id-avatar {
    width: 100px;
    height: 100px;
    background: var(--gam-gold);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.id-avatar-initials {
    font-size: 36px;
    font-weight: 700;
    color: var(--gam-bg-primary);
}

.id-info {
    flex: 1;
}

.id-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--gam-text-primary);
    margin: 0 0 8px 0;
}

.id-tier {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.id-tier.tier-citizen { background: var(--tier-citizen); }
.id-tier.tier-federalist { background: var(--tier-federalist); }
.id-tier.tier-ambassador { background: var(--tier-ambassador); }
.id-tier.tier-architect { background: var(--tier-architect); }

.id-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.id-detail {
    font-size: 12px;
}

.id-detail-label {
    color: var(--gam-text-muted);
    margin-bottom: 2px;
}

.id-detail-value {
    color: var(--gam-text-primary);
    font-weight: 600;
}

.id-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px dashed var(--gam-border);
}

.id-badges {
    display: flex;
    gap: 8px;
}

.id-mini-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
}

.id-qr {
    width: 64px;
    height: 64px;
    background: white;
    border-radius: 8px;
    padding: 4px;
}

.id-qr svg {
    width: 100%;
    height: 100%;
}

/* ================================
   Unity Leaderboard (Country)
   ================================ */
.unity-leaderboard {
    background: var(--gam-bg-secondary);
    border-radius: 16px;
    padding: 24px;
}

.unity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.unity-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gam-text-primary);
    letter-spacing: 1px;
    margin: 0;
}

.unity-filter {
    display: flex;
    gap: 8px;
}

.unity-filter-btn {
    padding: 6px 12px;
    background: var(--gam-bg-tertiary);
    border: none;
    border-radius: 6px;
    font-size: 11px;
    color: var(--gam-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.unity-filter-btn.active,
.unity-filter-btn:hover {
    background: var(--gam-gold);
    color: var(--gam-bg-primary);
}

.unity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.unity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--gam-bg-tertiary);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.unity-item:hover {
    background: rgba(201, 162, 39, 0.1);
}

.unity-item.current-user {
    border: 1px solid var(--gam-gold);
    background: rgba(201, 162, 39, 0.1);
}

.unity-rank {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--gam-text-secondary);
    background: var(--gam-bg-primary);
    border-radius: 8px;
}

.unity-rank.gold {
    background: linear-gradient(135deg, #ffd700, #ffb800);
    color: var(--gam-bg-primary);
}

.unity-rank.silver {
    background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
    color: var(--gam-bg-primary);
}

.unity-rank.bronze {
    background: linear-gradient(135deg, #cd7f32, #b87333);
    color: var(--gam-bg-primary);
}

.unity-flag {
    font-size: 24px;
}

.unity-country {
    flex: 1;
}

.unity-country-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gam-text-primary);
}

.unity-citizens {
    font-size: 11px;
    color: var(--gam-text-secondary);
}

.unity-points {
    text-align: right;
}

.unity-points-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--gam-gold);
}

.unity-points-label {
    font-size: 10px;
    color: var(--gam-text-muted);
}

/* ================================
   Privileges List
   ================================ */
.privileges-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.privilege-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--gam-bg-tertiary);
    border-radius: 8px;
    font-size: 13px;
    color: var(--gam-text-primary);
}

.privilege-item.locked {
    opacity: 0.5;
    color: var(--gam-text-muted);
}

.privilege-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gam-gold);
}

.privilege-item.locked .privilege-icon {
    color: var(--gam-text-muted);
}

/* ================================
   Kajarbi Citizenship Dashboard (Full)
   ================================ */
.kajarbi-citizenship-dashboard {
    background: var(--gam-bg-secondary);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 24px;
}

.citizen-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gam-border);
    margin-bottom: 24px;
}

.citizen-avatar {
    width: 100px;
    height: 100px;
    background: var(--gam-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.citizen-avatar .avatar-initials {
    font-size: 36px;
    font-weight: 700;
    color: var(--gam-bg-primary);
}

.tier-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--gam-bg-secondary);
    color: white;
    font-size: 16px;
}

.citizen-info {
    flex: 1;
}

.citizen-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--gam-text-primary);
    margin: 0 0 8px 0;
}

.citizen-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.citizen-number {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    color: var(--gam-text-secondary);
    background: var(--gam-bg-tertiary);
    padding: 4px 12px;
    border-radius: 4px;
}

.citizen-region {
    font-size: 12px;
    color: var(--gam-text-secondary);
}

.citizen-points {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.citizen-points .points-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--gam-gold);
}

.citizen-points .points-label {
    font-size: 10px;
    color: var(--gam-text-secondary);
    letter-spacing: 1px;
}

/* Tier Progress Roadmap */
.tier-progress-roadmap {
    margin-bottom: 32px;
}

.roadmap-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--gam-text-secondary);
    letter-spacing: 2px;
    margin: 0 0 20px 0;
}

.tier-stations {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.tier-stations .tier-station {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 2;
}

.station-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gam-bg-tertiary);
    border: 3px solid var(--gam-border);
    color: var(--gam-text-muted);
    transition: all 0.3s ease;
}

.tier-station.completed .station-icon,
.tier-station.current .station-icon {
    color: white;
    border-color: transparent;
}

.tier-station.locked .station-icon {
    opacity: 0.5;
}

.station-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--gam-text-muted);
}

.tier-station.completed .station-name,
.tier-station.current .station-name {
    color: var(--gam-text-primary);
}

.station-current-badge {
    font-size: 9px;
    font-weight: 700;
    color: var(--gam-gold);
    background: rgba(201, 162, 39, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

.station-connector {
    width: 60px;
    height: 3px;
    background: var(--gam-border);
    margin: 0 -4px;
    z-index: 1;
}

.station-connector.completed {
    background: linear-gradient(90deg, var(--tier-citizen), var(--tier-federalist));
}

/* Current Status Card */
.current-status-card {
    background: var(--gam-bg-tertiary);
    border-radius: 16px;
    padding: 24px;
    border-left: 4px solid;
    margin-bottom: 24px;
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.status-label {
    font-size: 11px;
    color: var(--gam-text-secondary);
    letter-spacing: 1px;
}

.status-tier {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
}

.status-description {
    font-size: 14px;
    color: var(--gam-text-secondary);
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.next-tier-progress {
    background: var(--gam-bg-secondary);
    border-radius: 12px;
    padding: 16px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--gam-text-secondary);
}

.progress-percent {
    font-weight: 700;
    color: var(--gam-gold);
}

.max-tier-achieved {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(201, 162, 39, 0.1);
    border: 1px solid var(--gam-gold);
    border-radius: 12px;
    padding: 20px;
}

.achievement-icon {
    font-size: 32px;
}

.max-tier-achieved p {
    margin: 0;
    font-size: 14px;
    color: var(--gam-text-primary);
}

/* Privileges Section */
.privileges-section {
    margin-top: 24px;
}

.privileges-section .section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--gam-text-secondary);
    letter-spacing: 2px;
    margin: 0 0 16px 0;
}

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

.privilege-item.unlocked svg {
    color: #22c55e;
}

.locked-privileges-title {
    font-size: 12px;
    color: var(--gam-text-muted);
    margin: 24px 0 12px 0;
}

/* ================================
   Kajarbi Mission Control (Full)
   ================================ */
.kajarbi-mission-control {
    background: var(--gam-bg-secondary);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.mission-control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.mission-control-header .mission-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gam-text-primary);
    letter-spacing: 1px;
    margin: 0;
}

.mission-tier-badge {
    font-size: 10px;
    font-weight: 700;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.missions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.missions-list .mission-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--gam-bg-tertiary);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.missions-list .mission-item:hover {
    background: rgba(201, 162, 39, 0.08);
}

.missions-list .mission-item.completed {
    opacity: 0.6;
}

.mission-status {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.status-check {
    width: 28px;
    height: 28px;
    background: #22c55e;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.status-pending {
    font-size: 24px;
    color: var(--gam-border);
}

.missions-list .mission-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.missions-list .mission-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gam-text-primary);
}

.missions-list .mission-desc {
    font-size: 12px;
    color: var(--gam-text-secondary);
}

.missions-list .mission-reward {
    padding: 0;
    background: none;
}

.reward-points {
    font-size: 12px;
    font-weight: 700;
    color: var(--gam-gold);
}

.mission-action-btn {
    padding: 8px 16px;
    background: var(--gam-gold);
    border: none;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--gam-bg-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}

.mission-action-btn:hover {
    transform: scale(1.05);
}

.mission-control-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--gam-border);
}

.reward-preview {
    font-size: 12px;
    color: var(--gam-text-secondary);
    margin: 0;
    text-align: center;
}

/* ================================
   Digital ID Generator (Full)
   ================================ */
.kajarbi-digital-id-generator {
    text-align: center;
}

.kajarbi-digital-id-generator .digital-id-card {
    max-width: 380px;
    margin: 0 auto 24px;
    background: linear-gradient(145deg, var(--gam-bg-secondary), var(--gam-bg-tertiary));
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.id-card-header {
    text-align: center;
    margin-bottom: 24px;
}

.id-card-title {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--gam-gold);
    letter-spacing: 3px;
}

.id-card-subtitle {
    display: block;
    font-size: 10px;
    color: var(--gam-text-secondary);
    letter-spacing: 2px;
    margin-top: 4px;
}

.id-card-body {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}

.id-card-body .id-avatar {
    width: 80px;
    height: 80px;
    background: var(--gam-gold);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.id-initials {
    font-size: 28px;
    font-weight: 700;
    color: var(--gam-bg-primary);
}

.id-card-body .id-details {
    text-align: left;
}

.id-card-body .id-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--gam-text-primary);
    margin-bottom: 4px;
}

.id-card-body .id-region {
    font-size: 12px;
    color: var(--gam-text-secondary);
    margin-bottom: 8px;
}

.id-card-body .id-number {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 11px;
    color: var(--gam-gold);
    background: var(--gam-bg-primary);
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
}

.id-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px dashed var(--gam-border);
}

.id-card-footer .id-tier {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
}

.id-hologram {
    width: 50px;
    height: 50px;
    position: relative;
}

.hologram-effect {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        transparent 0%, 
        rgba(201, 162, 39, 0.3) 25%,
        transparent 50%,
        rgba(201, 162, 39, 0.3) 75%,
        transparent 100%
    );
    border-radius: 50%;
    animation: hologram-spin 3s linear infinite;
}

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

/* Digital ID Actions */
.digital-id-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.btn-generate-id,
.btn-share-id {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--gam-gold), #b8860b);
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--gam-bg-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.btn-generate-id:hover,
.btn-share-id:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(201, 162, 39, 0.4);
}

.btn-icon {
    font-size: 20px;
}

.share-hint {
    font-size: 12px;
    color: var(--gam-text-secondary);
    margin: 0;
}

/* Login Prompt */
.kajarbi-login-prompt {
    background: var(--gam-bg-secondary);
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
}

.kajarbi-login-prompt p {
    font-size: 16px;
    color: var(--gam-text-secondary);
    margin: 0 0 20px 0;
}

.btn-login {
    display: inline-block;
    padding: 14px 32px;
    background: var(--gam-gold);
    color: var(--gam-bg-primary);
    text-decoration: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 162, 39, 0.4);
}

/* ================================
   Responsive - Citizen Journey
   ================================ */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .dashboard-points {
        text-align: left;
    }
    
    .progress-track {
        flex-direction: column;
        gap: 24px;
        padding: 0;
    }
    
    .progress-track::before,
    .progress-track::after {
        display: none;
    }
    
    .tier-station {
        flex-direction: row;
        width: 100%;
        justify-content: flex-start;
    }
    
    .progress-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .id-body {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .id-details {
        grid-template-columns: 1fr;
    }
    
    .mission-item {
        flex-wrap: wrap;
    }
    
    .mission-reward {
        margin-top: 8px;
        width: 100%;
        justify-content: center;
    }
    
    /* Citizenship Dashboard Responsive */
    .citizen-header {
        flex-direction: column;
        text-align: center;
    }
    
    .citizen-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .citizen-points {
        justify-content: center;
    }
    
    .tier-stations {
        flex-direction: column;
        gap: 12px;
    }
    
    .tier-stations .tier-station {
        flex-direction: row;
        justify-content: flex-start;
        gap: 16px;
    }
    
    .station-connector {
        display: none;
    }
    
    .id-card-body {
        flex-direction: column;
        text-align: center;
    }
    
    .id-card-body .id-details {
        text-align: center;
    }
    
    .missions-list .mission-item {
        flex-wrap: wrap;
    }
    
    .mission-action-btn {
        width: 100%;
        margin-top: 12px;
    }
}

/* ================================
   Tier Upgrade Modal
   ================================ */
.tier-upgrade-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.tier-upgrade-content {
    background: var(--gam-bg-secondary);
    border-radius: 24px;
    padding: 48px;
    text-align: center;
    max-width: 400px;
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tier-upgrade-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 24px;
    animation: bounce 0.6s ease 0.3s;
}

.tier-upgrade-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--gam-text-primary);
    margin: 0 0 8px;
}

.tier-upgrade-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--gam-gold);
    margin: 0 0 8px;
}

.tier-upgrade-desc {
    font-size: 14px;
    color: var(--gam-text-secondary);
    margin: 0 0 24px;
}

.tier-upgrade-close {
    padding: 14px 32px;
    background: var(--gam-gold);
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--gam-bg-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tier-upgrade-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 162, 39, 0.4);
}

/* ================================
   Badge Unlock Modal
   ================================ */
.badge-unlock-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.badge-unlock-content {
    background: var(--gam-bg-secondary);
    border-radius: 24px;
    padding: 48px;
    text-align: center;
    max-width: 360px;
}

.badge-unlock-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.badge-unlock-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gam-text-primary);
    margin: 0 0 8px;
}

.badge-unlock-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--gam-gold);
    margin: 0 0 8px;
}

.badge-unlock-desc {
    font-size: 13px;
    color: var(--gam-text-secondary);
    margin: 0 0 24px;
}

.badge-unlock-close {
    padding: 12px 28px;
    background: var(--gam-gold);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gam-bg-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.badge-unlock-close:hover {
    transform: scale(1.05);
}

/* ================================
   Toast Notifications
   ================================ */
.gamification-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--gam-bg-secondary);
    color: var(--gam-text-primary);
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}

.gamification-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ================================
   Extra Animations
   ================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { 
        opacity: 0;
        transform: scale(0.8);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}
