/* Reset and Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-white: #ffffff;
  --color-black: #000000;
  --color-gray-100: #f1f5f9;
  --color-gray-200: #e2e8f0;
  --color-gray-300: #cbd5e1;
  --color-gray-400: #94a3b8;
  --color-gray-500: #64748b;
  --color-gray-600: #475569;
  --color-gray-700: #334155;
  --color-gray-800: #1e293b;
  --color-gray-900: #0f172a;
  --color-gray-950: #020617;
  --color-blue-300: #93c5fd;
  --color-blue-400: #60a5fa;
  --color-blue-500: #3b82f6;
  --color-blue-600: #2563eb;
  --color-cyan-300: #67e8f9;
  --color-cyan-400: #22d3ee;
  --color-cyan-500: #06b6d4;
  --color-cyan-600: #0891b2;
  --color-green-400: #4ade80;
  --color-green-600: #16a34a;
  --color-red-400: #f87171;
  --color-red-600: #dc2626;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
    sans-serif;
  background: linear-gradient(
    to bottom right,
    var(--color-gray-950),
    var(--color-gray-950),
    var(--color-gray-900)
  );
  color: var(--color-gray-100);
  min-height: 100vh;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Page Wrapper - Two Panel Layout */
.page-wrapper {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.main-content.docs-open {
  flex: 0 0 60%;
}

/* Documentation Panel */
.docs-panel {
  display: none;
  flex-direction: column;
  width: 0;
  background: rgba(15, 23, 42, 0.95);
  border-left: 1px solid var(--color-gray-700);
  overflow: hidden;
  transition: all 0.3s ease;
}

.docs-panel.open {
  display: flex;
  width: 40%;
}

.docs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(15, 23, 42, 0.8);
  border-bottom: 1px solid var(--color-gray-700);
}

.docs-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-gray-100);
  margin: 0;
}

.close-docs-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: transparent;
  border: 1px solid var(--color-gray-700);
  border-radius: 0.375rem;
  color: var(--color-gray-300);
  cursor: pointer;
  transition: all 0.2s ease;
}

.close-docs-btn:hover {
  background: var(--color-gray-800);
  border-color: var(--color-red-600);
  color: var(--color-red-400);
}

.close-docs-btn i {
  width: 1.25rem;
  height: 1.25rem;
}

#docsIframe {
  flex: 1;
  width: 100%;
  border: none;
  background: white;
}

/* Mobile - Stack vertically */
@media (max-width: 1024px) {
  .page-wrapper {
    flex-direction: column;
  }

  .main-content.docs-open {
    flex: 0 0 50%;
  }

  .docs-panel.open {
    width: 100%;
    height: 50%;
    border-left: none;
    border-top: 1px solid var(--color-gray-700);
  }
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

@media (min-width: 768px) {
  .container {
    padding: 1rem;
  }
}

/* Hide text on mobile */
.hide-mobile {
  display: none;
}

@media (min-width: 768px) {
  .hide-mobile {
    display: inline;
  }
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-gray-700);
  border-radius: 0.625rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .header {
    padding: 1rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
  }
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .header-left {
    gap: 1rem;
  }
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem;
  background: transparent;
  border: 1px solid var(--color-gray-700);
  border-radius: 0.375rem;
  color: var(--color-gray-300);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.back-btn i {
  width: 1rem;
  height: 1rem;
}

@media (min-width: 768px) {
  .back-btn {
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
  }

  .back-btn i {
    width: 1rem;
    height: 1rem;
  }
}

.back-btn:hover {
  background: var(--color-gray-800);
  border-color: var(--color-cyan-600);
  color: var(--color-cyan-400);
}

.header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .header-title {
    gap: 0.75rem;
  }
}

.header-title h1 {
  font-size: 1.125rem;
  font-weight: 600;
  background: linear-gradient(
    to right,
    var(--color-blue-400),
    var(--color-cyan-400)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (min-width: 768px) {
  .header-title h1 {
    font-size: 1.5rem;
  }
}

.header-title i {
  width: 1.125rem;
  height: 1.125rem;
}

@media (min-width: 768px) {
  .header-title i {
    width: 1.5rem;
    height: 1.5rem;
  }
}

.header-title i {
  color: var(--color-cyan-400);
  width: 2rem;
  height: 2rem;
}

/* Shared Session Banner */
.shared-session-banner {
  background: linear-gradient(
    135deg,
    rgba(6, 182, 212, 0.15),
    rgba(37, 99, 235, 0.15)
  );
  border: 1px solid var(--color-cyan-600);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: slideDown 0.4s ease-out;
}

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

.shared-session-banner i:first-child {
  color: var(--color-cyan-400);
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}

.shared-session-banner p {
  flex: 1;
  font-size: 0.95rem;
  color: var(--color-gray-200);
  line-height: 1.6;
  margin: 0;
}

.shared-session-banner strong {
  color: var(--color-cyan-300);
  font-weight: 600;
}

.close-banner-btn {
  background: transparent;
  border: none;
  color: var(--color-gray-400);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.close-banner-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-gray-200);
}

.close-banner-btn i {
  width: 1.25rem;
  height: 1.25rem;
}

@media (max-width: 768px) {
  .shared-session-banner {
    padding: 0.875rem;
    font-size: 0.875rem;
  }

  .shared-session-banner i:first-child {
    width: 1.25rem;
    height: 1.25rem;
  }

  .shared-session-banner p {
    font-size: 0.875rem;
  }
}

/* Main Layout */
.main-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto 3rem auto;
  flex: 1;
}

@media (min-width: 1024px) {
  .main-layout {
    grid-template-columns: 2fr 1fr;
    align-items: stretch;
  }
}

/* Editor Panel */
.editor-panel {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-gray-700);
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

@media (min-width: 768px) {
  .editor-panel {
    border-radius: 1rem;
    padding: 1.5rem;
  }
}

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

.editor-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-gray-100);
}

@media (min-width: 768px) {
  .editor-header h2 {
    font-size: 1.125rem;
  }
}

.editor-actions {
  display: flex;
  gap: 0.5rem;
}

.upload-btn,
.clear-btn,
.share-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: 1px solid var(--color-gray-700);
  border-radius: 0.5rem;
  color: var(--color-gray-300);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-btn span,
.clear-btn span,
.share-btn span {
  display: none;
}

@media (min-width: 768px) {
  .upload-btn,
  .clear-btn,
  .share-btn {
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .upload-btn span,
  .clear-btn span,
  .share-btn span {
    display: inline;
  }
}

.upload-btn:disabled,
.clear-btn:disabled,
.share-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.upload-btn:disabled:hover,
.clear-btn:disabled:hover,
.share-btn:disabled:hover {
  background: transparent;
  border-color: var(--color-gray-700);
  color: var(--color-gray-300);
}

.upload-btn:hover {
  background: var(--color-gray-800);
  border-color: var(--color-blue-600);
  color: var(--color-blue-400);
}

.clear-btn:hover {
  background: var(--color-gray-800);
  border-color: var(--color-red-600);
  color: var(--color-red-400);
}

.share-btn:hover {
  background: var(--color-gray-800);
  border-color: var(--color-cyan-600);
  color: var(--color-cyan-400);
}

.upload-btn i,
.clear-btn i,
.share-btn i {
  width: 1rem;
  height: 1rem;
}

/* Code Editor */
.code-editor {
  display: flex;
  flex: 1;
  background: linear-gradient(to bottom, #0a0e1a, #000000);
  border: 1px solid var(--color-gray-800);
  border-radius: 0.75rem;
  overflow: hidden;
  font-family: "SF Mono", "Monaco", "Menlo", "Ubuntu Mono", "Consolas",
    "Courier New", monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  min-height: 300px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "liga" 0, "calt" 0;
}

@media (min-width: 768px) {
  .code-editor {
    font-size: 0.9375rem;
    line-height: 1.7;
    min-height: 500px;
    border-radius: 1rem;
  }
}

.line-numbers {
  padding: 1rem 0.75rem;
  background: rgba(6, 11, 25, 0.7);
  color: var(--color-gray-600);
  text-align: right;
  user-select: none;
  min-width: 3rem;
  overflow-y: hidden;
  white-space: pre;
  font-weight: 500;
  border-right: 1px solid var(--color-gray-800);
}

@media (min-width: 768px) {
  .line-numbers {
    padding: 1.25rem 1rem;
    min-width: 3.5rem;
  }
}

.editor-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.code-highlight {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 1rem;
  pointer-events: none;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

@media (min-width: 768px) {
  .code-highlight {
    padding: 1.25rem;
  }
}

.code-highlight code {
  display: block;
  font-family: inherit;
}

.code-input {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 1rem;
  background: transparent;
  border: none;
  color: transparent;
  caret-color: var(--color-cyan-400);
  outline: none;
  resize: none;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  z-index: 2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-text-fill-color: transparent;
}

@media (min-width: 768px) {
  .code-input {
    padding: 1.25rem;
  }
}

.code-input::placeholder {
  color: var(--color-gray-700);
  font-style: italic;
  -webkit-text-fill-color: var(--color-gray-700);
}

.code-input::selection {
  background-color: rgba(6, 182, 212, 0.3);
  -webkit-text-fill-color: transparent;
}

/* Syntax Highlighting */
.code-highlight .comment {
  color: #6b7280;
  font-style: italic;
  opacity: 0.9;
}

.code-highlight .label {
  color: #22d3ee;
  font-weight: 600;
}

.code-highlight .keyword {
  color: #60a5fa;
  font-weight: 500;
}

.code-highlight .value {
  color: #4ade80;
  font-weight: 400;
}

.code-highlight .number {
  color: #fb923c;
  font-weight: 500;
}

.code-highlight .time {
  color: #c084fc;
  font-weight: 600;
}

.code-highlight .string {
  color: #fbbf24;
}

/* Default text color for unhighlighted parts */
.code-highlight code {
  color: #e5e7eb;
}

/* Control Panel */
.control-panel {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-gray-700);
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .control-panel {
    border-radius: 1rem;
    padding: 1.5rem;
  }
}

.control-panel h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-gray-100);
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .control-panel h2 {
    font-size: 1.125rem;
  }
}

/* Snippets Section */
.snippets-section {
  padding: 0.875rem;
  background: var(--color-gray-900);
  border: 1px solid var(--color-gray-800);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .snippets-section {
    padding: 1rem;
  }
}

.snippets-section h3 {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
  .snippets-section h3 {
    font-size: 0.75rem;
  }
}

.snippets-description {
  font-size: 0.75rem;
  color: var(--color-gray-400);
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .snippets-description {
    font-size: 0.8125rem;
  }
}

.snippets-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.snippet-balloon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.875rem;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.15),
    rgba(6, 182, 212, 0.15)
  );
  border: 1px solid var(--color-cyan-600);
  border-radius: 9999px;
  color: var(--color-cyan-400);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: grab;
  user-select: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.1);
}

@media (min-width: 768px) {
  .snippet-balloon {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
  }
}

.snippet-balloon:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.25);
  border-color: var(--color-cyan-400);
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.25),
    rgba(6, 182, 212, 0.25)
  );
}

.snippet-balloon:active {
  cursor: grabbing;
  transform: scale(0.95);
}

.snippet-balloon.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

/* Snippet color variations */
.snippet-balloon.preset-color {
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.15),
    rgba(168, 85, 247, 0.15)
  );
  border-color: #a855f7;
  color: #c084fc;
}

.snippet-balloon.preset-color:hover {
  border-color: #c084fc;
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.25),
    rgba(168, 85, 247, 0.25)
  );
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.25);
}

.snippet-balloon.binaural-color {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.15),
    rgba(96, 165, 250, 0.15)
  );
  border-color: #3b82f6;
  color: #60a5fa;
}

.snippet-balloon.binaural-color:hover {
  border-color: #60a5fa;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.25),
    rgba(96, 165, 250, 0.25)
  );
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.snippet-balloon.monaural-color {
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.15),
    rgba(74, 222, 128, 0.15)
  );
  border-color: #22c55e;
  color: #4ade80;
}

.snippet-balloon.monaural-color:hover {
  border-color: #4ade80;
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.25),
    rgba(74, 222, 128, 0.25)
  );
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

.snippet-balloon.isochronic-color {
  background: linear-gradient(
    135deg,
    rgba(251, 146, 60, 0.15),
    rgba(251, 191, 36, 0.15)
  );
  border-color: #fb923c;
  color: #fbbf24;
}

.snippet-balloon.isochronic-color:hover {
  border-color: #fbbf24;
  background: linear-gradient(
    135deg,
    rgba(251, 146, 60, 0.25),
    rgba(251, 191, 36, 0.25)
  );
  box-shadow: 0 4px 12px rgba(251, 146, 60, 0.25);
}

.snippet-balloon.white-color {
  background: linear-gradient(
    135deg,
    rgba(203, 213, 225, 0.15),
    rgba(226, 232, 240, 0.15)
  );
  border-color: #cbd5e1;
  color: #e2e8f0;
}

.snippet-balloon.white-color:hover {
  border-color: #e2e8f0;
  background: linear-gradient(
    135deg,
    rgba(203, 213, 225, 0.25),
    rgba(226, 232, 240, 0.25)
  );
  box-shadow: 0 4px 12px rgba(203, 213, 225, 0.25);
}

.snippet-balloon.pink-color {
  background: linear-gradient(
    135deg,
    rgba(236, 72, 153, 0.15),
    rgba(244, 114, 182, 0.15)
  );
  border-color: #ec4899;
  color: #f472b6;
}

.snippet-balloon.pink-color:hover {
  border-color: #f472b6;
  background: linear-gradient(
    135deg,
    rgba(236, 72, 153, 0.25),
    rgba(244, 114, 182, 0.25)
  );
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.25);
}

.snippet-balloon.brown-color {
  background: linear-gradient(
    135deg,
    rgba(120, 53, 15, 0.25),
    rgba(180, 83, 9, 0.25)
  );
  border-color: #b45309;
  color: #d97706;
}

.snippet-balloon.brown-color:hover {
  border-color: #d97706;
  background: linear-gradient(
    135deg,
    rgba(120, 53, 15, 0.35),
    rgba(180, 83, 9, 0.35)
  );
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.25);
}

.snippet-balloon.timeline-color {
  background: linear-gradient(
    135deg,
    rgba(6, 182, 212, 0.15),
    rgba(34, 211, 238, 0.15)
  );
  border-color: #06b6d4;
  color: #22d3ee;
}

.snippet-balloon.timeline-color:hover {
  border-color: #22d3ee;
  background: linear-gradient(
    135deg,
    rgba(6, 182, 212, 0.25),
    rgba(34, 211, 238, 0.25)
  );
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.25);
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.control-buttons {
  display: flex;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .control-buttons {
    gap: 0.75rem;
  }
}

.btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.75rem 0.875rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (min-width: 768px) {
  .btn {
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
  }
}

.btn i {
  width: 1.125rem;
  height: 1.125rem;
}

@media (min-width: 768px) {
  .btn i {
    width: 1.25rem;
    height: 1.25rem;
  }
}

.btn-play {
  background: linear-gradient(
    135deg,
    var(--color-green-600),
    var(--color-green-400)
  );
  color: white;
}

.btn-play:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(34, 197, 94, 0.3);
}

.btn-stop {
  background: linear-gradient(
    135deg,
    var(--color-red-600),
    var(--color-red-400)
  );
  color: white;
}

.btn-stop:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(220, 38, 38, 0.3);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Status */
.status {
  padding: 0.875rem;
  background: var(--color-gray-900);
  border: 1px solid var(--color-gray-800);
  border-radius: 0.5rem;
}

@media (min-width: 768px) {
  .status {
    padding: 1rem;
  }
}

.status-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .status-label {
    font-size: 0.75rem;
  }
}

.status-value {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-gray-200);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .status-value {
    font-size: 1rem;
  }
}

.status-icon {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--color-gray-600);
}

.status-icon.idle {
  background: var(--color-gray-600);
}

.status-icon.loading {
  background: var(--color-blue-400);
  animation: pulse 2s infinite;
}

.status-icon.playing {
  background: var(--color-green-400);
  animation: pulse 2s infinite;
}

.status-icon.stopped {
  background: var(--color-red-400);
}

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

/* Progress Bar */
.progress-section {
  padding: 0.875rem;
  background: var(--color-gray-900);
  border: 1px solid var(--color-gray-800);
  border-radius: 0.5rem;
}

@media (min-width: 768px) {
  .progress-section {
    padding: 1rem;
  }
}

.progress-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
}

@media (min-width: 768px) {
  .progress-label {
    font-size: 0.75rem;
  }
}

.progress-time {
  color: var(--color-cyan-400);
  font-variant-numeric: tabular-nums;
  font-size: 0.6875rem;
}

@media (min-width: 768px) {
  .progress-time {
    font-size: 0.75rem;
  }
}

.progress-bar {
  height: 0.5rem;
  background: var(--color-gray-800);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--color-blue-500),
    var(--color-cyan-400)
  );
  border-radius: 9999px;
  width: 0%;
  transition: width 0.1s linear;
}

/* Info Box */
.info-box {
  padding: 1rem;
  background: linear-gradient(
    135deg,
    rgba(34, 211, 238, 0.15),
    rgba(59, 130, 246, 0.15)
  );
  border: 1px solid var(--color-cyan-600);
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(34, 211, 238, 0.1);
  transition: all 0.3s ease;
}

.info-box.hidden {
  display: none;
}

@media (min-width: 768px) {
  .info-box {
    padding: 1.25rem;
  }
}

.info-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.info-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-header i {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-cyan-400);
  flex-shrink: 0;
}

.info-header h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-cyan-300);
  margin: 0;
}

@media (min-width: 768px) {
  .info-header h4 {
    font-size: 1rem;
  }
}

.info-box p {
  font-size: 0.8125rem;
  color: var(--color-gray-300);
  line-height: 1.5;
  margin: 0;
}

@media (min-width: 768px) {
  .info-box p {
    font-size: 0.875rem;
    line-height: 1.6;
  }
}

.learn-syntax-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(
    135deg,
    var(--color-cyan-600),
    var(--color-blue-600)
  );
  border: none;
  border-radius: 0.5rem;
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(34, 211, 238, 0.3);
}

@media (min-width: 768px) {
  .learn-syntax-btn {
    font-size: 0.9375rem;
  }
}

.learn-syntax-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 211, 238, 0.4);
  background: linear-gradient(
    135deg,
    var(--color-cyan-500),
    var(--color-blue-500)
  );
}

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

.learn-syntax-btn i {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.learn-syntax-btn i:last-child {
  transition: transform 0.2s ease;
}

.learn-syntax-btn:hover i:last-child {
  transform: translateX(3px);
}

/* Error Message */
.error-message {
  padding: 0.875rem;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid var(--color-red-600);
  border-radius: 0.5rem;
  display: none;
  gap: 0.625rem;
}

@media (min-width: 768px) {
  .error-message {
    padding: 1rem;
    gap: 0.75rem;
  }
}

.error-message.show {
  display: flex;
}

.error-message i {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--color-red-400);
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .error-message i {
    width: 1.25rem;
    height: 1.25rem;
  }
}

.error-message p {
  font-size: 0.8125rem;
  color: var(--color-red-400);
  line-height: 1.5;
}

@media (min-width: 768px) {
  .error-message p {
    font-size: 0.875rem;
    line-height: 1.6;
  }
}

/* Hidden file input */
#fileInput {
  display: none;
}

/* Footer */
.footer {
  margin-top: auto;
  padding: 2rem 0;
  border-top: 1px solid rgba(51, 65, 85, 0.5);
}

.footer .container {
  max-width: 1152px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo-image {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
}

.footer-logo span {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(
    to right,
    var(--color-blue-400),
    var(--color-cyan-400)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-tagline {
  color: var(--color-gray-400);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-gray-300);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.footer-link i {
  width: 1rem;
  height: 1rem;
}

.footer-link:hover {
  color: var(--color-cyan-400);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(51, 65, 85, 0.3);
  text-align: center;
}

.footer-bottom p {
  color: var(--color-gray-500);
  font-size: 0.875rem;
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--color-gray-700);
  border-radius: 0.5rem;
}

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