
@font-face {
    font-family: 'Inter';
    src: url('library/fonts/inter/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('library/fonts/inter/Inter-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('library/fonts/inter/Inter-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('library/fonts/inter/Inter-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   БАЗОВЫЕ СТИЛИ
   ============================================ */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow: hidden;
    transition: background-color 0.6s cubic-bezier(0.4, 0, 0.2, 1), color 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Темная тема */
body.dark-theme {
    background: linear-gradient(135deg, #0a0f1c 0%, #1a1f2e 100%);
    color: #e2e8f0;
}

body.dark-theme::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(45deg, rgba(16, 185, 129, 0.03) 0px, rgba(16, 185, 129, 0.03) 10px, rgba(30, 41, 59, 0.03) 10px, rgba(30, 41, 59, 0.03) 20px);
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.6s ease;
}

/* Светлая тема */
body.light-theme {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #1e293b;
}

body.light-theme::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(45deg, rgba(59, 130, 246, 0.03) 0px, rgba(59, 130, 246, 0.03) 10px, rgba(148, 163, 184, 0.03) 10px, rgba(148, 163, 184, 0.03) 20px);
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.6s ease;
}

.app-container {
    position: relative;
    z-index: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

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

.main-content {
    flex: 1;
    display: flex;
    gap: 1rem;
    padding: 1rem;
    overflow: hidden;
}

.left-panel {
    width: 35%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ============================================
   GLASSMORPHISM
   ============================================ */

body.dark-theme .glass-panel {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 2px solid rgba(16, 185, 129, 0.25);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1.25rem;
}

body.light-theme .glass-panel {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 2px solid rgba(59, 130, 246, 0.25);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1.25rem;
}

/* Editor panel */
body.dark-theme .code-editor-panel {
    background: rgba(10, 15, 28, 0.85) !important;
    backdrop-filter: blur(30px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(200%) !important;
    border: 2px solid rgba(16, 185, 129, 0.4) !important;
}

body.light-theme .code-editor-panel {
    background: rgba(248, 250, 252, 0.85) !important;
    backdrop-filter: blur(30px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(200%) !important;
    border: 2px solid rgba(59, 130, 246, 0.4) !important;
}

.code-editor-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}


.editor-wrapper {
    flex: 1;
    overflow: auto;
    min-height: 0;
}


/* ============================================
   TOP MENU
   ============================================ */

body.dark-theme .top-menu {
    background: rgba(10, 15, 28, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 2px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 50;
    position: relative;
}

body.light-theme .top-menu {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 2px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 50;
    position: relative;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-title {
    font-size: 1.125rem;
    font-weight: 600;
    user-select: none;
}

.app-subtitle {
    font-size: 0.75rem;
    opacity: 0.6;
    user-select: none;
}

/* Settings divider */
.settings-divider {
    width: 1px;
    height: 24px;
    background: linear-gradient(to bottom, rgba(148, 163, 184, 0) 0%, rgba(148, 163, 184, 0.4) 50%, rgba(148, 163, 184, 0) 100%);
}

/* ============================================
   BUTTONS - BOUNCE EFFECT
   ============================================ */

.modern-button {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-weight: 500;
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    font-size: 15px;
    cursor: pointer;
    transform: translateY(0) scale(1);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.modern-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.5);
}

.modern-button:active {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

.modern-button.secondary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.modern-button.secondary:hover {
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.5);
}

.modern-button.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.modern-button.danger:hover {
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.5);
}

.modern-button.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.modern-button.warning:hover {
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.5);
}

.modern-button.night {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.modern-button.night:hover {
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.5);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-icon {
    font-size: 18px;
}

/* Settings button */
.settings-button-choice {
    padding: 6px 16px;
    font-size: 13px;
    opacity: 0.5;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.settings-button-choice:hover {
    transform: translateY(-2px) scale(1.05);
}

.settings-button-choice.selected {
    opacity: 1;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* ============================================
   SELECT
   ============================================ */

body.dark-theme .custom-select {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(16, 185, 129, 0.4);
    border-radius: 10px;
    padding: 8px 32px 8px 12px;
    color: #10b981;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.dark-theme .custom-select:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

body.light-theme .custom-select {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: 10px;
    padding: 8px 32px 8px 12px;
    color: #3b82f6;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.light-theme .custom-select:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Settings button gear */
.settings-button {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.settings-button:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.6);
    transform: scale(1.15) rotate(90deg);
}

.settings-button:active {
    transform: scale(1.05) rotate(90deg);
}

body.light-theme .settings-button {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(139, 92, 246, 0.3);
}

/* ============================================
   CANVAS
   ============================================ */

.canvas-container {
    flex: 1;
    background: #0a0f1c;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

#renderCanvas {
    width: 100%;
    height: 100%;
    outline: none;
}

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

.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.settings-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
}

.settings-overlay.closing {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

body.dark-theme .settings-modal {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    padding: 32px;
    min-width: 500px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

body.light-theme .settings-modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    padding: 32px;
    min-width: 500px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.settings-overlay.active .settings-modal {
    animation: slideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.settings-overlay.closing .settings-modal {
    animation: slideOut 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-section {
    margin-bottom: 24px;
}

.settings-section-title {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.7;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   TOGGLE SWITCH - С SPRING АНИМАЦИЕЙ
   ============================================ */

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    background: rgba(100, 116, 139, 0.3);
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toggle-switch.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: left 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toggle-switch.active::after {
    left: 27px;
}

.toggle-switch:hover::after {
    transform: scale(1.1);
}

/* ============================================
   CODEMIRROR
   ============================================ */

.CodeMirror {
    height: 100% !important;
    font-size: 15px;
    line-height: 1.6;
    border-radius: 12px;
    border: 2px solid rgba(16, 185, 129, 0.3);
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace !important;
    transition: border-color 0.3s ease;
}

body.light-theme .CodeMirror {
    border-color: rgba(59, 130, 246, 0.3);
}

/* ============================================
   STATUS
   ============================================ */

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-ready { background: #10b981; box-shadow: 0 0 10px rgba(16, 185, 129, 0.8); }
.status-flying { background: #f59e0b; box-shadow: 0 0 10px rgba(245, 158, 11, 0.8); }
.status-crashed { background: #ef4444; box-shadow: 0 0 10px rgba(239, 68, 68, 0.8); }

/* ============================================
   TABS - SPRING ANIMATION
   ============================================ */

.tabs-panel-container {
    height: 280px;
    transition: height 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: visible;
    position: relative;
    z-index: 10;
}

.tabs-panel-container.telemetry-mode {
    height: 340px;
}

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

.tabs-container {
    position: relative;
}

.tabs-buttons {
    display: flex;
    gap: 0.25rem;
    position: relative;
    z-index: 100;
}

body.dark-theme .tab-button {
    background: transparent;
    border: none;
    padding: 8px 16px;
    font-weight: 500;
    color: #94a3b8;
    transition: color 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    font-size: 13px;
    user-select: none;
    position: relative;
}

body.dark-theme .tab-button:hover { 
    color: #10b981;
    transform: translateY(-2px);
}

body.dark-theme .tab-button.active { 
    color: #10b981; 
}

body.light-theme .tab-button {
    background: transparent;
    border: none;
    padding: 8px 16px;
    font-weight: 500;
    color: #64748b;
    transition: color 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    font-size: 13px;
    user-select: none;
    position: relative;
}

body.light-theme .tab-button:hover { 
    color: #3b82f6;
    transform: translateY(-2px);
}

body.light-theme .tab-button.active { 
    color: #3b82f6; 
}

/* Tab underline */
.tab-underline {
    position: absolute;
    bottom: -2px;
    left: 0;
    height: 2px;
    background: #10b981;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 2px 2px 0 0;
}

body.light-theme .tab-underline {
    background: #3b82f6;
}

.status-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-text {
    font-size: 0.75rem;
    font-weight: 500;
    user-select: none;
}

/* ============================================
   TAB CONTENT - FADE ANIMATION
   ============================================ */

.tabs-content-wrapper {
    position: relative;
    height: calc(100% - 50px);
}

.tab-content { 
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.tab-content.active { 
    opacity: 1;
    pointer-events: auto;
}

/* ============================================
   CONSOLE
   ============================================ */

body.dark-theme .console-output {
    background: rgba(10, 15, 28, 0.85);
    backdrop-filter: blur(15px) saturate(150%);
    -webkit-backdrop-filter: blur(15px) saturate(150%);
    color: #10b981;
    font-family: 'Fira Code', 'Monaco', 'Courier New', monospace;
    border: 2px solid rgba(16, 185, 129, 0.25);
    border-radius: 10px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.5;
    height: 100%;
    padding: 0.75rem;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-theme .console-output {
    background: rgba(248, 250, 252, 0.85);
    backdrop-filter: blur(15px) saturate(150%);
    -webkit-backdrop-filter: blur(15px) saturate(150%);
    color: #3b82f6;
    font-family: 'Fira Code', 'Monaco', 'Courier New', monospace;
    border: 2px solid rgba(59, 130, 246, 0.25);
    border-radius: 10px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.5;
    height: 100%;
    padding: 0.75rem;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.console-output::-webkit-scrollbar { width: 6px; }
.console-output::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 3px;
}
.console-output::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.6);
    border-radius: 3px;
}

/* ============================================
   TELEMETRY
   ============================================ */

.telemetry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding-top: 4px;
}

body.dark-theme .telemetry-card {
    background: rgba(10, 15, 28, 0.6);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    border: 2px solid rgba(16, 185, 129, 0.25);
    border-radius: 10px;
    padding: 12px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.dark-theme .telemetry-card:hover {
    background: rgba(10, 15, 28, 0.8);
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

body.light-theme .telemetry-card {
    background: rgba(248, 250, 252, 0.7);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    border: 2px solid rgba(59, 130, 246, 0.25);
    border-radius: 10px;
    padding: 12px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.light-theme .telemetry-card:hover {
    background: rgba(248, 250, 252, 0.95);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

body.dark-theme .telemetry-value { color: #10b981; font-weight: 600; font-size: 18px; margin-top: 4px; }
body.light-theme .telemetry-value { color: #3b82f6; font-weight: 600; font-size: 18px; margin-top: 4px; }

body.dark-theme .telemetry-label { color: #94a3b8; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
body.light-theme .telemetry-label { color: #64748b; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }

/* ============================================
   VIZ HINT
   ============================================ */

.viz-hint {
    text-align: center;
    font-size: 11px;
    opacity: 0.5;
    margin-top: 8px;
    transition: opacity 0.3s ease;
    user-select: none;
}

.viz-hint:hover {
    opacity: 0.8;
}

/* ============================================
   INTERACTIVE EMOJI
   ============================================ */

.interactive-emoji {
    cursor: pointer;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
    font-size: 1.5rem;
}

.interactive-emoji:hover {
    transform: scale(1.3);
}

.interactive-emoji.animating {
    pointer-events: none;
}

@keyframes snakeWiggle {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(-5px) rotate(-15deg); }
    50% { transform: translateX(5px) rotate(15deg); }
    75% { transform: translateX(-3px) rotate(-10deg); }
}

@keyframes helicopterFly {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(10deg); }
    50% { transform: translateY(-20px) rotate(-10deg); }
    75% { transform: translateY(-10px) rotate(5deg); }
}

.interactive-emoji.snake-animate {
    animation: snakeWiggle 0.6s ease;
}

.interactive-emoji.helicopter-animate {
    animation: helicopterFly 0.8s ease;
}

/* ============================================
   VERSION BADGE
   ============================================ */

.version-badge {
    font-size: 11px;
    opacity: 0.6;
    text-align: center;
    margin-top: 20px;
    font-weight: 500;
    padding: 8px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

/* ============================================
   NO SELECT
   ============================================ */

.no-select {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

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

.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.confirm-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
}

.confirm-overlay.closing {
    animation: fadeOut 0.3s ease forwards;
}

body.dark-theme .confirm-modal {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    padding: 32px;
    min-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

body.light-theme .confirm-modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    padding: 32px;
    min-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.confirm-overlay.active .confirm-modal {
    animation: slideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.confirm-overlay.closing .confirm-modal {
    animation: slideOut 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.modal-text {
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.modal-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.btn-full {
    width: 100%;
    padding: 12px;
}

.button-group {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* ============================================
   HOTKEYS
   ============================================ */

.hotkeys-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hotkey-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(100, 116, 139, 0.05);
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hotkey-item:hover {
    background: rgba(100, 116, 139, 0.15);
    transform: translateX(6px) scale(1.02);
}

.hotkey-combo {
    display: flex;
    gap: 4px;
    align-items: center;
}

.hotkey-combo kbd {
    background: rgba(100, 116, 139, 0.2);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Inter', monospace;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
    min-width: 24px;
    text-align: center;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hotkey-item:hover kbd {
    transform: translateY(-2px);
}

body.dark-theme .hotkey-combo kbd {
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

body.light-theme .hotkey-combo kbd {
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.1);
}

.hotkey-description {
    font-size: 13px;
    opacity: 0.8;
}

/* ============================================
   DEBUG PROGRESS - AT BOTTOM WITH BLUR
   ============================================ */

.debug-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px) saturate(150%);
    -webkit-backdrop-filter: blur(15px) saturate(150%);
    border-top: 2px solid rgba(16, 185, 129, 0.3);
    display: none;
    flex-direction: column;
    justify-content: center;
    padding: 8px 12px;
    gap: 6px;
    z-index: 50;
}

body.light-theme .debug-progress {
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(15px) saturate(150%);
    -webkit-backdrop-filter: blur(15px) saturate(150%);
    border-top-color: rgba(59, 130, 246, 0.3);
}

.debug-progress.active {
    display: flex;
    animation: fadeInUp 0.3s ease;
}

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

.debug-progress-bar {
    height: 8px;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

body.light-theme .debug-progress-bar {
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.debug-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.debug-progress-text {
    font-size: 12px;
    font-weight: 600;
    color: #10b981;
    text-align: center;
}

body.light-theme .debug-progress-text {
    color: #3b82f6;
}

/* ============================================
   HELP MODAL - SPRING HEIGHT ANIMATION
   ============================================ */

.help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.help-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
}

.help-overlay.closing {
    animation: fadeOut 0.3s ease forwards;
}

body.dark-theme .help-modal {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    padding: 32px;
    min-width: 700px;
    max-width: 800px;
    max-height: 85vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: height 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.light-theme .help-modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    padding: 32px;
    min-width: 700px;
    max-width: 800px;
    max-height: 85vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: height 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.help-overlay.active .help-modal {
    animation: slideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.help-overlay.closing .help-modal {
    animation: slideOut 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

/* Help tabs */
.help-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid rgba(148, 163, 184, 0.2);
    margin-bottom: 0;
    flex-shrink: 0;
}

.help-tab-button {
    background: transparent;
    border: none;
    padding: 12px 20px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    color: rgba(148, 163, 184, 0.7);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

body.dark-theme .help-tab-button:hover {
    color: #10b981;
    transform: translateY(-2px);
}

body.dark-theme .help-tab-button.active {
    color: #10b981;
    border-bottom-color: #10b981;
}

body.light-theme .help-tab-button:hover {
    color: #3b82f6;
    transform: translateY(-2px);
}

body.light-theme .help-tab-button.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

/* Help content container - SPRING HEIGHT */
.help-content-container {
    overflow-y: auto;
    flex: 1;
    margin-top: 24px;
    position: relative;
}

.help-tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.help-tab-content.active {
    display: block;
    animation: fadeInTab 0.4s ease forwards;
}

@keyframes fadeInTab {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Help sections */
.help-section {
    margin-bottom: 32px;
}

.help-section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #10b981;
}

body.light-theme .help-section-title {
    color: #3b82f6;
}

/* Commands list - CLICKABLE TO COPY */
.commands-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.command-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(100, 116, 139, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    position: relative;
}

.command-item:hover {
    background: rgba(100, 116, 139, 0.15);
    border-color: rgba(148, 163, 184, 0.3);
    transform: translateX(6px) scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.command-item:active {
    transform: translateX(4px) scale(1);
}

.command-item.copied::after {
    content: '✓ Copied!';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: #10b981;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    animation: copyNotification 0.5s ease;
}

@keyframes copyNotification {
    0% { opacity: 0; transform: translateY(-50%) scale(0.8); }
    50% { opacity: 1; transform: translateY(-50%) scale(1.1); }
    100% { opacity: 1; transform: translateY(-50%) scale(1); }
}

.command-name {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    font-weight: 600;
    color: #10b981;
    user-select: none;
}

body.light-theme .command-name {
    color: #3b82f6;
}

.command-description {
    font-size: 12px;
    opacity: 0.7;
    user-select: none;
}

/* Help info */
.help-info {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 16px;
    font-size: 13px;
    line-height: 1.6;
    margin-top: 24px;
}

body.light-theme .help-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

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

.panel-title {
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    user-select: none;
}

/* Control buttons containers */
.controls-left {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.controls-right {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Helper classes */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-6 { margin-top: 1.5rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.opacity-60 { opacity: 0.6; }
.opacity-80 { opacity: 0.8; }
.text-center { text-align: center; }
