/* ===========================
   PINGU - PROFESSIONAL DASHBOARD
   Modern Dark Theme with Glass Effects
   =========================== */

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

:root {
    /* Core Colors - Refined Dark Theme */
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    
    /* Glass Effects */
    --glass: rgba(255, 255, 255, 0.03);
    --glass-hover: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.15);
    
    /* Premium Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    --gradient-accent: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --gradient-surface: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    --gradient-glow: radial-gradient(circle at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    
    /* Text Colors */
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.45);
    --text-accent: #a5b4fc;
    
    /* Accent Colors */
    --accent-blue: #6366f1;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-green: #10b981;
    --accent-cyan: #06b6d4;
    
    /* Spacing System */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --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 40px rgba(99, 102, 241, 0.3);
    --shadow-glow-lg: 0 0 80px rgba(99, 102, 241, 0.2);
    
    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    background-image: 
        radial-gradient(ellipse at top left, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

/* ===========================
   HEADER / TOP BAR
   =========================== */
.top-bar {
    background: linear-gradient(180deg, rgba(15, 15, 26, 0.95) 0%, rgba(15, 15, 26, 0.85) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1800px;
    margin: 0 auto;
    padding: var(--space-md) var(--space-xl);
}

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

.brand-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md), var(--shadow-glow);
    transition: var(--transition);
}

.brand:hover .brand-icon {
    transform: scale(1.05) rotate(-5deg);
    box-shadow: var(--shadow-lg), var(--shadow-glow-lg);
}

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

.brand-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.03em;
}

.brand-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.top-bar-status {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-green);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
        box-shadow: 0 0 10px var(--accent-green);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(0.9);
        box-shadow: 0 0 20px var(--accent-green);
    }
}

/* ===========================
   DASHBOARD GRID
   =========================== */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 320px 1fr 400px;
    gap: var(--space-xl);
    padding: var(--space-xl);
    max-width: 1800px;
    margin: 0 auto;
    flex: 1;
    width: 100%;
}

/* ===========================
   GLASS CARDS
   =========================== */
.glass-card {
    background: var(--gradient-surface);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.glass-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-md), 0 0 30px rgba(99, 102, 241, 0.3);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-accent);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.card-subtitle::before {
    content: '';
    width: 20px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

.card-text {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Insight cards */
.insight-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-height: 260px;
    overflow-y: auto;
    margin-top: var(--space-md);
}
.insight-card {
    padding: var(--space-md);
    border-radius: var(--radius-lg);
}
.tag-list {
    margin-top: var(--space-sm);
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}
.tag {
    background: rgba(255,255,255,0.06);
    color: var(--text-accent);
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 999px;
}

/* ===========================
   INFO PANEL (LEFT SIDEBAR)
   =========================== */
.info-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.welcome-card {
    animation: slideInLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.stats-card {
    animation: slideInLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.features-card {
    animation: slideInLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.stat-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 1.5rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

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

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.9rem;
    padding: var(--space-sm) 0;
    color: var(--text-secondary);
    transition: var(--transition);
}

.feature-item:hover {
    color: var(--text-primary);
    transform: translateX(4px);
}

.feature-check {
    width: 24px;
    height: 24px;
    background: var(--gradient-success);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* ===========================
   PINGU PANEL (CENTER)
   =========================== */
.pingu-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: fadeInScale 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.pingu-stage-wrapper {
    position: relative;
}

.pingu-stage {
    position: relative;
    width: 500px;
    height: 500px;
    --stage-accent: rgba(99, 102, 241, 0.35);
    background: radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.08) 40%, rgba(15, 15, 26, 0.4) 100%);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--space-xl);
    box-shadow: 
        var(--shadow-xl),
        inset 0 0 80px rgba(255, 255, 255, 0.03),
        0 0 100px rgba(99, 102, 241, 0.15),
        0 0 200px rgba(139, 92, 246, 0.1);
    transition: var(--transition-slow);
    overflow: visible;
    will-change: transform;
}

.pingu-stage::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), transparent, rgba(139, 92, 246, 0.3));
    z-index: -1;
    opacity: 0;
    transition: var(--transition);
}

.pingu-stage:hover {
    transform: scale(1.02);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 
        var(--shadow-xl),
        inset 0 0 100px rgba(255, 255, 255, 0.05),
        0 0 120px rgba(99, 102, 241, 0.25),
        0 0 250px rgba(139, 92, 246, 0.15);
}

.pingu-stage:hover::before {
    opacity: 1;
}

.pingu-stage.stage-drift {
    animation: stage-drift 18s ease-in-out infinite;
}

.pingu-stage.stage-pulse {
    animation: stage-pulse 1.1s ease-out;
}

.pingu-stage.stage-aura {
    box-shadow: var(--shadow-glow-lg) inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.pingu-stage.stage-aura .stage-glow {
    opacity: 1;
    filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.25));
}

.stage-glow {
    position: absolute;
    inset: -80px;
    background: radial-gradient(circle at center, var(--stage-accent) 0%, rgba(99, 102, 241, 0.05) 55%, transparent 90%);
    animation: rotate-glow 12s linear infinite;
    pointer-events: none;
    z-index: -1;
    opacity: 0.8;
    mix-blend-mode: screen;
}

.stage-spark {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    background: radial-gradient(circle, var(--spark-color, var(--stage-accent)) 0%, rgba(255, 255, 255, 0.25) 60%, transparent 100%);
    filter: blur(1px);
    animation: spark-rise 1.4s ease-out forwards;
    opacity: 0;
    transform-origin: center;
    mix-blend-mode: screen;
}

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

@keyframes stage-drift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-8px, 6px) scale(1.02); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes stage-pulse {
    0% { transform: scale(1); box-shadow: 0 0 60px rgba(99, 102, 241, 0.15); }
    50% { transform: scale(1.03); box-shadow: 0 0 100px rgba(99, 102, 241, 0.25); }
    100% { transform: scale(1); box-shadow: 0 0 60px rgba(99, 102, 241, 0.15); }
}

@keyframes spark-rise {
    0% { opacity: 1; transform: translateY(0) scale(0.5); }
    40% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-40px) scale(1.1); }
}

.pingu-container {
    position: relative;
    width: 420px;
    height: 420px;
}

.pingu-part {
    position: absolute;
    max-width: 100%;
    max-height: 100%;
    cursor: move;
    user-select: none;
    transition: filter 0.3s ease;
}

.pingu-part.dragging {
    filter: brightness(1.2) drop-shadow(0 10px 20px rgba(0,0,0,0.3));
    cursor: grabbing;
    z-index: 1000 !important;
}

.stage-info {
    margin-top: var(--space-xl);
    text-align: center;
}

.stage-status {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulse-dot 2s ease-in-out infinite;
}

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

/* ===========================
   CHAT PANEL (RIGHT SIDEBAR)
   =========================== */
.chat-panel {
    animation: slideInRight 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
    background: transparent;
    border-radius: var(--radius-xl);
    padding: 0;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.chat-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--gradient-surface);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.chat-header {
    padding: var(--space-lg) var(--space-xl);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.chat-header-info {
    flex: 1;
}

.chat-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.chat-title::before {
    content: '💬';
    font-size: 1rem;
}

.chat-status {
    font-size: 0.8rem;
    margin: 0;
    color: var(--accent-green);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.chat-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-green);
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border: 1px solid transparent;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--glass-border);
    transform: scale(1.05);
}

.chat-display {
    flex: 1;
    padding: var(--space-lg);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    background: rgba(0, 0, 0, 0.2);
}

.chat-display::-webkit-scrollbar {
    width: 6px;
}

.chat-display::-webkit-scrollbar-track {
    background: transparent;
}

.chat-display::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.chat-display::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.message {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    max-width: 88%;
    font-size: 0.9rem;
    line-height: 1.6;
    animation: messageSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-message {
    align-self: flex-end;
    background: var(--gradient-primary);
    color: white;
    border-bottom-right-radius: var(--radius-sm);
    box-shadow: var(--shadow-md), 0 4px 20px rgba(99, 102, 241, 0.3);
}

.pingu-message {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-bottom-left-radius: var(--radius-sm);
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chat-input-container {
    padding: var(--space-lg);
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: var(--space-sm);
}

.chat-input {
    flex: 1;
    padding: var(--space-md) var(--space-lg);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

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

.chat-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.send-btn {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-md), 0 4px 20px rgba(99, 102, 241, 0.3);
}

.send-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-lg), 0 8px 30px rgba(99, 102, 241, 0.4);
}

.send-btn:active {
    transform: translateY(0) scale(0.98);
}

/* ===========================
   FLOATING CONTROLS
   =========================== */
.floating-controls {
    position: fixed;
    bottom: var(--space-xl);
    left: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    z-index: 100;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

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

.control-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: rgba(15, 15, 26, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.control-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(4px) translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(99, 102, 241, 0.2);
}

.control-btn:active {
    transform: translateX(2px) translateY(0);
}

.control-btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--accent-blue);
}

.control-btn:active {
    transform: translateX(2px) translateY(0);
}

.control-btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--accent-blue);
}

/* ===========================
   PINGU ANIMATIONS
   =========================== */

/* Body Animations - Smooth and Natural */
@keyframes body-breath {
    0%, 100% { 
        transform: var(--base-transform, scale(1));
    }
    40% { 
        transform: var(--base-transform, scale(1.02)) translateY(-4px);
    }
    70% { 
        transform: var(--base-transform, scale(0.98)) translateY(2px);
    }
}

@keyframes body-sway {
    0%, 100% { 
        transform: var(--base-transform, scale(1)) rotate(0deg);
    }
    25% { 
        transform: var(--base-transform, scale(1.01)) rotate(-3deg);
    }
    75% { 
        transform: var(--base-transform, scale(1.01)) rotate(3deg);
    }
}

@keyframes body-bounce {
    0%, 100% { 
        transform: var(--base-transform, scale(1)) translateY(0);
    }
    25% { 
        transform: var(--base-transform, scale(1)) translateY(-15px);
    }
    50% { 
        transform: var(--base-transform, scale(1)) translateY(-25px);
    }
    75% { 
        transform: var(--base-transform, scale(1)) translateY(-10px);
    }
}

@keyframes body-wiggle {
    0%, 100% { 
        transform: var(--base-transform, scale(1)) rotate(0deg);
    }
    25% { 
        transform: var(--base-transform, scale(1)) rotate(-8deg);
    }
    50% { 
        transform: var(--base-transform, scale(1)) rotate(0deg);
    }
    75% { 
        transform: var(--base-transform, scale(1)) rotate(8deg);
    }
}

@keyframes body-nod {
    0%, 100% { 
        transform: var(--base-transform, scale(1)) rotate(0deg);
    }
    25% { 
        transform: var(--base-transform, scale(1)) rotate(-12deg) translateY(-3px);
    }
    50% { 
        transform: var(--base-transform, scale(1)) rotate(0deg);
    }
    75% { 
        transform: var(--base-transform, scale(1)) rotate(12deg) translateY(-3px);
    }
}

@keyframes body-shake {
    0%, 100% { 
        transform: var(--base-transform, scale(1)) translateX(0);
    }
    25% { 
        transform: var(--base-transform, scale(1)) translateX(-12px);
    }
    50% { 
        transform: var(--base-transform, scale(1)) translateX(12px);
    }
    75% { 
        transform: var(--base-transform, scale(1)) translateX(-8px);
    }
}

@keyframes body-tilt {
    0%, 100% { 
        transform: var(--base-transform, scale(1)) rotate(0deg) translateY(0);
    }
    50% { 
        transform: var(--base-transform, scale(1)) rotate(-20deg) translateY(-5px);
    }
}

/* Feet Animations */
@keyframes feet-tap {
    0%, 100% { 
        transform: var(--base-transform, scale(1)) translateY(0) rotate(0deg);
    }
    50% { 
        transform: var(--base-transform, scale(1)) translateY(-8px) rotate(-5deg);
    }
}

/* Eye Animations */
@keyframes eye-look-around {
    0%, 100% { 
        transform: var(--base-transform, scale(1)) translate(0, 0);
    }
    25% { 
        transform: var(--base-transform, scale(1)) translate(6px, -4px);
    }
    50% { 
        transform: var(--base-transform, scale(1)) translate(-6px, 2px);
    }
    75% { 
        transform: var(--base-transform, scale(1)) translate(0, 4px);
    }
}

@keyframes eye-widen {
    0%, 100% { 
        transform: var(--base-transform, scale(1));
    }
    50% { 
        transform: var(--base-transform, scale(1.25));
    }
}

@keyframes blink-animation {
    0%, 100% { 
        transform: var(--base-transform, scale(1)) scaleY(1);
    }
    50% { 
        transform: var(--base-transform, scale(1)) scaleY(0.05);
    }
}

/* Animation Classes */
.body-bounce {
    animation: body-bounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    transform-origin: center bottom;
}

.body-wiggle {
    animation: body-wiggle 1s ease-in-out !important;
    transform-origin: center bottom;
}

.body-nod {
    animation: body-nod 0.7s ease-in-out !important;
    transform-origin: center center;
}

.body-shake {
    animation: body-shake 0.6s ease-in-out !important;
    transform-origin: center center;
}

.body-tilt {
    animation: body-tilt 1.2s ease-in-out !important;
    transform-origin: center bottom;
}

.body-breath {
    animation: body-breath 6s ease-in-out infinite;
    transform-origin: center bottom;
}

.body-sway {
    animation: body-sway 3s ease-in-out !important;
    transform-origin: center bottom;
}

.feet-tap {
    animation: feet-tap 0.5s ease-in-out !important;
    transform-origin: center top;
}

.eye-look-around {
    animation: eye-look-around 2.4s ease-in-out !important;
    transform-origin: center center;
}

.eye-widen {
    animation: eye-widen 0.4s ease-out !important;
    transform-origin: center center;
}

.blink {
    animation: blink-animation 0.3s ease-in-out !important;
    transform-origin: center center;
}

/* Emotion-Based Animations */

/* Happy - Bounce and glow */
.happy {
    animation: body-bounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    filter: drop-shadow(0 8px 16px rgba(99, 102, 241, 0.3));
}

/* Excited - Wiggle and jump */
.excited {
    animation: body-wiggle 0.7s ease-in-out !important;
    filter: drop-shadow(0 12px 24px rgba(139, 92, 246, 0.4));
}

/* Thinking - Slow tilt */
.thinking {
    animation: body-tilt 1.5s ease-in-out !important;
    filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.2));
}

/* Celebrating - Bounce with intensity */
.celebrating {
    animation: body-bounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) 3 !important;
    filter: drop-shadow(0 12px 24px rgba(236, 72, 153, 0.5));
}

/* Sad - Slow shake */
.sad {
    animation: body-tilt 2s ease-in-out !important;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    opacity: 0.85;
}

/* Curious - Look around */
.curious {
    animation: eye-look-around 2.4s ease-in-out !important;
}

/* Agreeing - Nod */
.agreeing {
    animation: body-nod 0.7s ease-in-out !important;
}

/* Disagreeing - Shake */
.disagreeing {
    animation: body-shake 0.6s ease-in-out !important;
}

/* Playful - Wiggle */
.playful {
    animation: body-wiggle 0.9s ease-in-out !important;
    filter: drop-shadow(0 8px 16px rgba(236, 72, 153, 0.3));
}

/* Surprised/Widen eyes */
.surprised {
    animation: eye-widen 0.4s ease-out !important;
    filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.3));
}

/* Looking around */
.looking {
    animation: eye-look-around 1.5s ease-in-out !important;
}

/* Speaking mode - Subtle continuous animation */
.speaking-mode {
    animation: body-bounce 0.4s ease-in-out infinite;
    animation-direction: alternate;
}

/* Pingu Part Dragging - Visual feedback */
.pingu-part.dragging {
    filter: brightness(1.2) drop-shadow(0 10px 20px rgba(0,0,0,0.3));
    cursor: grabbing;
    z-index: 1000 !important;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 1400px) {
    .dashboard-grid {
        grid-template-columns: 280px 1fr 360px;
        gap: var(--space-lg);
    }
    
    .pingu-stage {
        width: 420px;
        height: 420px;
    }
    
    .pingu-container {
        width: 350px;
        height: 350px;
    }
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        max-width: 800px;
    }
    
    .info-panel {
        grid-row: 1;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .info-panel .glass-card {
        flex: 1;
        min-width: 280px;
    }
    
    .pingu-panel {
        grid-row: 2;
    }
    
    .chat-panel {
        grid-row: 3;
        height: 550px;
    }
}

@media (max-width: 768px) {
    .top-bar-content {
        padding: var(--space-md);
    }
    
    .brand-subtitle {
        display: none;
    }
    
    .dashboard-grid {
        padding: var(--space-md);
        gap: var(--space-md);
    }
    
    .info-panel {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .pingu-stage {
        width: 320px;
        height: 320px;
    }
    
    .pingu-container {
        width: 260px;
        height: 260px;
    }
    
    .floating-controls {
        bottom: var(--space-md);
        left: var(--space-md);
    }
    
    .control-btn span {
        display: none;
    }
    
    .editor-panel {
        width: 100%;
    }
    
    .glass-card {
        padding: var(--space-lg);
    }
    
    .card-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
}

/* ===========================
   FOOTER
   =========================== */
footer {
    background: linear-gradient(180deg, transparent 0%, rgba(15, 15, 26, 0.95) 100%);
    backdrop-filter: blur(10px);
    color: var(--text-muted);
    text-align: center;
    padding: var(--space-lg);
    margin-top: auto;
    border-top: 1px solid var(--glass-border);
    font-size: 0.875rem;
}

/* ===========================
   SELECTION & FOCUS STATES
   =========================== */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
}

:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* ===========================
   UTILITY CLASSES
   =========================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Editor specific highlights */
.pingu-part.editing {
    outline: 2px dashed rgba(165,180,252,0.9);
    transform-origin: center center;
    box-shadow: 0 6px 24px rgba(99,102,241,0.28);
}

/* Small adjustments for editor layout */
.icon-btn[aria-label="Open Pingu Editor"] {
    padding: 8px 12px;
    background: rgba(255,255,255,0.03);
    color: var(--text-accent);
}

/* Toast */
#editor-toast {
    transition: opacity 0.18s ease;
    opacity: 0.98;
}

