/* LiveMarkup Editor Styles - Redesigned */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
  /* Colors */
  --primary-color: #0f172a;
  --secondary-color: #1e293b;
  --accent-color: #8b5cf6;
  --accent-glow: rgba(139, 92, 246, 0.5);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --border-color: #334155;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;

  /* Layout */
  --header-height: 64px;
  --footer-height: 32px;
  --sidebar-width: 280px;

  /* Responsive Panel Variables */
  --panel-left-width: 60%;
  --panel-right-width: 40%;
  --resize-handle-width: 8px;
  --panel-min-width-mobile: 200px;
  --panel-min-width-tablet: 280px;
  --panel-min-width-desktop: 350px;
  --panel-left-max-width: none;
  --panel-right-max-width: none;

  /* Fonts */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Effects */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Custom Scrollbar Styling - Visible Dark Theme */
::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4a4a4a 0%, #3a3a3a 100%);
  border-radius: 8px;
  border: 3px solid #1a1a1a;
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #5a5a5a 0%, #4a4a4a 100%);
  border-color: #2a2a2a;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}

::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, #6a6a6a 0%, #5a5a5a 100%);
}

::-webkit-scrollbar-corner {
  background: #1a1a1a;
}

/* Firefox Scrollbar */
* {
  scrollbar-width: auto;
  scrollbar-color: #4a4a4a #1a1a1a;
}

/* CodeMirror Scrollbar Override */
.CodeMirror-scrollbar-filler,
.CodeMirror-gutter-filler {
  background: #1a1a1a !important;
}

/* Ensure scrollbars are interactive */
.CodeMirror-vscrollbar,
.CodeMirror-hscrollbar {
  pointer-events: auto !important;
  z-index: 10 !important;
  cursor: pointer !important;
}

.CodeMirror-vscrollbar::-webkit-scrollbar,
.CodeMirror-hscrollbar::-webkit-scrollbar {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.CodeMirror-vscrollbar::-webkit-scrollbar-track,
.CodeMirror-hscrollbar::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
  cursor: pointer;
}

.CodeMirror-vscrollbar::-webkit-scrollbar-thumb,
.CodeMirror-hscrollbar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4a4a4a 0%, #3a3a3a 100%);
  border-radius: 8px;
  border: 3px solid #1a1a1a;
  cursor: grab;
}

.CodeMirror-vscrollbar::-webkit-scrollbar-thumb:active,
.CodeMirror-hscrollbar::-webkit-scrollbar-thumb:active {
  cursor: grabbing;
  background: linear-gradient(180deg, #6a6a6a 0%, #5a5a5a 100%);
}

.CodeMirror-vscrollbar::-webkit-scrollbar-thumb:hover,
.CodeMirror-hscrollbar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #5a5a5a 0%, #4a4a4a 100%);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}

/* Additional CodeMirror scrollbar fixes */
.CodeMirror-vscrollbar {
  right: 0 !important;
  width: 16px !important;
}

.CodeMirror-hscrollbar {
  bottom: 0 !important;
  height: 16px !important;
}

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

html,
body {
  width: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--primary-color);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  line-height: 1.5;
  display: grid;
  grid-template-rows: var(--header-height) 1fr var(--footer-height);
  grid-template-columns: 1fr;
  min-width: 0;
}

/* Header Styles */
.header {
  grid-row: 1;
  height: var(--header-height);
  width: 100%;
  max-width: none;
  margin: 0;
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  display: flex;
  align-items: center;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.header:hover {
  border-bottom-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 6px 30px rgba(139, 92, 246, 0.2);
}

.nav-container {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
}

/* Brand Section */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  width: auto;
  min-width: 0;
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 1px;
  white-space: nowrap;
}

.logo:hover {
  transform: scale(1.0000000005);
  filter: brightness(1.2);
}

.logo-accent {
  background: linear-gradient(135deg, #ec4899 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mobile-menu-toggle {
  display: none;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--text-primary);
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 18px;
  position: relative;
  overflow: hidden;
}

.mobile-menu-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(236, 72, 153, 0.3) 100%);
  transition: left 0.3s ease;
}

.mobile-menu-toggle:hover::before {
  left: 0;
}

.mobile-menu-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
  border-color: rgba(139, 92, 246, 0.5);
}

.mobile-menu-toggle:active {
  transform: translateY(0);
}

/* Navigation Menu */
.nav-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
}

.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.project-title input {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  min-width: 200px;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.project-title input:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.6);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(236, 72, 153, 0.15) 100%);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.project-title input::placeholder {
  color: var(--text-secondary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.divider-vertical {
  width: 1px;
  height: 24px;
  background: linear-gradient(180deg, transparent, rgba(139, 92, 246, 0.5), transparent);
  margin: 0 8px;
}

/* Enhanced Button Styles */
.btn {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%);
  transition: left 0.3s ease;
}

.btn:hover::before {
  left: 0;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.5);
}

.btn:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-primary {
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  border: 1px solid rgba(139, 92, 246, 0.5);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}

.btn-icon-only {
  padding: 8px;
  min-width: 36px;
  justify-content: center;
}

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

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 300px;
  height: 100vh;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(139, 92, 246, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  overflow-y: auto;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
}

.mobile-menu.active {
  left: 0;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
}

.mobile-menu-header .logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  white-space: nowrap;
}

.mobile-menu-close {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--text-primary);
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 18px;
}

.mobile-menu-close:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.2) 100%);
  border-color: rgba(239, 68, 68, 0.5);
  transform: scale(1.1);
}

.mobile-menu-content {
  padding: 20px;
}

.mobile-project-title {
  margin-bottom: 24px;
}

.mobile-project-title input {
  width: 100%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.mobile-project-title input:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.6);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(236, 72, 153, 0.15) 100%);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-btn {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  text-align: left;
}

.mobile-btn:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%);
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateX(4px);
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Main Container */
.main-container {
  grid-row: 2;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  margin: 0;
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.editor-layout {
  display: flex;
  flex: 1;
  height: 100%;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

/* Left Panel - Editor */
.left-panel {
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
  backdrop-filter: blur(10px);
  position: relative;
  flex: 0 0 var(--panel-left-width);
  min-width: var(--panel-min-width-desktop);
  max-width: var(--panel-left-max-width, none);
  min-height: 0;
  border-right: 1px solid var(--border-color);
}

.left-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.5), transparent);
}

/* Editor Container */
.editor-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.editor-panel {
  flex: 1;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.editor-panel.active {
  display: flex;
}

/* CodeMirror Editor Enhancement */
.CodeMirror {
  flex: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  height: 100%;
  background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
  border: none;
}

.CodeMirror-scroll {
  overflow-x: auto !important;
  /* Ensure horizontal scrolling is visible */
  overflow-y: auto !important;
}

.CodeMirror-hscrollbar {
  display: block !important;
  /* Make horizontal scrollbar visible */
  height: 12px !important;
  background: rgba(139, 92, 246, 0.1) !important;
}

.CodeMirror-vscrollbar {
  display: block !important;
  width: 12px !important;
  background: rgba(139, 92, 246, 0.1) !important;
}

/* Footer Enhancement */
.footer {
  grid-row: 3;
  height: var(--footer-height);
  width: 100%;
  max-width: none;
  margin: 0;
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(139, 92, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: relative;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.footer-left,
.footer-center,
.footer-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.footer-left {
  flex: 0 0 auto;
}

.footer-center {
  flex: 1;
  justify-content: center;
}

.footer-right {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.footer-left span {
  color: var(--success-color);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-left span::before {
  content: '●';
  font-size: 8px;
}

.footer-center span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

/* Console Toggle Button */
.console-toggle-footer {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--text-primary);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 10px;
  height: 20px;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.console-toggle-footer i {
  font-size: 10px;
  line-height: 1;
  display: block;
}

.console-toggle-footer:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%);
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.console-toggle-footer:active {
  transform: translateY(0);
}

/* Tabs */
.tabs {
  display: flex;
  background: rgba(139, 92, 246, 0.1);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  position: relative;
  z-index: 10;
}

.tab {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  position: relative;
  overflow: hidden;
}

.tab::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.tab:hover {
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.05);
}

.tab.active {
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.1);
}

.tab.active::before {
  transform: scaleX(1);
}

.tab i {
  font-size: 14px;
}

.tab span {
  font-size: 12px;
  font-weight: 600;
}

/* Mobile Menu Sidebar */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  background: var(--secondary-color);
  z-index: 1001;
  transform: translateX(-100%);
  transition: var(--transition);
  border-right: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.mobile-menu-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.mobile-menu a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  padding: 12px;
  border-radius: 8px;
  transition: var(--transition);
  display: block;
}

.mobile-menu a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-color);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  height: 100vh;
  background: var(--secondary-color);
  border-left: 1px solid var(--border-color);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
  transition: right 0.3s ease;
  z-index: 1001;
  overflow-y: auto;
}

.mobile-menu.show {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--primary-color);
}

.mobile-menu-close {
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 18px;
  min-width: 36px;
  min-height: 36px;
}

.mobile-menu-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-content {
  padding: 20px;
}

.mobile-project-title {
  margin-bottom: 24px;
}

.mobile-project-title input {
  width: 100%;
  background: var(--primary-color);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
}

.mobile-project-title input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(123, 63, 228, 0.2);
}

.mobile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.mobile-btn {
  padding: 12px 16px;
  font-size: 14px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
}

.mobile-menu-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Button Styles */
.btn {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  height: 36px;
  font-family: var(--font-body);
}

.btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 8px;
  min-width: 36px;
}

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

.btn-ghost.active {
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent-color);
}

.btn-primary {
  background: var(--accent-color);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: #7c3aed;
  box-shadow: 0 0 15px var(--accent-glow);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.btn-primary {
  background: var(--accent-color);
  color: white;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
  min-height: 32px;
}

.btn-icon-only {
  padding: 8px;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-color);
  color: white;
}

.btn-icon-only:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Main Container - Using CSS Grid for better layout management */
body.legacy {
  display: grid;
  grid-template-rows: var(--header-height) 1fr var(--footer-height);
  grid-template-columns: 1fr;
  grid-template-areas:
    "header"
    "main"
    "footer";
  height: 100vh;
  margin: 0;
  overflow: hidden;
}

body.legacy .header {
  grid-area: header;
  position: relative;
  z-index: 100;
}

body.legacy .main-container {
  grid-area: main;
  display: flex;
  flex-direction: column;
  background: var(--primary-color);
  overflow: hidden;
  position: relative;
}

body.legacy .footer {
  grid-area: footer;
  position: relative;
  z-index: 100;
}

body.legacy .editor-layout {
  display: flex;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Left Panel - Editor */
body.legacy .left-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--primary-color);
  border-right: 1px solid var(--border-color);
  min-width: 300px;
  position: relative;
}

.tabs {
  display: flex;
  background: var(--primary-color);
  border-bottom: 1px solid var(--border-color);
  padding: 0;
  margin: 0;
  list-style: none;
}

.tab {
  padding: 10px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  transition: var(--transition);
  border-top: 2px solid transparent;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  border: none;
  border-right: 1px solid var(--border-color);
}

.tab:hover {
  color: var(--text-primary);
  background: var(--secondary-color);
}

.tab.active {
  color: var(--accent-color);
  border-top-color: var(--accent-color);
  background: var(--secondary-color);
}

.tab i {
  font-size: 16px;
}

/* Tab text for responsive behavior */
.tab span {
  transition: opacity 0.3s ease;
}

/* Tablet and Mobile: Hide tab text, show only icons */
@media (max-width: 768px) {
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

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

  .tab {
    padding: 16px 12px;
    min-width: 60px;
    justify-content: center;
    flex: 1;
  }

  .tab span {
    display: none;
  }

  .tab i {
    font-size: 18px;
    margin: 0;
  }
}

/* Tablet landscape: Hide tab text */
@media (max-width: 1024px) and (min-width: 769px) {
  .tab {
    padding: 12px 8px;
    min-width: 60px;
    justify-content: center;
    flex: 1;
  }

  .tab span {
    display: none;
  }

  .tab i {
    font-size: 14px;
    margin: 0;
  }
}

/* Editor Container */
.editor-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--primary-color);
}

.editor-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  background: var(--primary-color);
}

.editor-panel.active {
  opacity: 1;
  visibility: visible;
}

/* CodeMirror Customization */
.CodeMirror {
  height: 100%;
  font-family: 'Fira Code', 'Cascadia Code', 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.6;
  background: var(--primary-color);
  color: var(--text-primary);
  border: none;
  border-radius: 0;
}

.CodeMirror-gutters {
  background: var(--primary-color);
  border-right: 1px solid var(--border-color);
  width: 50px;
}

.CodeMirror-linenumber {
  color: var(--text-secondary);
  padding: 0 12px;
  font-size: 12px;
  min-width: 30px;
  text-align: right;
}

.CodeMirror-cursor {
  border-left: 2px solid var(--accent-color);
}

.CodeMirror-selected {
  background: rgba(123, 63, 228, 0.2);
}

.CodeMirror-focused .CodeMirror-selected {
  background: rgba(123, 63, 228, 0.3);
}

.CodeMirror-lines {
  padding: 16px 0;
}

.CodeMirror pre.CodeMirror-line,
.CodeMirror pre.CodeMirror-line-like {
  padding-left: 16px;
  padding-right: 16px;
}

/* Resize Handle */
.resize-handle {
  flex: 0 0 var(--resize-handle-width);
  width: var(--resize-handle-width);
  background: linear-gradient(90deg, 
    rgba(139, 92, 246, 0.2) 0%, 
    rgba(139, 92, 246, 0.4) 50%, 
    rgba(139, 92, 246, 0.2) 100%);
  cursor: col-resize;
  position: relative;
  z-index: 10;
  transition: all 0.3s ease;
  border-left: 1px solid rgba(139, 92, 246, 0.3);
  border-right: 1px solid rgba(139, 92, 246, 0.3);
}

.resize-handle:hover {
  background: linear-gradient(90deg, 
    rgba(139, 92, 246, 0.4) 0%, 
    rgba(139, 92, 246, 0.6) 50%, 
    rgba(139, 92, 246, 0.4) 100%);
  border-left-color: rgba(139, 92, 246, 0.5);
  border-right-color: rgba(139, 92, 246, 0.5);
  transform: scaleX(1.2);
}

.resize-handle:active {
  background: rgba(139, 92, 246, 0.7);
}

.resize-handle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3px;
  height: 60px;
  background: linear-gradient(180deg, 
    transparent 0%, 
    var(--accent-color) 20%, 
    var(--accent-color) 80%, 
    transparent 100%);
  border-radius: 2px;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.resize-handle:hover::before {
  opacity: 1;
  height: 80px;
  width: 4px;
}

/* Right Panel - Preview GUI Improvement */
.right-panel {
  display: flex;
  flex-direction: column;
  background: #000000;
  /* Darker background for contrast */
  flex: 1 1 var(--panel-right-width);
  min-width: var(--panel-min-width-desktop);
  max-width: var(--panel-right-max-width, none);
  min-height: 0;
  position: relative;
  border-left: 1px solid var(--border-color);
}

/* Ensure right panel is always visible */
.right-panel * {
  visibility: visible !important;
  opacity: 1 !important;
}

.preview-header {
  height: 48px;
  /* Slightly more compact */
  background: var(--primary-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
}

.preview-controls {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 0px;
  border-radius: 8px;
}

.preview-btn {
  background: transparent;
  border: 1px solid transparent;
  /* Match alignment with bordered buttons */
  color: var(--text-secondary);
  padding: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  /* Unified size */
  width: 36px;
  /* Unified size */
  height: 36px;
  /* Unified size */
  flex-shrink: 0;
}

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

.preview-btn.active {
  background: var(--accent-color);
  color: white;
}

.preview-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.preview-actions button {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  /* Unified size */
  width: 36px;
  /* Unified size */
  height: 36px;
  /* Unified size */
  flex-shrink: 0;
}

.preview-actions button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--accent-color);
}

.preview-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: white;
  /* Ensure preview canvas is white */
  padding: 0;
  /* Remove any padding that might cause "bad" look */
}

.preview-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
  display: block;
}

/* Footer / Status Bar */
body.legacy .footer {
  grid-area: footer;
  position: relative;
  z-index: 100;
  background: var(--primary-color);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 12px;
  color: var(--text-secondary);
}

body.legacy .footer-left,
body.legacy .footer-center,
body.legacy .footer-right {
  display: flex;
  align-items: center;
}

body.legacy .footer-center {
  flex: 1;
  justify-content: center;
}

body.legacy .console-toggle-footer {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

body.legacy .console-toggle-footer:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

/* Modals Redesign */
.settings-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

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

.modal-content {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow: hidden;
  transform: translateY(0);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

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

.modal-header {
  padding: 24px;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.1), transparent);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.modal-header .header-info i {
  font-size: 20px;
  color: var(--accent-color);
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(85vh - 160px);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.setting-card {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
}

.setting-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
}

.toggle-card {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.setting-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.setting-info i {
  font-size: 18px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 8px;
  color: var(--accent-color);
}

.setting-text {
  display: flex;
  flex-direction: column;
}

.setting-text label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.setting-text span {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Form Elements */
.setting-card select {
  width: 100%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  cursor: pointer;
  outline: none;
}

.setting-card input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.1);
  height: 4px;
  border-radius: 2px;
  outline: none;
}

.setting-card input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--accent-color);
  border-radius: 50%;
  cursor: pointer;
}

/* Custom Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
}

input:focus+.slider {
  box-shadow: 0 0 1px var(--accent-color);
}

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

.modal-actions-footer {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.modal-actions-footer .btn {
  flex: 1;
  justify-content: center;
  padding: 12px;
  border-radius: 10px;
}

/* Console Panel Inside Preview Container */
.console-panel-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;
  /* Start with 0 height */
  background: #1e1e1e;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 10;
  font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 13px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(100%);
}

.console-panel-bottom.show {
  height: 200px;
  /* Full height when open */
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Ensure preview-split can contain the console */
.preview-split {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

/* When console is open, reduce iframe height */
.console-panel-bottom.show~.preview-frame {
  flex: 0 0 calc(100% - 200px);
  /* Reduce by console height */
}

/* Console Panel Bottom Responsive */
@media (max-width: 768px) {
  .console-panel-bottom.show {
    height: 150px;
  }

  .console-panel-bottom.show~.preview-frame {
    flex: 0 0 calc(100% - 150px);
  }
}

@media (max-width: 480px) {
  .console-panel-bottom.show {
    height: 120px;
  }

  .console-panel-bottom.show~.preview-frame {
    flex: 0 0 calc(100% - 120px);
  }

  .console-header-bottom {
    padding: 6px 8px;
    font-size: 11px;
  }

  .console-output-bottom {
    padding: 8px;
    font-size: 11px;
  }
}

.console-header-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
}

.console-clear-bottom {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  min-width: 24px;
  min-height: 24px;
}

.console-clear-bottom:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--accent-color);
}

.console-output-bottom {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  color: #ffffff;
  line-height: 1.4;
}

/* Console Panel Bottom Responsive */
@media (max-width: 768px) {
  .console-panel-bottom {
    height: 150px;
  }
}

@media (max-width: 480px) {
  .console-panel-bottom {
    height: 120px;
  }

  .console-header-bottom {
    padding: 6px 8px;
    font-size: 11px;
  }

  .console-output-bottom {
    padding: 8px;
    font-size: 11px;
  }
}

/* Console Toggle Button in Footer */
.console-toggle-footer {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  min-width: 24px;
  min-height: 24px;
}

.console-toggle-footer:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--accent-color);
}

.console-toggle-footer.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

.console-toggle-footer.active:hover {
  background: #6b32d1;
  border-color: #6b32d1;
}

/* Console Toggle Button - Bottom Right (Removed - now in footer) */
.console-toggle-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(123, 63, 228, 0.3);
  min-height: 44px;
  display: none;
  /* Hidden - moved to footer */
}

.console-toggle-btn:hover {
  background: #6b32d1;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(123, 63, 228, 0.4);
}

.console-toggle-btn:active {
  transform: translateY(0);
}

.console-toggle-btn.active {
  background: #28a745;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.console-toggle-btn.active:hover {
  background: #218838;
}

/* Console Toggle Button Responsive */
@media (max-width: 768px) {
  .console-toggle-btn {
    bottom: 16px;
    right: 16px;
    padding: 10px 12px;
    font-size: 14px;
    min-height: 40px;
  }
}

@media (max-width: 480px) {
  .console-toggle-btn {
    bottom: 12px;
    right: 12px;
    padding: 8px 10px;
    font-size: 12px;
    min-height: 36px;
  }
}

.preview-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: white;
}

.preview-split {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Console Panel Styles */
.console-editor {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #1e1e1e;
  border-top: 1px solid var(--border-color);
  font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 13px;
}


.console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
}

.console-clear-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  min-width: 24px;
  min-height: 24px;
}

.console-clear-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--accent-color);
}

.console-output {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  color: #ffffff;
  line-height: 1.4;
}

.console-welcome {
  color: #666;
  font-style: italic;
  margin-bottom: 8px;
}

.console-log {
  margin-bottom: 4px;
  padding: 2px 0;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.console-log::before {
  content: '› ';
  color: #4ade80;
  font-weight: bold;
  margin-right: 8px;
}

.console-error {
  margin-bottom: 4px;
  padding: 2px 0;
  color: #ff5555;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.console-error::before {
  content: '✗ ';
  color: #ff5555;
  font-weight: bold;
  margin-right: 8px;
}

.console-warn {
  margin-bottom: 4px;
  padding: 2px 0;
  color: #fbbf24;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.console-warn::before {
  content: '⚠ ';
  color: #fbbf24;
  font-weight: bold;
  margin-right: 8px;
}

.console-info {
  margin-bottom: 4px;
  padding: 2px 0;
  color: #3b82f6;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.console-info::before {
  content: 'ℹ ';
  color: #3b82f6;
  font-weight: bold;
  margin-right: 8px;
}

/* Console scrollbar */
.console-output::-webkit-scrollbar {
  width: 6px;
}

.console-output::-webkit-scrollbar-track {
  background: #1e1e1e;
}

.console-output::-webkit-scrollbar-thumb {
  background: #4b4b5b;
  border-radius: 3px;
}

.console-output::-webkit-scrollbar-thumb:hover {
  background: #5b5b6b;
}

/* Footer */
body.legacy .footer {
  grid-area: footer;
  height: var(--footer-height);
  background: var(--secondary-color);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 16px;
  position: relative;
  z-index: 100;
}

body.legacy .footer-left,
body.legacy .footer-center,
body.legacy .footer-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

body.legacy .footer-left {
  flex: 0 0 auto;
}

body.legacy .footer-center {
  flex: 1;
  justify-content: center;
}

body.legacy .footer-right {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.footer-left span {
  color: var(--success-color);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-left span::before {
  content: '●';
  font-size: 8px;
}

.footer-center span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

/* Settings Modal */
.settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.settings-modal.show {
  display: flex;
}

.modal-content {
  background: var(--secondary-color);
  border-radius: 12px;
  width: 100%;
  max-width: 700px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  width: 32px;
  height: 32px;
}

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

.modal-body {
  padding: 24px;
  max-height: 60vh;
  overflow-y: auto;
}

.setting-group {
  margin-bottom: 24px;
}

.setting-group:last-child {
  margin-bottom: 0;
}

.setting-group label {
  display: block;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.setting-group select,
.setting-group input[type="range"] {
  width: 100%;
  background: var(--primary-color);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  transition: var(--transition);
}

.setting-group select:focus,
.setting-group input[type="range"]:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(123, 63, 228, 0.2);
}

.setting-group input[type="checkbox"] {
  margin-right: 8px;
  width: 16px;
  height: 16px;
}

.setting-group input[type="range"] {
  padding: 0;
  height: 6px;
  background: var(--border-color);
  border: none;
  border-radius: 3px;
  outline: none;
}

.setting-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--accent-color);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
}

.setting-group input[type="range"]::-webkit-slider-thumb:hover {
  background: #6b32d1;
  transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .nav-container {
    padding: 0 16px;
  }

  .nav-actions {
    gap: 8px;
  }

  .nav-actions .btn span {
    display: none;
  }

  .nav-actions .btn {
    padding: 8px 12px;
    min-width: 40px;
    min-height: 40px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 56px;
    --footer-height: 36px;
  }

  .header {
    height: var(--header-height);
  }

  .nav-container {
    padding: 0 12px;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
  }

  .logo {
    font-size: 16px;
    white-space: nowrap;
  }

  .logo i {
    font-size: 22px;
  }

  .mobile-menu {
    width: 280px;
  }

  .mobile-actions {
    grid-template-columns: 1fr;
  }

  /* Update grid template for mobile */
  body {
    grid-template-rows: var(--header-height) 1fr var(--footer-height);
  }

  .footer {
    height: var(--footer-height);
  }
}

@media (max-width: 480px) {
  :root {
    --header-height: 52px;
    --footer-height: 32px;
  }

  .header {
    height: var(--header-height);
  }

  .nav-container {
    padding: 0 8px;
  }

  .logo {
    font-size: 14px;
    gap: 4px;
    white-space: nowrap;
  }

  .logo i {
    font-size: 20px;
  }

  .mobile-menu-toggle {
    min-width: 36px;
    min-height: 36px;
    font-size: 16px;
  }

  .mobile-menu {
    width: 100%;
    right: -100%;
  }

  .mobile-menu-header {
    padding: 16px;
  }

  .mobile-menu-content {
    padding: 16px;
  }

  .mobile-project-title input {
    padding: 10px 12px;
    font-size: 14px;
  }

  .mobile-btn {
    padding: 10px 12px;
    font-size: 13px;
    min-height: 44px;
  }

  /* Update grid template for small mobile */
  body {
    grid-template-rows: var(--header-height) 1fr var(--footer-height);
  }

  .footer {
    height: var(--footer-height);
  }
}

@media (max-width: 360px) {
  :root {
    --header-height: 48px;
    --footer-height: 28px;
  }

  .header {
    height: var(--header-height);
  }

  .nav-container {
    padding: 0 6px;
  }

  .logo {
    font-size: 12px;
    gap: 2px;
    white-space: nowrap;
  }

  .logo i {
    font-size: 14px;
  }

  .mobile-menu-toggle {
    min-width: 32px;
    min-height: 32px;
    font-size: 14px;
  }

  .mobile-menu-header {
    padding: 12px;
  }

  .mobile-menu-content {
    padding: 12px;
  }

  .mobile-project-title input {
    padding: 8px 10px;
    font-size: 13px;
  }

  .mobile-btn {
    padding: 8px 10px;
    font-size: 12px;
    min-height: 40px;
  }

  /* Update grid template for ultra-small mobile */
  body {
    grid-template-rows: var(--header-height) 1fr var(--footer-height);
  }

  .footer {
    height: var(--footer-height);
  }
}

/* Desktop and above - Ensure body fills viewport */
@media (min-width: 768px) {
  body {
    min-width: 100%;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .nav-container {
    padding: 0 20px;
  }

  .nav-actions {
    gap: 8px;
  }

  .nav-actions .btn span {
    display: none;
  }

  .nav-actions .btn {
    padding: 8px 12px;
    min-width: 40px;
    min-height: 40px;
  }

  .nav-center {
    max-width: 300px;
  }
}

/* Landscape mobile adjustments */
@media (max-width: 768px) and (orientation: landscape) {
  :root {
    --header-height: 48px;
    --footer-height: 32px;
  }

  .header {
    height: var(--header-height);
  }

  .nav-container {
    padding: 0 12px;
  }

  .logo {
    font-size: 16px;
  }

  .mobile-menu {
    width: 320px;
  }

  .mobile-actions {
    grid-template-columns: 1fr 1fr;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .mobile-menu-toggle:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0.95);
  }

  .mobile-menu-close:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0.95);
  }

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

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

  .logo i,
  .mobile-menu-toggle i,
  .mobile-menu-close i {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

@media (max-width: 768px) {

  /* Header adjustments */
  .header {
    padding: 0 12px;
    height: var(--header-height);
    flex-wrap: wrap;
  }

  .header-center {
    display: none;
  }

  .header-left {
    order: 1;
  }

  .header-right {
    order: 2;
    gap: 8px;
  }

  .project-title input {
    font-size: 12px;
    padding: 8px 12px;
  }

  .logo {
    font-size: 16px;
  }

  .logo i {
    font-size: 20px;
  }

  .btn {
    padding: 8px 12px;
    font-size: 12px;
    min-height: 36px;
  }

  .btn span {
    display: none;
  }

  .btn i {
    font-size: 14px;
  }


  /* Tablet and Mobile - Hide text, show only icons */
  .tab {
    font-size: 0;
    /* Hide all text */
    line-height: 0;
    /* Remove line height */
    padding: 12px;
    min-width: 50px;
    justify-content: center;
  }

  .tab i {
    font-size: 16px;
    line-height: 1;
    /* Restore icon line height */
  }

  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

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

  .tab {
    padding: 12px 16px;
    font-size: 12px;
    flex-shrink: 0;
    min-width: 80px;
    position: relative;
  }

  /* Preview adjustments */
  .preview-header {
    height: 56px;
    padding: 0 16px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .preview-controls {
    gap: 4px;
    padding: 2px;
    order: 2;
  }

  .preview-btn {
    padding: 6px 8px;
    font-size: 14px;
    min-width: 32px;
    min-height: 32px !important;
  }

  .preview-actions {
    gap: 4px;
    order: 1;
  }

  .preview-actions button {
    padding: 6px;
    font-size: 14px;
    min-width: 28px;
    min-height: 28px;
  }

  /* Console adjustments */
  .console-panel {
    height: 180px;
  }

  .console-header {
    padding: 6px 12px;
    font-size: 11px;
  }

  .console-output {
    padding: 8px;
    font-size: 12px;
  }

  /* Footer adjustments */
  .footer {
    padding: 0 12px;
    height: var(--footer-height);
    flex-wrap: wrap;
    gap: 8px;
  }

  .footer-left {
    order: 1;
  }

  .footer-center {
    order: 2;
  }

  .footer-right {
    order: 3;
  }

  .footer-center span {
    font-size: 11px;
  }

  .footer-left span {
    font-size: 11px;
  }

  /* Settings modal adjustments */
  .settings-modal {
    padding: 12px;
  }

  .modal-content {
    max-width: 100%;
    max-height: 90vh;
    margin: 0;
  }

  .modal-header {
    padding: 16px;
  }

  .modal-header h3 {
    font-size: 16px;
  }

  .modal-body {
    padding: 16px;
    max-height: 60vh;
    overflow-y: auto;
  }

  .setting-group {
    margin-bottom: 16px;
  }

  .setting-group label {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .setting-group select,
  .setting-group input[type="range"] {
    padding: 8px 10px;
    font-size: 12px;
  }

  .btn-small {
    padding: 6px 12px;
    font-size: 11px;
    min-height: 28px;
  }
}

@media (max-width: 480px) {

  /* Ultra-compact header */
  .header {
    padding: 0 8px;
    height: var(--header-height);
  }

  .logo {
    font-size: 14px;
    gap: 6px;
  }

  .logo i {
    font-size: 18px;
  }

  .btn {
    padding: 6px 8px;
    min-height: 32px;
  }

  .btn i {
    font-size: 12px;
  }


  /* Editor adjustments */
  .tab {
    padding: 10px;
    font-size: 0;
    /* Hide all text */
    line-height: 0;
    /* Remove line height */
    min-width: 50px;
    justify-content: center;
  }

  .tab i {
    font-size: 14px;
    line-height: 1;
    /* Restore icon line height */
  }

  /* Preview adjustments */
  .preview-header {
    height: 52px;
    padding: 0 12px;
  }

  .preview-btn {
    padding: 4px 6px;
    font-size: 12px;
    min-width: 28px;
    min-height: 28px;
  }

  .preview-actions button {
    padding: 4px;
    font-size: 12px;
    min-width: 24px;
    min-height: 24px;
  }

  /* Console adjustments */
  .console-panel {
    height: 150px;
  }

  .console-header {
    padding: 4px 8px;
    font-size: 10px;
  }

  .console-output {
    padding: 6px;
    font-size: 11px;
  }

  /* Footer adjustments */
  .footer {
    padding: 0 8px;
    height: var(--footer-height);
  }

  .footer-center span {
    font-size: 10px;
  }

  .footer-left span {
    font-size: 10px;
  }

  /* Settings modal adjustments */
  .modal-header {
    padding: 12px;
  }

  .modal-header h3 {
    font-size: 14px;
  }

  .modal-body {
    padding: 12px;
  }

  .setting-group label {
    font-size: 12px;
  }

  .setting-group select,
  .setting-group input[type="range"] {
    padding: 6px 8px;
    font-size: 11px;
  }

  .btn-small {
    padding: 4px 8px;
    font-size: 10px;
    min-height: 24px;
  }
}

/* Mobile landscape adjustments */
@media (max-width: 768px) and (orientation: landscape) {
  :root {
    --header-height: 48px;
    --footer-height: 32px;
  }

  .header {
    height: var(--header-height);
  }


  .left-panel,
  .right-panel {
    min-height: 35vh;
  }

  .preview-header {
    height: 48px;
  }

  .console-panel {
    height: 120px;
  }

  .footer {
    height: var(--footer-height);
  }

  .tab {
    padding: 8px;
    font-size: 0;
    /* Hide all text */
    line-height: 0;
    /* Remove line height */
    min-width: 45px;
    justify-content: center;
  }

  .tab i {
    font-size: 12px;
    line-height: 1;
    /* Restore icon line height */
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn:hover {
    transform: none;
  }

  .btn:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }

  .tab:hover {
    background: transparent;
  }

  .tab:active {
    background: rgba(255, 255, 255, 0.1);
  }

  .preview-btn:hover {
    background: transparent;
  }

  .preview-btn:active {
    background: rgba(255, 255, 255, 0.1);
  }

  .resize-handle {
    height: 16px;
  }

  .resize-handle::before {
    width: 60px;
    height: 4px;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

  .logo i,
  .btn i,
  .preview-btn i,
  .tab i {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Small mobile devices */
@media (max-width: 360px) {
  .header {
    padding: 0 6px;
  }

  .logo {
    font-size: 12px;
  }

  .logo i {
    font-size: 16px;
  }

  .btn {
    padding: 4px 6px;
    min-height: 28px;
    border: 1px solid var(--border-color);
  }

  .btn i {
    font-size: 10px;
  }

  .tab {
    padding: 8px 10px;
    font-size: 10px;
    min-width: 60px;
  }

  .tab i {
    font-size: 10px;
  }

  .preview-btn {
    min-width: 24px;
    min-height: 24px;
  }

  .preview-btn i {
    font-size: 10px;
  }
}

/* Mobile menu styles */
.mobile-menu {
  display: none;
}

@media (max-width: 768px) {
  .mobile-menu {
    display: block;
    order: 0;
  }

  .mobile-menu-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    min-width: 36px;
    min-height: 36px;
  }

  .mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .mobile-menu-btn:active {
    background: rgba(255, 255, 255, 0.2);
  }
}

/* Mobile context menu */
.mobile-context-menu {
  background: var(--secondary-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  padding: 8px 0;
  min-width: 150px;
  z-index: 1000;
}

.mobile-context-menu button {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  text-align: left;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.mobile-context-menu button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mobile-context-menu button:active {
  background: rgba(255, 255, 255, 0.2);
}

/* Mobile-specific button states */
@media (hover: none) and (pointer: coarse) {
  .btn:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }

  .tab:active {
    background: rgba(255, 255, 255, 0.1);
  }

  .preview-btn:active {
    background: rgba(255, 255, 255, 0.1);
  }

  .mobile-menu-btn:active {
    background: rgba(255, 255, 255, 0.2);
  }
}

/* Mobile keyboard adjustments */
@media (max-width: 768px) {

  .footer.keyboard-open {
    display: none;
  }

  /* Better focus states for mobile */
  .btn:focus,
  .tab:focus,
  .preview-btn:focus,
  .mobile-menu-btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
  }
}

/* Mobile performance optimizations */
@media (max-width: 768px) {

  /* Reduce animations on mobile for better performance */
  .btn,
  .tab,
  .preview-btn {
    transition: background-color 0.2s ease;
  }

  /* Disable hover effects on mobile */
  .btn:hover,
  .tab:hover,
  .preview-btn:hover {
    transform: none;
  }

  /* Optimize scrolling */
  .editor-container,
  .console-output {
    -webkit-overflow-scrolling: touch;
  }

  /* Better touch targets */
  .btn,
  .tab,
  .preview-btn,
  .mobile-menu-btn {
    min-height: 44px;
    /* iOS recommended minimum */
  }

  .console-clear {
    min-width: 44px;
    min-height: 44px;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .header {
    padding: 0 12px;
  }

  .nav-menu {
    display: none;
    /* Hidden on mobile, shown via toggle */
  }

  .mobile-menu-toggle {
    display: block;
  }

  /* Remove problematic vertical layout for mobile */
  /* Keep horizontal layout for all screen sizes */

  .resize-handle::before {
    width: 40px;
    height: 2px;
  }

  .nav-brand {
    width: auto;
  }

  /* Adjust console height for mobile */
  .console-panel-bottom.show {
    height: 40%;
  }

  .console-panel-bottom.show~.preview-frame {
    flex: 0 0 60%;
  }
}

@media (max-width: 480px) {
  .logo span:not(.logo-accent) {
    display: none;
    /* Hide "Web" on very small screens, keep "Playground" */
  }

  .logo {
    font-size: 1.1rem;
    white-space: nowrap;
  }

  .footer {
    font-size: 10px;
    padding: 0 8px;
  }

  .footer-left span::before {
    display: none;
  }
}

/* Comprehensive Responsive Solution with CSS Variables */

/* Mobile: < 768px - Compact but horizontal */
@media (max-width: 767px) {
  :root {
    --panel-left-width: 50%;
    --panel-right-width: 50%;
    --resize-handle-width: 3px;
    --panel-min-width-mobile: 160px;
    --panel-min-width-desktop: 160px;
  }

  .left-panel,
  .right-panel {
    min-width: var(--panel-min-width-mobile) !important;
  }

  .tabs {
    overflow-x: auto;
  }

  .tab {
    padding: 8px 6px;
    min-width: 45px;
    font-size: 10px;
  }

  .tab span {
    display: none;
  }

  .tab i {
    font-size: 12px;
  }
}

/* Tablet: 768px - 1024px - Optimal horizontal */
@media (min-width: 768px) and (max-width: 1024px) {
  :root {
    --panel-left-width: 50%;
    --panel-right-width: 50%;
    --resize-handle-width: 4px;
    --panel-min-width-tablet: 220px;
    --panel-min-width-desktop: 220px;
  }

  .left-panel,
  .right-panel {
    min-width: var(--panel-min-width-tablet) !important;
  }

  .tab {
    padding: 10px 8px;
    min-width: 55px;
  }

  .tab span {
    font-size: 11px;
  }

  .tab i {
    font-size: 13px;
  }
}

/* Desktop: > 1024px - Full horizontal */
@media (min-width: 1025px) {
  :root {
    --panel-left-width: 50%;
    --panel-right-width: 50%;
    --resize-handle-width: 5px;
    --panel-min-width-desktop: 300px;
  }

  .left-panel,
  .right-panel {
    min-width: var(--panel-min-width-desktop) !important;
  }
}

/* Large Desktop: > 1440px - Enhanced */
@media (min-width: 1441px) {
  :root {
    --panel-left-width: 45%;
    --panel-right-width: 55%;
    --panel-min-width-desktop: 360px;
  }
}

/* Ultra-wide: > 1920px - Professional */
@media (min-width: 1921px) {
  :root {
    --panel-left-width: 40%;
    --panel-right-width: 60%;
    --panel-min-width-desktop: 420px;
  }
}

/* Large tablets and small desktops */
@media (min-width: 1025px) and (max-width: 1366px) {
  :root {
    --panel-left-width: 50%;
    --panel-right-width: 50%;
    --panel-min-width-desktop: 300px;
    --panel-left-max-width: none;
    --panel-right-max-width: none;
  }

  .header {
    padding: 0 20px;
  }

  .project-title {
    max-width: 400px;
  }

  .console-panel {
    height: 170px;
  }
}

/* Ultra-wide screens */
@media (min-width: 1920px) {

  :root {
    --panel-min-width-desktop: 500px;
    --panel-left-max-width: 600px;
    --panel-right-max-width: none;
  }

  .console-panel {
    height: 220px;
  }
}

/* Extra large screens */
@media (min-width: 2560px) {

  :root {
    --panel-min-width-desktop: 600px;
    --panel-left-max-width: 800px;
    --panel-right-max-width: none;
  }

  .console-panel {
    height: 280px;
  }

  .header {
    padding: 0 32px;
  }

  .preview-header {
    padding: 0 32px;
  }

  .footer {
    padding: 0 32px;
  }
}

/* 4K and ultra-wide displays */
@media (min-width: 3840px) {

  :root {
    --header-height: 80px;
    --footer-height: 60px;
    --panel-min-width-desktop: 800px;
    --panel-left-max-width: 1200px;
    --panel-right-max-width: none;
  }

  .console-panel {
    height: 350px;
  }

  .header {
    padding: 0 48px;
    height: var(--header-height);
  }

  .preview-header {
    padding: 0 48px;
    height: 80px;
  }

  .footer {
    padding: 0 48px;
    height: var(--footer-height);
  }


  .logo {
    font-size: 28px;
  }

  .logo i {
    font-size: 32px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 16px;
    min-height: 48px;
    border: 1px solid var(--border-color);
  }

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

  .tab {
    padding: 20px 28px;
    font-size: 16px;
  }

  .tab i {
    font-size: 20px;
  }

  .preview-btn {
    padding: 12px 16px;
    font-size: 18px;
    min-width: 48px;
    min-height: 48px;
  }

  .preview-btn i {
    font-size: 20px;
  }

  .console-header {
    padding: 12px 24px;
    font-size: 16px;
  }

  .console-output {
    padding: 16px;
    font-size: 14px;
  }
}

/* Foldable phones and unique mobile formats */
@media (max-width: 280px) {
  :root {
    --header-height: 48px;
    --footer-height: 28px;
  }

  .header {
    padding: 0 4px;
    height: var(--header-height);
  }

  .logo {
    font-size: 10px;
    gap: 1px;
    white-space: nowrap;
  }

  .logo i {
    font-size: 14px;
  }

  .btn {
    padding: 2px 4px;
    min-height: 24px;
  }

  .btn i {
    font-size: 8px;
  }


  .tab {
    padding: 6px 8px;
    font-size: 8px;
    min-width: 50px;
  }

  .tab i {
    font-size: 8px;
  }

  .preview-header {
    height: 48px;
    padding: 0 8px;
  }

  .preview-btn {
    min-width: 20px;
    min-height: 20px;
  }

  .preview-btn i {
    font-size: 8px;
  }

  .preview-actions button {
    min-width: 20px;
    min-height: 20px;
  }

  .console-panel {
    height: 120px;
  }

  .console-header {
    padding: 2px 6px;
    font-size: 8px;
  }

  .console-output {
    padding: 4px;
    font-size: 10px;
  }

  .footer {
    padding: 0 4px;
    height: var(--footer-height);
  }

  .footer-center span {
    font-size: 8px;
  }

  .footer-left span {
    font-size: 8px;
  }

  .btn-small {
    padding: 2px 4px;
    font-size: 8px;
    min-height: 20px;
  }
}

/* Ultra-wide aspect ratios (21:9, 32:9) */
@media (min-aspect-ratio: 21/9) and (min-width: 2560px) {

  .left-panel {
    min-width: 700px;
    max-width: 900px;
  }

  .right-panel {
    min-width: 900px;
    max-width: 1200px;
  }

  .console-panel {
    height: 300px;
  }
}

/* Dynamic Island and notch accommodations */
@supports (padding: max(0px)) {
  @media (max-width: 768px) {
    .header {
      padding-right: max(8px, env(safe-area-inset-right));
      padding-top: max(8px, env(safe-area-inset-top));
    }
  }
}

/* High refresh rate displays */
@media (min-resolution: 120dpi) {

  .btn,
  .tab,
  .preview-btn {
    transition: all 0.15s ease;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #1a1a2e;
    --secondary-color: #16213e;
    --text-primary: #eee;
    --text-secondary: #aaa;
    --border-color: #333;
    --accent-color: #7b3fe4;
    --success-color: #4ade80;
  }
}

/* Light mode support */
@media (prefers-color-scheme: light) {
  :root {
    --primary-color: #f8f9fa;
    --secondary-color: #ffffff;
    --text-primary: #333;
    --text-secondary: #666;
    --border-color: #ddd;
    --accent-color: #7b3fe4;
    --success-color: #28a745;
  }
}

/* Print styles */
@media print {

  .header,
  .footer,
  .preview-header,
  .console-panel,
  .resize-handle,
  .settings-modal {
    display: none !important;
  }


  .editor-layout {
    flex-direction: column;
  }

  .left-panel,
  .right-panel {
    break-inside: avoid;
    border: 1px solid #000;
  }

  .CodeMirror {
    height: auto;
    max-height: 400px;
  }

  .preview-frame {
    height: 400px;
  }
}

/* Screen reader optimizations */
@media (speech) {

  .btn::before,
  .tab::before,
  .preview-btn::before {
    content: attr(aria-label);
    position: absolute;
    left: -9999px;
  }
}

/* Projection mode */
@media projection {

  .console-panel {
    height: 100px;
  }
}

/* E-ink displays */
@media (update: slow) {
  * {
    transition: none !important;
    animation: none !important;
  }

  .btn:hover,
  .tab:hover,
  .preview-btn:hover {
    transform: none;
  }
}

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

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

.fade-in {
  animation: fadeIn 0.3s ease;
}

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

::-webkit-scrollbar-track {
  background: var(--primary-color);
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

/* Loading Spinner */
.spinner {
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--accent-color);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Legacy Styles for Older Pages */
body.legacy .container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

body.legacy .editor-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

body.legacy .editor-section,
body.legacy .output-section {
  display: flex;
  flex-direction: column;
}

body.legacy label {
  font-weight: bold;
  margin-bottom: 5px;
  color: #555;
}

body.legacy textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  resize: vertical;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
}

body.legacy .output-frame {
  width: 100%;
  height: 300px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
}

body.legacy #code-content pre {
  background: #f8f8f8;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 10px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
}

body.legacy h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

body.legacy .btn {
  display: inline-block;
  padding: 10px 20px;
  margin: 10px;
  background: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  text-align: center;
}

body.legacy .btn:hover {
  background: #0056b3;
}

body.legacy button {
  padding: 10px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  margin-top: 10px;
}

body.legacy button:hover {
  background: #218838;
}

/* Zen Mode */
body.zen-mode .header,
body.zen-mode .footer {
  display: none !important;
}


body.zen-mode .preview-header {
  height: 50px;
}

body.zen-mode .console-panel {
  height: 150px;
}

/* Zen Mode Exit Button */
.zen-mode-exit {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  display: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.zen-mode .zen-mode-exit {
  display: block;
  opacity: 1;
  visibility: visible;
}

.zen-exit-btn {
  background: var(--secondary-color);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  min-height: 40px;
  backdrop-filter: blur(10px);
}

.zen-exit-btn:hover {
  background: var(--primary-color);
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.zen-exit-btn:active {
  transform: translateY(0);
}

.zen-exit-btn i {
  font-size: 14px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.zen-exit-btn:hover i {
  color: var(--accent-color);
}

/* Zen Mode Exit Button Responsive */
@media (max-width: 768px) {
  .zen-mode-exit {
    top: 16px;
    right: 16px;
  }

  .zen-exit-btn {
    padding: 8px 12px;
    font-size: 12px;
    min-height: 36px;
  }

  .zen-exit-btn span {
    display: none;
  }

  .zen-exit-btn i {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .zen-mode-exit {
    top: 12px;
    right: 12px;
  }

  .zen-exit-btn {
    padding: 6px 10px;
    font-size: 11px;
    min-height: 32px;
  }

  .zen-exit-btn i {
    font-size: 14px;
  }
}

/* Zen Mode Keyboard Shortcut Hint */
body.zen-mode .zen-mode-exit::after {
  content: "Press ESC to exit";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 8px;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

body.zen-mode .zen-mode-exit:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Alternative Zen Mode Exit Styles */
.zen-mode-exit.minimal {
  top: auto;
  bottom: 20px;
  right: 20px;
  left: auto;
}

.zen-mode-exit.minimal .zen-exit-btn {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 8px 12px;
  font-size: 12px;
  min-height: 36px;
}

.zen-mode-exit.minimal .zen-exit-btn:hover {
  background: rgba(123, 63, 228, 0.8);
  border-color: var(--accent-color);
}

.zen-mode-exit.corner {
  top: 20px;
  right: 20px;
}

.zen-mode-exit.corner .zen-exit-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  justify-content: center;
}

.zen-mode-exit.corner .zen-exit-btn span {
  display: none;
}

.zen-mode-exit.corner .zen-exit-btn i {
  font-size: 16px;
}

/* Floating Exit Button */
.zen-mode-exit.floating {
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
}

.zen-mode-exit.floating .zen-exit-btn {
  background: rgba(37, 37, 55, 0.95);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.zen-mode-exit.floating .zen-exit-btn:hover {
  background: rgba(123, 63, 228, 0.95);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

/* Integrated Exit Button (part of editor) */
.zen-mode-exit.integrated {
  position: fixed;
  top: 0;
  right: 0;
  left: auto;
  bottom: auto;
  width: auto;
  height: var(--header-height);
  background: var(--secondary-color);
  border: none;
  border-left: 1px solid var(--border-color);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
}

.zen-mode-exit.integrated .zen-exit-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 8px 12px;
  font-size: 12px;
  min-height: 32px;
  box-shadow: none;
}

.zen-mode-exit.integrated .zen-exit-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-color);
}

.zen-mode-exit.integrated .zen-exit-btn i {
  font-size: 16px;
}

.zen-mode-exit.integrated .zen-exit-btn span {
  font-size: 11px;
}

/* Zen Mode Exit Button Animation */
@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

body.zen-mode .zen-mode-exit {
  animation: slideInFromRight 0.3s ease forwards;
}

body.zen-mode .zen-mode-exit .zen-exit-btn {
  animation: fadeIn 0.3s ease 0.1s forwards;
}

/* Fullscreen styles */
:fullscreen .header,
:fullscreen .footer {
  background: rgba(37, 37, 55, 0.95);
  backdrop-filter: blur(10px);
}

/* Enhanced button states */
.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Loading states */
.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn.loading::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Tooltip styles */
[data-tooltip] {
  position: relative;
}

[data-tooltip]:hover::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  animation: fadeIn 0.2s ease forwards;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Keyboard shortcuts display */
.shortcuts-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.shortcuts-modal.show {
  display: flex;
}

.shortcuts-content {
  background: var(--secondary-color);
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
}

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

.shortcuts-table th,
.shortcuts-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.shortcuts-table th {
  background: var(--primary-color);
  color: var(--text-primary);
  font-weight: 600;
}

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

.shortcuts-table kbd {
  background: var(--primary-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 4px 8px;
  font-family: monospace;
  font-size: 12px;
  color: var(--accent-color);
}

/* Project templates */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.template-card {
  background: var(--primary-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
}

.template-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(123, 63, 228, 0.2);
}

.template-card h4 {
  color: var(--text-primary);
  margin-bottom: 8px;
}

.template-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 12px;
}

.template-card .template-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.template-tag {
  background: rgba(123, 63, 228, 0.2);
  color: var(--accent-color);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

/* Landing Page Styles */
.landing-page {
  --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  /* Remove global smooth scrolling to allow normal mouse scrolling */
}

.landing-page body {
  background: var(--primary-color);
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  height: auto;
  overflow-x: hidden;
}

.landing-page nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(30, 30, 46, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 0;
}

.landing-page .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.landing-page .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.landing-page .logo:hover {
  color: var(--accent-color);
}

.landing-page .logo i {
  font-size: 1.8rem;
}

.landing-page .nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.landing-page .mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.landing-page .mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-color);
}

.landing-page .mobile-menu-btn.active {
  color: var(--accent-color);
}

.landing-page .nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
}

.landing-page .nav-links a:hover {
  color: var(--text-primary);
}

.landing-page .hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.landing-page .hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
  opacity: 0.8;
  pointer-events: none;
}

.landing-page .hero-content {
  max-width: 1200px;
  text-align: center;
  z-index: 1;
  position: relative;
  padding: 2rem;
}

.landing-page .hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.8s ease;
}

.landing-page .hero p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.8s ease 0.2s both;
}

.landing-page .hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.landing-page .features {
  padding: 5rem 2rem;
  background: var(--secondary-color);
}

.landing-page .features-container {
  max-width: 1200px;
  margin: 0 auto;
}

.landing-page .features h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--text-primary);
}

.landing-page .features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.landing-page .feature-card {
  background: var(--primary-color);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.landing-page .feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--accent-color), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.landing-page .feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
  box-shadow: 0 20px 40px rgba(123, 63, 228, 0.2);
}

.landing-page .feature-card:hover::before {
  opacity: 0.1;
}

.landing-page .feature-icon {
  width: 60px;
  height: 60px;
  background: var(--accent-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: white;
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.landing-page .feature-card:hover .feature-icon {
  transform: scale(1.1);
}

.landing-page .feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.landing-page .feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.landing-page .demo {
  padding: 5rem 2rem;
  background: var(--primary-color);
}

.landing-page .demo-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.landing-page .demo h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.landing-page .demo-preview {
  background: var(--secondary-color);
  border-radius: 12px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.landing-page .demo-preview iframe {
  width: 100%;
  height: 500px;
  border: none;
  border-radius: 8px;
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.landing-page footer {
  background: var(--secondary-color);
  padding: 3rem 2rem 2rem;
  border-top: 1px solid var(--border-color);
}

.landing-page .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.landing-page .footer-section h4 {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.landing-page .footer-section ul {
  list-style: none;
}

.landing-page .footer-section ul li {
  margin-bottom: 0.5rem;
}

.landing-page .footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.landing-page .footer-section a:hover {
  color: var(--accent-color);
}

.landing-page .footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  grid-column: 1 / -1;
}

.landing-page .floating {
  animation: floating 3s ease-in-out infinite;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

@keyframes floating {

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

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

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

/* Scroll to Top Button */
.landing-page .scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--accent-color);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(100px);
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(123, 63, 228, 0.3);
}

.landing-page .scroll-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.landing-page .scroll-to-top:hover {
  background: #6b32d1;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(123, 63, 228, 0.4);
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
  .landing-page .mobile-menu-btn {
    display: block;
  }

  .landing-page .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(30, 30, 46, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .landing-page .nav-links.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .landing-page .nav-links a {
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    text-align: center;
  }

  .landing-page .nav-links a:last-child {
    border-bottom: none;
  }

  .landing-page .nav-links .btn {
    background: var(--accent-color);
    color: white;
    margin: 0.5rem 1rem;
  }

  .landing-page .hero h1 {
    font-size: 2rem;
  }

  .landing-page .hero p {
    font-size: 1rem;
  }

  .landing-page .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .landing-page .btn {
    width: 200px;
    justify-content: center;
  }

  .landing-page .features-grid {
    grid-template-columns: 1fr;
  }

  .landing-page .scroll-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
  }
}