/**
 * NodeChat MVP - Mobile-First CSS
 * Dark theme, glass morphism, smooth animations
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    /* Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a24;
    --bg-card: rgba(26, 26, 36, 0.8);
    
    --color-primary: #00d4ff;
    --color-accent: #7c3aed;
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b0;
    --text-muted: #6b7280;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 212, 255, 0.3);
    
    /* Glass effect */
    --glass-bg: rgba(18, 18, 26, 0.7);
    --glass-blur: 20px;
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00d4ff, #7c3aed);
    --gradient-card: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(124, 58, 237, 0.05));
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    
    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    
    /* Safe areas */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    
    /* Bottom nav height */
    --nav-height: 64px;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

p {
    color: var(--text-secondary);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

a:hover {
    opacity: 0.8;
}

/* ============================================
   Layout
   ============================================ */
#app {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: calc(var(--nav-height) + var(--safe-bottom));
}

.view-container {
    padding: var(--space-md);
    padding-top: calc(var(--safe-top) + var(--space-md));
    max-width: 480px;
    margin: 0 auto;
}

.view-header {
    padding: var(--space-lg) 0;
    text-align: center;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    transform: translateZ(0);
    will-change: transform;
    min-height: 48px;
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 6px 30px rgba(0, 212, 255, 0.4);
}

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

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.btn-danger {
    background: var(--color-error);
    color: white;
}

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: 1.125rem;
    min-height: 56px;
}

.btn-block {
    width: 100%;
}

/* ============================================
   Form Elements
   ============================================ */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: var(--space-md);
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    min-height: 52px;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

input::placeholder {
    color: var(--text-muted);
}

.password-input {
    position: relative;
}

.password-input input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.toggle-password.showing {
    color: var(--color-primary);
}

.select-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 48px;
}

.form-error {
    color: var(--color-error);
    font-size: 0.875rem;
    margin-top: var(--space-sm);
    min-height: 1.25rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.form-error.visible {
    opacity: 1;
}

/* Password strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    transition: width var(--transition-base);
}

.strength-bar.weak .strength-fill { background: var(--color-error); }
.strength-bar.fair .strength-fill { background: var(--color-warning); }
.strength-bar.good .strength-fill { background: var(--color-primary); }
.strength-bar.strong .strength-fill { background: var(--color-success); }

.strength-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Switch toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    transition: var(--transition-base);
}

.slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition-base);
}

input:checked + .slider {
    background: var(--color-primary);
}

input:checked + .slider::before {
    transform: translateX(24px);
}

/* ============================================
   Cards & Glass Effect
   ============================================ */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
}

/* ============================================
   Bottom Navigation
   ============================================ */
#bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-top: 1px solid var(--glass-border);
    display: none;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
    transform: translateY(100%);
    transition: transform var(--transition-slow);
}

#bottom-nav.visible {
    display: flex;
    transform: translateY(0);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: var(--space-sm) var(--space-lg);
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: var(--radius-md);
}

.nav-item svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.nav-item span {
    font-size: 0.75rem;
    font-weight: 500;
}

.nav-item.active {
    color: var(--color-primary);
}

.nav-item:active {
    transform: scale(0.95);
}

/* ============================================
   Splash Screen
   ============================================ */
.splash-screen {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    text-align: center;
}

.splash-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo-container {
    margin-bottom: var(--space-xl);
    animation: pulse-glow 3s ease-in-out infinite;
}

.logo-svg {
    filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.5));
}

@keyframes pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.4)); }
    50% { filter: drop-shadow(0 0 40px rgba(0, 212, 255, 0.7)); }
}

.splash-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-sm);
}

.splash-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
}

.splash-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    width: 100%;
    max-width: 300px;
}

.splash-footer {
    padding: var(--space-xl);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ============================================
   Auth Views
   ============================================ */
.auth-view {
    min-height: 100vh;
    min-height: 100dvh;
    padding: var(--space-lg);
    padding-top: calc(var(--safe-top) + var(--space-lg));
    display: flex;
    flex-direction: column;
}

.auth-header {
    padding: var(--space-xl) 0;
}

.auth-header h1 {
    margin-bottom: var(--space-sm);
}

.auth-header p {
    color: var(--text-secondary);
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    margin-bottom: var(--space-lg);
    transition: all var(--transition-fast);
}

.back-btn:active {
    transform: scale(0.95);
}

.auth-form {
    flex: 1;
}

.auth-footer {
    padding: var(--space-xl) 0;
    text-align: center;
    color: var(--text-secondary);
}

.terms-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: var(--space-lg);
}

/* Shake animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.shake {
    animation: shake 0.3s ease;
}

/* ============================================
   Radar View
   ============================================ */
.radar-view {
    padding: var(--space-md);
    padding-top: calc(var(--safe-top) + var(--space-md));
}

.radar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.radar-title h1 {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.radar-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.radar-radius-badge {
    padding: var(--space-xs) var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
}

.radar-container {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin: 0 auto var(--space-xl);
    aspect-ratio: 1;
}

.radar-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.radar-bg {
    fill: var(--gradient-card);
}

.radar-ring {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 1;
}

.radar-line {
    stroke: var(--border-color);
    stroke-width: 0.5;
    stroke-dasharray: 4, 4;
}

.radar-center {
    fill: var(--color-primary);
}

.radar-sweep {
    transform-origin: center;
    animation: sweep 4s linear infinite;
}

@keyframes sweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.radar-node {
    cursor: pointer;
    transition: transform var(--transition-fast);
    animation: node-appear 0.5s ease forwards;
    opacity: 0;
}

@keyframes node-appear {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.radar-node:hover {
    transform: scale(1.1);
}

/* Pulse rings */
.pulse-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.pulse-ring.active {
    animation: pulse-expand 2s ease-out forwards;
}

@keyframes pulse-expand {
    0% {
        width: 20px;
        height: 20px;
        opacity: 0.8;
    }
    100% {
        width: 280px;
        height: 280px;
        opacity: 0;
    }
}

/* User list */
.nearby-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.user-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-card:active {
    transform: scale(0.98);
    background: var(--bg-tertiary);
}

.user-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.online-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: var(--color-success);
    border: 2px solid var(--bg-primary);
    border-radius: 50%;
}

.online-dot.large {
    width: 16px;
    height: 16px;
    border-width: 3px;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.user-objective {
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.user-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.75rem;
}

.distance {
    color: var(--color-primary);
    font-weight: 500;
}

.traits {
    display: flex;
    gap: 4px;
}

.trait {
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

.user-points {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.points-badge {
    padding: 4px 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-accent);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: var(--space-2xl);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.empty-state h3 {
    margin-bottom: var(--space-sm);
}

.empty-state p {
    color: var(--text-muted);
}

/* ============================================
   Profile View
   ============================================ */
.profile-view {
    padding: var(--space-md);
    padding-top: calc(var(--safe-top) + var(--space-md));
    max-width: 480px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-xl) 0;
}

.profile-avatar-container {
    position: relative;
    margin-bottom: var(--space-lg);
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.3);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-edit-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    background: var(--color-primary);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.profile-points {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-points .points-value {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.profile-points .points-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Traits */
.traits-container {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

.selected-traits {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.trait-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-primary);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
}

.trait-chip button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.trait-input-wrapper input {
    background: transparent;
    border: none;
    padding: var(--space-sm) 0;
}

.trait-input-wrapper input:focus {
    box-shadow: none;
}

.trait-suggestions {
    display: none;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-color);
}

.trait-suggestions.visible {
    display: flex;
}

.suggestion-item {
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.suggestion-item:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Profile stats */
.profile-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    padding: var(--space-xl) 0;
    margin-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

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

.stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    text-transform: capitalize;
}

.stat-value.verified {
    color: var(--color-success);
}

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

/* Character count */
.char-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.char-count.limit {
    color: var(--color-warning);
}

/* ============================================
   Settings View
   ============================================ */
.settings-content {
    padding: var(--space-md) 0;
}

.settings-section {
    margin-bottom: var(--space-xl);
}

.settings-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-md);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
}

.setting-item label {
    color: var(--text-primary);
    font-weight: 500;
}

.setting-value {
    color: var(--text-secondary);
}

.setting-value.verified {
    color: var(--color-success);
}

.setting-value.unverified {
    color: var(--text-muted);
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.modal-overlay.visible {
    opacity: 1;
}

.modal {
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: var(--space-xl);
    padding-bottom: calc(var(--space-xl) + var(--safe-bottom));
    transform: translateY(100%);
    transition: transform var(--transition-slow);
    overflow-y: auto;
}

.modal-overlay.visible .modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* User detail modal */
.user-detail-modal {
    position: relative;
    text-align: center;
}

.user-detail-header {
    padding: var(--space-lg) 0;
}

.user-detail-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin: 0 auto var(--space-md);
    position: relative;
}

.user-detail-meta {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-top: var(--space-sm);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.user-detail-objective {
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    font-style: italic;
    color: var(--text-secondary);
}

.user-detail-traits {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.trait-tag {
    padding: var(--space-xs) var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.user-detail-status {
    margin-bottom: var(--space-lg);
}

.status {
    font-size: 0.875rem;
}

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

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

.user-detail-actions {
    padding-top: var(--space-md);
}

/* ============================================
   Toast Notifications
   ============================================ */
#toast-container {
    position: fixed;
    top: calc(var(--safe-top) + var(--space-md));
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    width: 90%;
    max-width: 400px;
}

.toast {
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    opacity: 0;
    transform: translateY(-20px);
    transition: all var(--transition-base);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

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

.toast-error {
    background: var(--color-error);
    color: white;
}

.toast-warning {
    background: var(--color-warning);
    color: var(--bg-primary);
}

.toast-info {
    background: var(--color-primary);
    color: white;
}

/* ============================================
   Loading States
   ============================================ */
#loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 15, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 400;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

#loading-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-large {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pull to refresh indicator */
#pull-indicator {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-60px);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    transition: transform 0.1s ease-out;
}

#pull-indicator.refreshing .spinner {
    animation: spin 0.8s linear infinite;
}

/* ============================================
   Verification Results
   ============================================ */
.verify-result {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    text-align: center;
}

.verify-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: var(--space-lg);
}

.verify-icon.success {
    background: rgba(34, 197, 94, 0.2);
    color: var(--color-success);
}

.verify-icon.error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--color-error);
}

.verify-result h2 {
    margin-bottom: var(--space-sm);
}

.verify-result p {
    margin-bottom: var(--space-xl);
    max-width: 300px;
}

/* ============================================
   404 Not Found
   ============================================ */
.not-found {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-xl);
}

.not-found h2 {
    font-size: 4rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-sm);
}

.not-found p {
    margin-bottom: var(--space-xl);
}

/* ============================================
   Touch Feedback
   ============================================ */
.touch-feedback {
    transition: transform var(--transition-fast), background var(--transition-fast);
}

.touch-feedback.touching {
    transform: scale(0.98);
    background: var(--bg-tertiary);
}

/* ============================================
   Skeleton Loading
   ============================================ */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 0%,
        var(--bg-secondary) 50%,
        var(--bg-tertiary) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 600; }
.mt-auto { margin-top: auto; }
.mb-0 { margin-bottom: 0; }

/* ============================================
   Media Queries
   ============================================ */
@media (min-width: 768px) {
    :root {
        --nav-height: 72px;
    }
    
    .radar-container {
        max-width: 400px;
    }
    
    .modal {
        border-radius: var(--radius-xl);
        max-height: 80vh;
        margin-bottom: var(--space-xl);
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
