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

:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #141b2d;
    --bg-tertiary: #1a2332;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #1e293b;
    --shadow: rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #1a1f3a 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Navigation */
.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 2px 4px rgba(99, 102, 241, 0.4));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.navbar-brand:hover .logo-icon {
    transform: rotate(-5deg) scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.6));
}

.logo-icon-large {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.5));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.5));
    }
    50% {
        filter: drop-shadow(0 6px 20px rgba(99, 102, 241, 0.8));
    }
}

.navbar-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--accent-primary);
}

/* Cards */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px var(--shadow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-primary);
    border-color: var(--accent-primary);
}

.btn-success {
    background: var(--accent-success);
    color: white;
}

.btn-danger {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-danger:hover {
    background: var(--accent-danger);
    color: white;
    border-color: var(--accent-danger);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Level Badge */
.level-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Progress Bar */
.progress-container {
    margin-top: 0.5rem;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* Badges */
.badge-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.badge {
    padding: 0.4rem 0.8rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: capitalize;
    position: relative;
}

/* Color all badges with a hash-based color system */
.badge[class*="consistency"] {
    border-color: #10b981;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.badge[class*="hard_worker"] {
    border-color: #f59e0b;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.badge[class*="persistence"] {
    border-color: #6366f1;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

.badge[class*="activity_milestone"] {
    border-color: #8b5cf6;
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.badge[class*="skill"] {
    border-color: #ec4899;
    color: #ec4899;
    background: rgba(236, 72, 153, 0.1);
}

.badge[class*="attribute_count"] {
    border-color: #06b6d4;
    color: #06b6d4;
    background: rgba(6, 182, 212, 0.1);
}

.badge[class*="skill_count"] {
    border-color: #14b8a6;
    color: #14b8a6;
    background: rgba(20, 184, 166, 0.1);
}

.badge[class*="first_"], .badge[class*="centurion"], .badge[class*="one_year"], .badge[class*="quick_starter"] {
    border-color: #f97316;
    color: #f97316;
    background: rgba(249, 115, 22, 0.1);
}

.badge[class*="early_bird"], .badge[class*="night_owl"], .badge[class*="weekend_warrior"] {
    border-color: #a855f7;
    color: #a855f7;
    background: rgba(168, 85, 247, 0.1);
}

.badge[class*="balanced"], .badge[class*="reflection"], .badge[class*="quality"], .badge[class*="streak"] {
    border-color: #84cc16;
    color: #84cc16;
    background: rgba(132, 204, 22, 0.1);
}

.badge[class*="dedicated"], .badge[class*="devoted"], .badge[class*="obsessed"], .badge[class*="commitment"], .badge[class*="lifetime"] {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.badge[class*="rising"], .badge[class*="shining"], .badge[class*="superstar"] {
    border-color: #fbbf24;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.badge[class*="total_level"] {
    border-color: #3b82f6;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.badge[class*="collector"], .badge[class*="achiever"], .badge[class*="champion"], .badge[class*="legendary"] {
    border-color: #d946ef;
    color: #d946ef;
    background: rgba(217, 70, 239, 0.1);
}

.badge[class*="specialist"], .badge[class*="master"], .badge[class*="legend"], .badge[class*="level_"] {
    border-color: #eab308;
    color: #eab308;
    background: rgba(234, 179, 8, 0.1);
}

.badge[class*="explorer"], .badge[class*="variety"], .badge[class*="diverse"], .badge[class*="jack"], .badge[class*="innovator"] {
    border-color: #22c55e;
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.badge[class*="power"], .badge[class*="elite"], .badge[class*="legendary_user"] {
    border-color: #f43f5e;
    color: #f43f5e;
    background: rgba(244, 63, 94, 0.1);
}

.badge[class*="daily"], .badge[class*="marathon"], .badge[class*="iron"], .badge[class*="unstoppable"] {
    border-color: #0ea5e9;
    color: #0ea5e9;
    background: rgba(14, 165, 233, 0.1);
}

.badge[class*="perfect"], .badge[class*="momentum"], .badge[class*="focused"], .badge[class*="multi"], .badge[class*="speed"], .badge[class*="frequency"] {
    border-color: #c084fc;
    color: #c084fc;
    background: rgba(192, 132, 252, 0.1);
}

.badge[class*="perfectionist"], .badge[class*="speed_leveler"] {
    border-color: #fb7185;
    color: #fb7185;
    background: rgba(251, 113, 133, 0.1);
}

/* Fallback for any badge without specific styling */
.badge:not([class*="consistency"]):not([class*="hard_worker"]):not([class*="persistence"]):not([class*="activity"]):not([class*="skill"]):not([class*="attribute"]):not([class*="first"]):not([class*="centurion"]):not([class*="one_year"]):not([class*="quick"]):not([class*="early"]):not([class*="night"]):not([class*="weekend"]):not([class*="balanced"]):not([class*="reflection"]):not([class*="quality"]):not([class*="streak"]):not([class*="dedicated"]):not([class*="devoted"]):not([class*="obsessed"]):not([class*="commitment"]):not([class*="lifetime"]):not([class*="rising"]):not([class*="shining"]):not([class*="superstar"]):not([class*="total"]):not([class*="collector"]):not([class*="achiever"]):not([class*="champion"]):not([class*="legendary"]):not([class*="specialist"]):not([class*="master"]):not([class*="legend"]):not([class*="level_"]):not([class*="explorer"]):not([class*="variety"]):not([class*="diverse"]):not([class*="jack"]):not([class*="innovator"]):not([class*="power"]):not([class*="elite"]):not([class*="daily"]):not([class*="marathon"]):not([class*="iron"]):not([class*="unstoppable"]):not([class*="perfect"]):not([class*="momentum"]):not([class*="focused"]):not([class*="multi"]):not([class*="speed"]):not([class*="frequency"]):not([class*="perfectionist"]) {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

/* Overall Level Display */
.overall-level-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
}

.overall-level-label {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.overall-level-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overall-level-circle {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.3));
}

.overall-level-value {
    position: absolute;
    font-size: 4.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
    letter-spacing: -2px;
    line-height: 1;
}

/* Profile Picture */
.profile-picture {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-primary);
    box-shadow: 0 4px 12px var(--shadow);
}

.profile-picture-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-primary);
    box-shadow: 0 8px 24px var(--shadow);
}

.profile-picture-edit-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 3px solid var(--bg-secondary);
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.profile-picture-edit-btn:hover {
    background: var(--accent-secondary);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.6);
}

/* Profile Header Container */
.profile-header-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .profile-header-container {
        flex-direction: column;
        gap: 2rem;
    }
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--accent-success);
    color: var(--accent-success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--accent-danger);
    color: var(--accent-danger);
}

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

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
}

/* Search */
.search-container {
    margin-bottom: 2rem;
}

.search-input {
    width: 100%;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
}

/* User Card */
.user-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.user-card:hover {
    transform: translateX(5px);
    border-color: var(--accent-primary);
}

/* Activity List */
.activity-list {
    margin-top: 1rem;
}

.activity-item {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-left: 3px solid var(--accent-primary);
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.activity-reflection {
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 0.5rem;
}

.activity-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .attribute-map-grid {
        grid-template-columns: 1fr !important;
    }
}

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

.card {
    animation: fadeIn 0.3s ease;
}

/* Attribute Map */
.attribute-map-container {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.attribute-map-container svg {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
}

.attribute-map-container circle[data-name] {
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.attribute-map-container circle[data-name]:hover {
    filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.5));
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

