/* ═══════════════════════════════════════════════════════════
   VIRAL COLLECTIVE — Vaporwave Neon Theme
   ═══════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ─────────────────────────────── */
:root {
    --pink: #ff2d78;
    --cyan: #00f0ff;
    --purple: #bf5af2;
    --dark-1: #0a0a1a;
    --dark-2: #12121f;
    --dark-3: #1a1a2e;
    --dark-4: #252540;
    --dark-5: #2d2d50;
    --text-primary: #ffffff;
    --text-secondary: #a0a0c0;
    --text-muted: #6b6b8d;
    --gradient-pink: linear-gradient(135deg, #ff2d78, #ff6b9d);
    --gradient-cyan: linear-gradient(135deg, #00f0ff, #00b8d4);
    --gradient-purple: linear-gradient(135deg, #bf5af2, #8b5cf6);
    --gradient-mixed: linear-gradient(135deg, #ff2d78, #bf5af2, #00f0ff);
    --gradient-card: linear-gradient(145deg, rgba(255,45,120,0.08), rgba(0,240,255,0.05));
    --glow-pink: 0 0 20px rgba(255,45,120,0.3), 0 0 40px rgba(255,45,120,0.1);
    --glow-cyan: 0 0 20px rgba(0,240,255,0.3), 0 0 40px rgba(0,240,255,0.1);
    --glow-purple: 0 0 20px rgba(191,90,242,0.3), 0 0 40px rgba(191,90,242,0.1);
    --border-glow: 1px solid rgba(255,45,120,0.2);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --nav-height: 70px;
    --header-height: 60px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Orbitron', 'Inter', sans-serif;
}

/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Orbitron:wght@400;500;600;700;800;900&display=swap');

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

body {
    font-family: var(--font);
    background: var(--dark-1);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--cyan); text-decoration: none; transition: all 0.3s ease; }
a:hover { color: var(--pink); }

/* ── Background Effects ────────────────────────────────── */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(191,90,242,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255,45,120,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0,240,255,0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Grid lines effect */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(rgba(0,240,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,240,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* ── Auth Pages ────────────────────────────────────────── */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: linear-gradient(145deg, var(--dark-2), var(--dark-3));
    border: 1px solid rgba(255,45,120,0.15);
    border-radius: var(--radius);
    padding: 40px 32px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--glow-pink);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-mixed);
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo h1 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-mixed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 4px;
}

.auth-logo .subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.auth-logo .palm-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 10px rgba(0,240,255,0.5));
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--dark-1);
    border: 1px solid var(--dark-5);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font);
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--pink);
    box-shadow: 0 0 0 3px rgba(255,45,120,0.15);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    width: 100%;
    background: var(--gradient-pink);
    color: white;
    box-shadow: 0 4px 15px rgba(255,45,120,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,45,120,0.4);
}

.btn-cyan {
    background: var(--gradient-cyan);
    color: var(--dark-1);
    box-shadow: 0 4px 15px rgba(0,240,255,0.3);
}

.btn-cyan:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,240,255,0.4);
}

.btn-purple {
    background: var(--gradient-purple);
    color: white;
    box-shadow: 0 4px 15px rgba(191,90,242,0.3);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--pink);
    color: var(--pink);
}

.btn-outline:hover {
    background: rgba(255,45,120,0.1);
}

.btn-ghost {
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.1);
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.error-msg {
    background: rgba(255,45,120,0.15);
    border: 1px solid rgba(255,45,120,0.3);
    color: var(--pink);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--cyan);
    font-weight: 600;
}

/* ── App Layout ────────────────────────────────────────── */
.app-layout {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding-bottom: calc(var(--nav-height) + 20px);
}

/* ── Top Header ────────────────────────────────────────── */
.top-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10,10,26,0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,45,120,0.1);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 800;
    background: var(--gradient-mixed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.diamond-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,240,255,0.1);
    border: 1px solid rgba(0,240,255,0.2);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cyan);
}

.diamond-badge .icon { font-size: 1rem; }

.level-badge {
    background: rgba(191,90,242,0.15);
    border: 1px solid rgba(191,90,242,0.3);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--purple);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── Bottom Nav ────────────────────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: rgba(10,10,26,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,45,120,0.15);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 8px;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
}

.nav-item .nav-icon {
    font-size: 1.4rem;
    transition: all 0.3s ease;
}

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

.nav-item.active .nav-icon {
    filter: drop-shadow(0 0 8px rgba(255,45,120,0.6));
    transform: scale(1.1);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--gradient-pink);
    border-radius: 0 0 3px 3px;
}

.nav-item:hover {
    color: var(--pink);
}

/* ── Page Content ──────────────────────────────────────── */
.page-content {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.page-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--gradient-mixed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Cards ─────────────────────────────────────────────── */
.card {
    background: linear-gradient(145deg, var(--dark-2), var(--dark-3));
    border: 1px solid rgba(255,45,120,0.1);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card:hover {
    border-color: rgba(255,45,120,0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.card-glow-pink { border-color: rgba(255,45,120,0.2); box-shadow: var(--glow-pink); }
.card-glow-cyan { border-color: rgba(0,240,255,0.2); box-shadow: var(--glow-cyan); }
.card-glow-purple { border-color: rgba(191,90,242,0.2); box-shadow: var(--glow-purple); }

/* ── Welcome Card ──────────────────────────────────────── */
.welcome-card {
    background: linear-gradient(135deg, rgba(255,45,120,0.15), rgba(191,90,242,0.1), rgba(0,240,255,0.08));
    border: 1px solid rgba(255,45,120,0.2);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '🌴';
    position: absolute;
    top: -10px;
    right: -5px;
    font-size: 5rem;
    opacity: 0.15;
    transform: rotate(15deg);
}

.welcome-card h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.welcome-card .welcome-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.xp-bar-container {
    background: var(--dark-1);
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
    margin-top: 12px;
    position: relative;
}

.xp-bar {
    height: 100%;
    background: var(--gradient-mixed);
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

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

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

.xp-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* ── Quick Access Grid ─────────────────────────────────── */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.quick-card {
    background: linear-gradient(145deg, var(--dark-2), var(--dark-3));
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
}

.quick-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.quick-card .quick-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.quick-card .quick-label {
    font-size: 0.85rem;
    font-weight: 600;
}

.quick-card:nth-child(1) { border-color: rgba(255,45,120,0.2); }
.quick-card:nth-child(1):hover { box-shadow: var(--glow-pink); }
.quick-card:nth-child(2) { border-color: rgba(0,240,255,0.2); }
.quick-card:nth-child(2):hover { box-shadow: var(--glow-cyan); }
.quick-card:nth-child(3) { border-color: rgba(191,90,242,0.2); }
.quick-card:nth-child(3):hover { box-shadow: var(--glow-purple); }
.quick-card:nth-child(4) { border-color: rgba(0,240,255,0.2); }
.quick-card:nth-child(4):hover { box-shadow: var(--glow-cyan); }

/* ── Tip Card ──────────────────────────────────────────── */
.tip-card {
    background: linear-gradient(145deg, rgba(0,240,255,0.08), rgba(191,90,242,0.05));
    border: 1px solid rgba(0,240,255,0.15);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.tip-card .tip-header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--cyan);
    margin-bottom: 8px;
}

.tip-card .tip-text {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.6;
}

/* ── Academy ───────────────────────────────────────────── */
.category-section {
    margin-bottom: 28px;
}

.category-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--cyan);
    margin-bottom: 14px;
    padding-left: 4px;
}

.module-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(145deg, var(--dark-2), var(--dark-3));
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-primary);
}

.module-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255,45,120,0.2);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.module-card.locked {
    opacity: 0.5;
    pointer-events: none;
}

.module-card.completed {
    border-color: rgba(0,240,255,0.2);
}

.module-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.module-icon.pink-bg { background: rgba(255,45,120,0.15); }
.module-icon.cyan-bg { background: rgba(0,240,255,0.15); }
.module-icon.purple-bg { background: rgba(191,90,242,0.15); }

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

.module-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.module-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.module-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.module-status {
    flex-shrink: 0;
    font-size: 1.2rem;
}

/* ── Module Detail ─────────────────────────────────────── */
.module-header {
    background: linear-gradient(135deg, rgba(255,45,120,0.12), rgba(191,90,242,0.08));
    border: 1px solid rgba(255,45,120,0.15);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.module-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.module-header .module-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.module-header .module-rewards {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
}

.module-header .module-rewards span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.module-content {
    background: linear-gradient(145deg, var(--dark-2), var(--dark-3));
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    line-height: 1.8;
}

.module-content h2 {
    font-size: 1.2rem;
    color: var(--pink);
    margin-bottom: 12px;
}

.module-content h3 {
    font-size: 1rem;
    color: var(--cyan);
    margin-top: 20px;
    margin-bottom: 10px;
}

.module-content p {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.module-content ul, .module-content ol {
    margin-left: 20px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.module-content li {
    margin-bottom: 6px;
}

.module-content strong {
    color: var(--text-primary);
}

.module-actions {
    text-align: center;
    padding: 20px 0;
}

.completed-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,240,255,0.1);
    border: 1px solid rgba(0,240,255,0.3);
    border-radius: var(--radius-sm);
    padding: 14px 24px;
    color: var(--cyan);
    font-weight: 600;
}

.locked-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    padding: 14px 24px;
    color: var(--text-muted);
    font-weight: 600;
}

/* ── Masterclass ───────────────────────────────────────── */
.mc-card {
    background: linear-gradient(145deg, var(--dark-2), var(--dark-3));
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
    display: block;
}

.mc-card:hover {
    transform: translateY(-2px);
    border-color: rgba(191,90,242,0.25);
    box-shadow: var(--glow-purple);
}

.mc-card.locked {
    opacity: 0.5;
    pointer-events: none;
}

.mc-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.mc-emoji {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(191,90,242,0.1);
    border-radius: 14px;
    flex-shrink: 0;
}

.mc-info h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.mc-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mc-progress-bar {
    background: var(--dark-1);
    border-radius: 6px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 6px;
}

.mc-progress-fill {
    height: 100%;
    background: var(--gradient-purple);
    border-radius: 6px;
    transition: width 0.6s ease;
}

.mc-progress-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

/* ── Lesson List ───────────────────────────────────────── */
.lesson-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: linear-gradient(145deg, var(--dark-2), var(--dark-3));
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.lesson-item:hover {
    border-color: rgba(191,90,242,0.2);
    transform: translateX(4px);
}

.lesson-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    background: rgba(191,90,242,0.15);
    color: var(--purple);
    border: 1px solid rgba(191,90,242,0.3);
}

.lesson-item.completed .lesson-num {
    background: rgba(0,240,255,0.15);
    color: var(--cyan);
    border-color: rgba(0,240,255,0.3);
}

.lesson-title {
    flex: 1;
    font-weight: 500;
    font-size: 0.95rem;
}

.lesson-check {
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ── Milestones ────────────────────────────────────────── */
.milestone-card {
    background: linear-gradient(145deg, var(--dark-2), var(--dark-3));
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.milestone-card.earned {
    border-color: rgba(0,240,255,0.3);
    box-shadow: var(--glow-cyan);
}

.milestone-ring {
    width: 70px;
    height: 70px;
    position: relative;
    flex-shrink: 0;
}

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

.milestone-ring .ring-bg {
    fill: none;
    stroke: var(--dark-4);
    stroke-width: 4;
}

.milestone-ring .ring-fill {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

.milestone-ring .ring-fill.pink { stroke: var(--pink); }
.milestone-ring .ring-fill.cyan { stroke: var(--cyan); }
.milestone-ring .ring-fill.purple { stroke: var(--purple); }

.milestone-ring .ring-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
}

.milestone-info {
    flex: 1;
}

.milestone-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
}

.milestone-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

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

.milestone-earned-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--cyan);
    background: rgba(0,240,255,0.1);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(0,240,255,0.3);
}

/* ── Community ─────────────────────────────────────────── */
.post-composer {
    background: linear-gradient(145deg, var(--dark-2), var(--dark-3));
    border: 1px solid rgba(255,45,120,0.15);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
}

.post-composer textarea {
    width: 100%;
    background: var(--dark-1);
    border: 1px solid var(--dark-5);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.95rem;
    padding: 14px;
    resize: none;
    outline: none;
    min-height: 80px;
    transition: border-color 0.3s;
}

.post-composer textarea:focus {
    border-color: var(--pink);
}

.post-composer textarea::placeholder {
    color: var(--text-muted);
}

.post-composer .composer-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.post-card {
    background: linear-gradient(145deg, var(--dark-2), var(--dark-3));
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-mixed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.post-author-info {
    flex: 1;
}

.post-author-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.post-author-level {
    font-size: 0.7rem;
    color: var(--text-muted);
}

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

.post-body {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.post-actions {
    display: flex;
    gap: 16px;
}

.like-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-family: var(--font);
}

.like-btn:hover {
    background: rgba(255,45,120,0.1);
    color: var(--pink);
}

.like-btn.liked {
    color: var(--pink);
}

.like-btn .heart {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.like-btn.liked .heart {
    animation: heartPop 0.4s ease;
}

@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ── Profile ───────────────────────────────────────────── */
.profile-header {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(255,45,120,0.1), rgba(191,90,242,0.08), rgba(0,240,255,0.05));
    border: 1px solid rgba(255,45,120,0.15);
    border-radius: var(--radius);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '🌴';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 3rem;
    opacity: 0.1;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-mixed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    margin: 0 auto 12px;
    box-shadow: 0 0 30px rgba(255,45,120,0.3);
}

.profile-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-bio {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.profile-handle {
    color: var(--cyan);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
}

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

.stat-value {
    font-size: 1.3rem;
    font-weight: 800;
    font-family: var(--font-display);
    background: var(--gradient-mixed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.achievements-section {
    margin-top: 20px;
}

.achievements-section h3 {
    font-family: var(--font-display);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--purple);
    margin-bottom: 12px;
}

.achievement-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(191,90,242,0.1);
    border: 1px solid rgba(191,90,242,0.3);
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--purple);
    margin: 4px;
}

/* ── Profile Edit Form ─────────────────────────────────── */
.profile-form {
    background: linear-gradient(145deg, var(--dark-2), var(--dark-3));
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius);
    padding: 20px;
}

.profile-form h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--cyan);
}

/* ── Coach Chat ────────────────────────────────────────── */
.coach-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height) - var(--nav-height) - 40px);
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

.coach-header {
    background: linear-gradient(135deg, rgba(255,45,120,0.1), rgba(0,240,255,0.08));
    border: 1px solid rgba(255,45,120,0.15);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    text-align: center;
}

.coach-header h2 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.coach-header p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-msg.user {
    align-self: flex-end;
    background: var(--gradient-pink);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-msg.bot {
    align-self: flex-start;
    background: var(--dark-3);
    border: 1px solid rgba(0,240,255,0.15);
    color: var(--text-secondary);
    border-bottom-left-radius: 4px;
}

.chat-msg.bot strong {
    color: var(--text-primary);
}

.chat-input-area {
    display: flex;
    gap: 10px;
    padding: 12px 0;
}

.chat-input-area input {
    flex: 1;
    padding: 14px 16px;
    background: var(--dark-2);
    border: 1px solid var(--dark-5);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font);
    outline: none;
}

.chat-input-area input:focus {
    border-color: var(--pink);
}

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

.chat-input-area button {
    padding: 14px 20px;
    background: var(--gradient-pink);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-input-area button:hover {
    transform: scale(1.05);
    box-shadow: var(--glow-pink);
}

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--dark-1);
}

::-webkit-scrollbar-thumb {
    background: var(--dark-4);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-5);
}

/* ── Utilities ─────────────────────────────────────────── */
.text-pink { color: var(--pink); }
.text-cyan { color: var(--cyan); }
.text-purple { color: var(--purple); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-center { text-align: center; }
.mt-12 { margin-top: 12px; }
.mt-20 { margin-top: 20px; }
.mb-12 { margin-bottom: 12px; }
.mb-20 { margin-bottom: 20px; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }

/* ── Back Link ─────────────────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 16px;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--pink);
}

/* ── Sub-tabs ──────────────────────────────────────────── */
.sub-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.sub-tabs::-webkit-scrollbar { display: none; }

.sub-tab {
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary);
    background: var(--dark-3);
}

.sub-tab:hover, .sub-tab.active {
    color: var(--text-primary);
    border-color: var(--pink);
    background: rgba(255,45,120,0.15);
}

/* ── Animations ────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeInUp 0.4s ease forwards;
}

.animate-in:nth-child(1) { animation-delay: 0s; }
.animate-in:nth-child(2) { animation-delay: 0.05s; }
.animate-in:nth-child(3) { animation-delay: 0.1s; }
.animate-in:nth-child(4) { animation-delay: 0.15s; }
.animate-in:nth-child(5) { animation-delay: 0.2s; }
.animate-in:nth-child(6) { animation-delay: 0.25s; }

/* ── Responsive ────────────────────────────────────────── */
@media (min-width: 768px) {
    .page-content {
        padding: 24px;
    }
    .quick-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ── Neon text glow helper ─────────────────────────────── */
.neon-pink {
    color: var(--pink);
    text-shadow: 0 0 10px rgba(255,45,120,0.5), 0 0 20px rgba(255,45,120,0.3);
}

.neon-cyan {
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(0,240,255,0.5), 0 0 20px rgba(0,240,255,0.3);
}

.neon-purple {
    color: var(--purple);
    text-shadow: 0 0 10px rgba(191,90,242,0.5), 0 0 20px rgba(191,90,242,0.3);
}

/* ── Empty state ───────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.9rem;
}
