/* ForkMonkey - Professional Cyberpunk Design System */
/* Version 2.0 - Complete Redesign */

/* ========================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ======================================== */

:root {
    /* Primary Color Palette - Neon Green */
    --primary: #00ff88;
    --primary-dark: #00cc6a;
    --primary-light: #66ffb3;
    --primary-glow: rgba(0, 255, 136, 0.4);
    --primary-subtle: rgba(0, 255, 136, 0.1);

    /* Secondary - Neon Pink/Red */
    --secondary: #ff0055;
    --secondary-dark: #cc0044;
    --secondary-light: #ff3377;
    --secondary-glow: rgba(255, 0, 85, 0.4);

    /* Accent - Electric Blue */
    --accent: #00ccff;
    --accent-dark: #0099cc;
    --accent-light: #66ddff;
    --accent-glow: rgba(0, 204, 255, 0.4);

    /* Warning/Gold */
    --gold: #ffd700;
    --gold-glow: rgba(255, 215, 0, 0.4);

    /* Rarity Colors */
    --common: #8b8b8b;
    --uncommon: #00ff88;
    --rare: #00ccff;
    --epic: #aa00ff;
    --legendary: #ffd700;

    /* Background Colors */
    --bg-dark: #0a0a0f;
    --bg-darker: #050508;
    --bg-card: rgba(20, 20, 30, 0.8);
    --bg-card-hover: rgba(30, 30, 45, 0.9);
    --bg-panel: rgba(15, 15, 25, 0.85);
    --bg-input: rgba(10, 10, 20, 0.9);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #b0b0c0;
    --text-muted: #6a6a7a;
    --text-dim: #4a4a5a;

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    --border-medium: rgba(255, 255, 255, 0.2);
    --border-glow: rgba(0, 255, 136, 0.3);

    /* Spacing Scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Typography */
    --font-display: 'Press Start 2P', cursive;
    --font-body: 'Space Grotesk', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px var(--primary-glow), 0 0 40px var(--primary-glow);

    /* Blur */
    --blur-sm: blur(8px);
    --blur-md: blur(16px);
    --blur-lg: blur(24px);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Z-Index Scale */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 1000;
    --z-toast: 1100;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: var(--radius-full);
}

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

/* Selection */
::selection {
    background: var(--primary);
    color: var(--bg-dark);
}

/* ========================================
   PARTICLES BACKGROUND
   ======================================== */

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #0f0f1a 50%, #1a0a1a 100%);
}

/* ========================================
   GLASS PANEL COMPONENT
   ======================================== */

.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: var(--blur-md);
    -webkit-backdrop-filter: var(--blur-md);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.glass-panel:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   APP CONTAINER & LAYOUT
   ======================================== */

.app-container {
    position: relative;
    z-index: var(--z-base);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 1600px;
    margin: 0 auto;
    padding: var(--space-md);
    gap: var(--space-md);
}

/* ========================================
   NAVIGATION HEADER
   ======================================== */

.nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    position: sticky;
    top: var(--space-md);
    z-index: var(--z-sticky);
    gap: var(--space-lg);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.brand-icon {
    font-size: var(--text-3xl);
    filter: drop-shadow(0 0 10px var(--primary-glow));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

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

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

.brand-text h1 {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
}

.brand-tagline {
    font-size: var(--text-xs);
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.nav-tabs {
    display: flex;
    gap: var(--space-xs);
    background: var(--bg-card);
    padding: var(--space-xs);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav-tab:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.nav-tab.active {
    color: var(--bg-dark);
    background: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.tab-icon {
    font-size: var(--text-base);
}

.nav-stats {
    display: flex;
    gap: var(--space-md);
}

.quick-stat {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.quick-stat .stat-icon {
    font-size: var(--text-base);
}

.quick-stat .stat-value {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--primary);
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

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

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

/* ========================================
   DASHBOARD LAYOUT
   ======================================== */

.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: var(--space-lg);
}

/* Hero Panel - Monkey Display */
.hero-panel {
    grid-column: 1;
    grid-row: 1 / 3;
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.monkey-showcase {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.monkey-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    filter: blur(40px);
    animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {

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

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

.monkey-frame {
    position: relative;
    width: 100%;
    max-width: 350px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
}

.monkey-frame svg {
    width: 100%;
    height: 100%;
    max-width: 300px;
    max-height: 300px;
    filter: drop-shadow(0 0 30px var(--primary-glow));
    transition: transform var(--transition-base);
}

.monkey-frame:hover svg {
    transform: scale(1.05);
}

.monkey-identity {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: center;
}

.dna-badge {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

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

.dna-value {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--primary);
    background: none;
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: var(--text-base);
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.copy-btn:hover {
    opacity: 1;
}

.action-buttons {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.action-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    color: var(--text-primary);
}

.action-btn.primary {
    background: var(--primary);
    color: var(--bg-dark);
    border-color: var(--primary);
    font-weight: 600;
}

.action-btn.primary:hover {
    background: var(--primary-light);
    box-shadow: var(--shadow-glow);
}

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

.panel-title {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    color: var(--primary);
    margin-bottom: var(--space-lg);
    letter-spacing: 1px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.stat-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.stat-card.highlight {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, transparent 100%);
}

/* Streak Card Styling */
.stat-card.streak-card {
    position: relative;
    overflow: hidden;
}

.stat-card.streak-card.on-fire {
    border-color: #ff6b35;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15) 0%, rgba(255, 165, 0, 0.05) 100%);
    animation: streak-glow 2s ease-in-out infinite;
}

.stat-card.streak-card.on-fire .stat-icon-bg {
    animation: fire-bounce 0.5s ease-in-out infinite;
}

.stat-card.streak-card.on-fire::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
    animation: fire-pulse 2s ease-in-out infinite;
}

@keyframes streak-glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(255, 107, 53, 0.3), 0 0 10px rgba(255, 165, 0, 0.2);
    }

    50% {
        box-shadow: 0 0 15px rgba(255, 107, 53, 0.5), 0 0 25px rgba(255, 165, 0, 0.3);
    }
}

@keyframes fire-bounce {

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

    50% {
        transform: translateY(-3px) scale(1.1);
    }
}

@keyframes fire-pulse {

    0%,
    100% {
        opacity: 0.5;
        transform: rotate(0deg);
    }

    50% {
        opacity: 1;
        transform: rotate(180deg);
    }
}

.stat-icon-bg {
    font-size: var(--text-2xl);
}

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

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

.stat-number {
    font-family: var(--font-mono);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.parent-info {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    gap: var(--space-sm);
    font-size: var(--text-sm);
}

.parent-label {
    color: var(--text-muted);
}

.parent-value {
    color: var(--accent);
    font-weight: 500;
}

/* Achievements Mini Display */
.achievements-mini {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-subtle);
}

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

.achievements-title {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 600;
}

.achievements-count {
    font-size: var(--text-xs);
    color: var(--text-muted);
    background: var(--bg-card);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.achievements-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.achievement-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.achievement-icon:hover {
    transform: scale(1.15);
    border-color: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

.achievement-icon.locked {
    opacity: 0.3;
    filter: grayscale(1);
}

.achievement-icon.locked:hover {
    transform: none;
    border-color: var(--border-subtle);
    box-shadow: none;
}

/* Traits Panel */
.traits-panel {
    padding: var(--space-lg);
}

.traits-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    max-height: 300px;
    overflow-y: auto;
}

.trait-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--common);
    transition: all var(--transition-fast);
}

.trait-item:hover {
    transform: translateX(4px);
    border-color: var(--border-light);
}

.trait-item.uncommon {
    border-left-color: var(--uncommon);
}

.trait-item.rare {
    border-left-color: var(--rare);
}

.trait-item.epic {
    border-left-color: var(--epic);
}

.trait-item.legendary {
    border-left-color: var(--legendary);
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.05) 0%, transparent 100%);
}

.trait-name {
    font-size: var(--text-sm);
    color: var(--text-muted);
    text-transform: capitalize;
}

.trait-value {
    font-weight: 600;
    color: var(--text-primary);
    text-transform: capitalize;
}

.trait-rarity {
    font-size: var(--text-xs);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trait-rarity.common {
    background: rgba(139, 139, 139, 0.2);
    color: var(--common);
}

.trait-rarity.uncommon {
    background: rgba(0, 255, 136, 0.2);
    color: var(--uncommon);
}

.trait-rarity.rare {
    background: rgba(0, 204, 255, 0.2);
    color: var(--rare);
}

.trait-rarity.epic {
    background: rgba(170, 0, 255, 0.2);
    color: var(--epic);
}

.trait-rarity.legendary {
    background: rgba(255, 215, 0, 0.2);
    color: var(--legendary);
}

/* Network Mini Panel */
.network-mini {
    padding: var(--space-lg);
    grid-column: 2;
}

.network-stats-mini {
    display: flex;
    justify-content: space-around;
    margin-bottom: var(--space-md);
}

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

.mini-value {
    display: block;
    font-family: var(--font-mono);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--primary);
}

.mini-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
}

.last-updated {
    font-size: var(--text-xs);
    color: var(--text-dim);
    text-align: center;
}

/* ========================================
   EVOLUTION TIMELINE
   ======================================== */

.evolution-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

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

.evolution-header h2 {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    color: var(--primary);
}

.evolution-meta {
    display: flex;
    gap: var(--space-lg);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.timeline-container {
    padding: var(--space-lg);
    max-height: 70vh;
    overflow-y: auto;
}

.timeline-scroll {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding-right: var(--space-md);
}

.evolution-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-fast);
    cursor: pointer;
    padding: var(--space-md);
    gap: var(--space-lg);
}

.evolution-card:hover {
    border-color: var(--primary);
    transform: translateX(4px);
    box-shadow: var(--shadow-lg);
}

.evolution-card-preview {
    width: 70px;
    height: 70px;
    min-width: 70px;
    min-height: 70px;
    max-width: 70px;
    max-height: 70px;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05) 0%, rgba(0, 204, 255, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-subtle);
    padding: 4px;
    /* Ensure image fits inside with padding */
}

.evolution-card-preview svg {
    width: 100%;
    height: 100%;
    display: block;
}

.evolution-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    border-top: none;
    padding: 0;
}

.evolution-date {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.evolution-stats {
    display: flex;
    gap: var(--space-lg);
    font-size: var(--text-sm);
}

.evolution-gen {
    color: var(--primary);
    font-weight: 600;
}

.evolution-rarity {
    color: var(--gold);
}

.evolution-story {
    font-size: var(--text-xs);
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: var(--space-xs);
}

/* Evolution Detail Modal */
.evolution-detail-modal {
    display: flex;
    flex-direction: column;
}

.evolution-modal-image-container {
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    /* Ensure image fits inside */
}

.evolution-detail-modal svg {
    width: 100%;
    height: 100%;
    display: block;
}


/* ========================================
   COMMUNITY GALLERY
   ======================================== */

.community-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.community-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.community-header h2 {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    color: var(--primary);
}

.community-controls {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.filter-group label {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.filter-group select {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    cursor: pointer;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.community-count {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-lg);
    padding: var(--space-md);
}

.community-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-fast);
    cursor: pointer;
    text-decoration: none;
}

.community-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 30px var(--primary-glow);
}

.community-card.root {
    border-color: var(--gold);
}

.community-card.root:hover {
    box-shadow: var(--shadow-lg), 0 0 30px var(--gold-glow);
}

.card-preview {
    aspect-ratio: 1;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    position: relative;
}

.card-preview svg {
    width: 80%;
    height: 80%;
    max-width: 150px;
    max-height: 150px;
}

.card-badge {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    padding: 2px 8px;
    background: var(--gold);
    color: var(--bg-dark);
    font-size: var(--text-xs);
    font-weight: 700;
    border-radius: var(--radius-full);
}

.card-info {
    padding: var(--space-md);
    border-top: 1px solid var(--border-subtle);
}

.card-owner {
    font-size: var(--text-sm);
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: var(--space-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-stats {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-xs);
    color: var(--text-muted);
}

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

.card-stat-value {
    color: var(--primary);
    font-weight: 600;
    font-family: var(--font-mono);
}

/* ========================================
   LEADERBOARD
   ======================================== */

.leaderboard-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.leaderboard-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-lg);
}

.leaderboard-header h2 {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    color: var(--primary);
}

/* Leaderboard Controls */
.leaderboard-controls {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    align-items: center;
}

.leaderboard-search input {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--text-sm);
    min-width: 200px;
    transition: all var(--transition-fast);
}

.leaderboard-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.2);
}

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

.leaderboard-sort {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.sort-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.leaderboard-sort select {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.leaderboard-sort select:hover {
    border-color: var(--primary);
}

.find-me-btn {
    padding: var(--space-sm) var(--space-md);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: var(--radius-md);
    color: var(--bg-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.find-me-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
}

.leaderboard-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.leaderboard-count {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.your-rank {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--primary);
    border-radius: var(--radius-md);
    color: var(--primary);
    font-size: var(--text-sm);
    font-weight: 600;
}

/* Highlight current user's row */
.leaderboard-table tr.is-you {
    background: linear-gradient(90deg, rgba(0, 255, 136, 0.15) 0%, rgba(0, 255, 136, 0.05) 100%);
    border-left: 3px solid var(--primary);
}

.leaderboard-table tr.is-you td {
    position: relative;
}

.you-badge {
    display: inline-block;
    margin-left: var(--space-xs);
    padding: 2px 6px;
    background: var(--primary);
    color: var(--bg-primary);
    font-size: 10px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Pulse highlight animation for Find Me */
.leaderboard-table tr.pulse-highlight {
    animation: pulse-row 0.5s ease-out 3;
}

@keyframes pulse-row {

    0%,
    100% {
        background: linear-gradient(90deg, rgba(0, 255, 136, 0.15) 0%, rgba(0, 255, 136, 0.05) 100%);
    }

    50% {
        background: linear-gradient(90deg, rgba(0, 255, 136, 0.4) 0%, rgba(0, 255, 136, 0.2) 100%);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .leaderboard-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .leaderboard-search input {
        width: 100%;
    }

    .leaderboard-sort {
        justify-content: space-between;
    }

    .find-me-btn {
        width: 100%;
    }
}

.leaderboard-table-container {
    overflow-x: auto;
    padding: var(--space-md);
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.leaderboard-table th {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.leaderboard-table tbody tr {
    transition: all var(--transition-fast);
}

.leaderboard-table tbody tr:hover {
    background: var(--bg-card);
}

.leaderboard-table tbody tr.top-3 {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.05) 0%, transparent 100%);
}

.leaderboard-table tbody tr.current-user {
    background: linear-gradient(90deg, rgba(0, 255, 136, 0.1) 0%, transparent 100%);
    border-left: 3px solid var(--primary);
}

.rank-col {
    width: 80px;
}

.monkey-col {
    width: 100px;
}

.owner-col {
    min-width: 200px;
}

.rarity-col {
    width: 100px;
}

.gen-col {
    width: 80px;
}

.age-col {
    width: 100px;
}

.rank-display {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: var(--text-lg);
}

.rank-display.gold {
    color: var(--gold);
}

.rank-display.silver {
    color: #c0c0c0;
}

.rank-display.bronze {
    color: #cd7f32;
}

.rank-medal {
    font-size: var(--text-xl);
}

.monkey-preview {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
}

.monkey-preview svg {
    width: 100%;
    height: 100%;
}

.owner-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}

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

.rarity-display {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--gold);
}

/* ========================================
   FAMILY TREE
   ======================================== */

.family-tree-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    height: calc(100vh - 200px);
    min-height: 500px;
}

.tree-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.tree-header h2 {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    color: var(--primary);
}

.tree-controls {
    display: flex;
    gap: var(--space-sm);
}

.tree-btn {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tree-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.tree-legend {
    display: flex;
    gap: var(--space-lg);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.legend-item .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.root {
    background: var(--gold);
}

.dot.fork {
    background: var(--primary);
}

.dot.current {
    background: var(--secondary);
}

.tree-container {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.tree-canvas {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.tree-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

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

.tree-node-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tree-node-circle.root {
    border-color: var(--gold);
    box-shadow: 0 0 20px var(--gold-glow);
}

.tree-node-circle.current {
    border-color: var(--secondary);
    box-shadow: 0 0 20px var(--secondary-glow);
}

.tree-node-circle svg {
    width: 80%;
    height: 80%;
}

.tree-node-label {
    margin-top: var(--space-xs);
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-align: center;
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tree-line {
    position: absolute;
    background: var(--border-light);
    transform-origin: top left;
}

/* ========================================
   HIERARCHICAL TREE LAYOUT
   ======================================== */

.tree-hierarchy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: var(--space-xl);
    width: 100%;
}

.tree-level {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    width: 100%;
}

.level-label {
    font-family: var(--font-display);
    font-size: var(--text-xs);
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.level-count {
    font-family: var(--font-mono);
    color: var(--primary);
    font-size: var(--text-sm);
}

.level-nodes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
}

.tree-connector {
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, var(--border-light), var(--primary));
}

.tree-node-more {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* Degree-specific colors */
.tree-node-circle.degree-1 {
    border-color: #00ff88;
}

.tree-node-circle.degree-2 {
    border-color: #00ccff;
}

.tree-node-circle.degree-3 {
    border-color: #cc88ff;
}

/* Legend degree dots */
.dot.degree-1 {
    background: #00ff88;
}

.dot.degree-2 {
    background: #00ccff;
}

.dot.degree-3 {
    background: #cc88ff;
}

/* Level-specific styling */
.tree-level.level-root .level-label {
    color: var(--gold);
}

.tree-level.level-1 .level-label {
    color: #00ff88;
}

.tree-level.level-2 .level-label {
    color: #00ccff;
}

.tree-level.level-3 .level-label {
    color: #cc88ff;
}

/* Responsive for mobile */
@media (max-width: 768px) {
    .tree-hierarchy {
        padding: var(--space-md);
    }

    .tree-node-circle {
        width: 45px;
        height: 45px;
    }

    .level-nodes {
        gap: var(--space-sm);
    }

    .tree-legend {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }
}

/* ========================================
   FOOTER
   ======================================== */

.app-footer {
    padding: var(--space-md) var(--space-lg);
    margin-top: auto;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.footer-logo {
    font-size: var(--text-xl);
}

.footer-text {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: var(--space-md);
}

.footer-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: all var(--transition-fast);
}

.footer-link:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    color: var(--text-primary);
}

.footer-link.highlight {
    background: var(--primary);
    color: var(--bg-dark);
    border-color: var(--primary);
    font-weight: 600;
}

.footer-link.highlight:hover {
    background: var(--primary-light);
    box-shadow: var(--shadow-glow);
}

.footer-stats {
    display: flex;
    gap: var(--space-md);
}

.footer-stat {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

/* ========================================
   MODAL
   ======================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: var(--blur-md);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    padding: var(--space-lg);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: var(--space-xl);
}

.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: var(--text-xl);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--secondary);
    border-color: var(--secondary);
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */

.toast-container {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--text-sm);
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.toast.success {
    border-color: var(--primary);
}

.toast.error {
    border-color: var(--secondary);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

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

/* ========================================
   LOADING STATES
   ======================================== */

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-2xl);
    color: var(--text-muted);
}

.loading-state.small {
    padding: var(--space-lg);
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-state.small .loader {
    width: 24px;
    height: 24px;
    border-width: 2px;
}

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

.loading-cell {
    text-align: center;
    padding: var(--space-2xl) !important;
}

.loading-cell .loader {
    display: inline-block;
    margin-right: var(--space-md);
    vertical-align: middle;
}

/* ========================================
   EMPTY STATES
   ======================================== */

.empty-state {
    text-align: center;
    padding: var(--space-3xl);
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    opacity: 0.5;
}

.empty-state-title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
}

.empty-state-text {
    font-size: var(--text-sm);
    max-width: 400px;
    margin: 0 auto;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1200px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        grid-column: 1;
        grid-row: auto;
    }

    .nav-tabs {
        display: none;
    }

    .nav-header {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    :root {
        font-size: 14px;
    }

    .app-container {
        padding: var(--space-sm);
    }

    .nav-header {
        padding: var(--space-md);
        gap: var(--space-md);
    }

    .brand-text h1 {
        font-size: var(--text-base);
    }

    .nav-stats {
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .community-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .leaderboard-table {
        font-size: var(--text-sm);
    }

    .owner-col {
        min-width: 120px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Mobile Navigation */
@media (max-width: 1200px) {
    .nav-tabs {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        background: var(--bg-panel);
        backdrop-filter: var(--blur-lg);
        border-top: 1px solid var(--border-subtle);
        padding: var(--space-sm);
        gap: 0;
        border-radius: 0;
        z-index: var(--z-sticky);
    }

    .nav-tab {
        flex: 1;
        flex-direction: column;
        padding: var(--space-sm);
        font-size: var(--text-xs);
        gap: var(--space-xs);
    }

    .tab-text {
        display: none;
    }

    .tab-icon {
        font-size: var(--text-lg);
    }

    .app-footer {
        margin-bottom: 70px;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

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

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

.text-accent {
    color: var(--accent);
}

.text-gold {
    color: var(--gold);
}

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

.font-mono {
    font-family: var(--font-mono);
}

.font-display {
    font-family: var(--font-display);
}

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

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

.hidden {
    display: none !important;
}

.invisible {
    visibility: hidden;
}

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================================
   ADOPTION WIZARD
   ======================================== */

.adoption-wizard {
    max-width: 700px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

.wizard-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.wizard-header h2 {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    color: var(--primary);
    margin-bottom: var(--space-lg);
}

.wizard-steps {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    opacity: 0.4;
    transition: all var(--transition-base);
}

.wizard-step.active {
    opacity: 1;
}

.wizard-step.completed {
    opacity: 0.7;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: var(--text-sm);
    transition: all var(--transition-base);
}

.wizard-step.active .step-number {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--bg-dark);
    box-shadow: 0 0 20px var(--primary-glow);
}

.wizard-step.completed .step-number {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--bg-dark);
}

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

.wizard-step.active .step-label {
    color: var(--primary);
}

.wizard-content {
    animation: fadeIn 0.3s ease;
}

.wizard-intro {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    font-size: var(--text-base);
}

/* Adoption Methods Grid */
.adoption-methods {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.method-card {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.method-card:hover {
    border-color: var(--primary);
    transform: translateX(4px);
    background: var(--bg-card-hover);
}

.method-card:active {
    transform: scale(0.99);
}

.method-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.method-info {
    flex: 1;
}

.method-info h3 {
    font-size: var(--text-lg);
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.method-info p {
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-bottom: var(--space-sm);
}

.method-features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.method-features .feature {
    font-size: var(--text-xs);
    color: var(--primary);
    background: var(--primary-subtle);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.method-features .feature-warn {
    font-size: var(--text-xs);
    color: var(--gold);
    background: rgba(255, 215, 0, 0.1);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.method-badge {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    font-size: var(--text-xs);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.method-badge.recommended {
    background: var(--primary);
    color: var(--bg-dark);
    border-color: var(--primary);
}

.method-badge.premium {
    background: linear-gradient(135deg, var(--gold) 0%, #ff8c00 100%);
    color: var(--bg-dark);
    border-color: var(--gold);
}

/* Customization Form */
.customization-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-group label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input,
.form-group select {
    padding: var(--space-md);
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: var(--text-base);
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-subtle);
}

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

.form-group select option {
    background: var(--bg-dark);
    color: var(--text-primary);
}

.form-group select optgroup {
    color: var(--primary);
    font-weight: 600;
}

.form-hint {
    font-size: var(--text-xs);
    color: var(--text-dim);
    margin-top: var(--space-xs);
}

/* Wizard Actions */
.wizard-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-subtle);
}

.wizard-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.wizard-btn.primary {
    background: var(--primary);
    color: var(--bg-dark);
}

.wizard-btn.primary:hover {
    background: var(--primary-light);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.wizard-btn.secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.wizard-btn.secondary:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* Wizard States */
.wizard-loading,
.wizard-success,
.wizard-error {
    text-align: center;
    padding: var(--space-2xl) 0;
}

.wizard-loading .loader.large {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--space-lg);
}

.wizard-loading p {
    color: var(--text-secondary);
    font-size: var(--text-lg);
}

.success-icon,
.error-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
}

.wizard-success h3,
.wizard-error h3 {
    font-size: var(--text-xl);
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.wizard-success h3 {
    color: var(--primary);
}

.wizard-error h3 {
    color: var(--secondary);
}

.wizard-error p {
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

/* Footer Adopt Button Styling */
.adopt-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* ========================================
   VIRAL SHARE BUTTONS
   ======================================== */

.share-buttons {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.share-btn.twitter {
    background: linear-gradient(135deg, #1DA1F2 0%, #0d8ecf 100%);
    color: white;
}

.share-btn.twitter:hover {
    background: linear-gradient(135deg, #0d8ecf 0%, #0a6fa3 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(29, 161, 242, 0.4);
}

.share-btn.copy {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.share-btn.copy:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--primary);
}

/* ========================================
   HERO CTA SECTION
   ======================================== */

.hero-cta {
    text-align: center;
    padding: var(--space-lg) 0;
    margin-top: var(--space-lg);
    border-top: 1px solid var(--border-subtle);
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-2xl);
    font-family: var(--font-body);
    font-size: var(--text-lg);
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
}

.cta-button.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--bg-dark);
    box-shadow: 0 4px 20px var(--primary-glow);
}

.cta-button.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--primary-glow), 0 0 60px var(--primary-glow);
}

.cta-button.pulse {
    animation: cta-pulse 2s infinite;
}

@keyframes cta-pulse {

    0%,
    100% {
        box-shadow: 0 4px 20px var(--primary-glow);
    }

    50% {
        box-shadow: 0 4px 30px var(--primary-glow), 0 0 50px var(--primary-glow);
    }
}

.cta-subtext {
    margin-top: var(--space-md);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

/* ========================================
   SOCIAL PROOF BAR
   ======================================== */

.social-proof-bar {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-subtle);
}

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

.proof-number {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
}

.proof-label {
    display: block;
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

/* ========================================
   FLOATING MOBILE CTA
   ======================================== */

.floating-cta {
    position: fixed;
    bottom: 90px;
    right: var(--space-md);
    z-index: var(--z-sticky);
    padding: var(--space-md) var(--space-xl);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-full);
    box-shadow: 0 4px 20px var(--primary-glow);
    color: var(--bg-dark);
    font-weight: 700;
    font-size: var(--text-sm);
    text-decoration: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-base);
    pointer-events: none;
}

.floating-cta.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    animation: float-bounce 3s ease-in-out infinite;
}

@keyframes float-bounce {

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

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

.floating-cta:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px var(--primary-glow);
}

/* Hide on desktop, show on mobile */
@media (min-width: 1200px) {
    .floating-cta {
        display: none;
    }
}

/* ========================================
   FUN LOADING STATES
   ======================================== */

.loading-message {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    animation: fade-text 1.5s ease-in-out infinite;
}

@keyframes fade-text {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

/* ========================================
   ACHIEVEMENT TOAST (Future)
   ======================================== */

.toast.achievement {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 140, 0, 0.2) 100%);
    border-color: var(--gold);
    padding: var(--space-lg);
}

.toast.achievement .achievement-icon {
    font-size: var(--text-2xl);
    margin-right: var(--space-md);
}

/* ========================================
   QUICK STAT IMPROVEMENTS
   ======================================== */

.quick-stat {
    position: relative;
    cursor: default;
}

.quick-stat[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-dark);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    white-space: nowrap;
    z-index: 10;
}

/* Mobile Wizard */
@media (max-width: 600px) {
    .adoption-wizard {
        max-height: 85vh;
    }

    .wizard-steps {
        gap: var(--space-md);
    }

    .step-label {
        display: none;
    }

    .method-card {
        flex-direction: column;
        text-align: center;
        padding: var(--space-md);
    }

    .method-features {
        justify-content: center;
    }

    .method-badge {
        position: static;
        margin-top: var(--space-sm);
    }

    .wizard-actions {
        flex-direction: column;
    }

    .wizard-btn {
        width: 100%;
        justify-content: center;
    }
}