/* ========================================
  1. DESIGN TOKENS & VARIABLES 
  ========================================
  */
:root {
  /* Ubuntu-inspired Warmth (Refined) */
  --brand-orange: #e95420;
  --brand-aubergine: #2c001e;
  --brand-aubergine-light: #4c1f3d;

  /* iOS-inspired Neutrals & Glass */
  --glass-blur: blur(24px);
  --glass-saturation: 140%;

  /* Material-inspired Semantics */
  --success: #34c759;
  --warning: #ff9500;
  --danger: #ff3b30;
  --info: #0a84ff;

  /* Animation */
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-smooth: cubic-bezier(0.33, 1, 0.68, 1);
  /* EOS-like easing */
  --duration: 0.4s;

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

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
}

/* LIGHT MODE (Default) */
[data-theme="light"] {
  --bg-body: #f5f5f7;
  /* Apple Grey */
  --bg-surface: rgba(255, 255, 255, 0.75);
  --bg-panel: #ffffff;
  --text-main: #1d1d1f;
  --text-secondary: #86868b;
  --border-subtle: rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.1);
  --code-bg: #f9f9fb;

  /* Apple Notes Specifics (Light) */
  --notes-sidebar-bg: #f0f0f5;
  --notes-list-bg: #ffffff;
  --notes-paper-bg: #ffffff;
  --notes-selection: #fbc02d;
  --notes-line: #e5e5ea;
}

/* DARK MODE (Ubuntu/Android Dark) */
[data-theme="dark"] {
  --bg-body: #111111;
  /* Deep Black */
  --bg-surface: rgba(30, 30, 30, 0.75);
  --bg-panel: #1c1c1e;
  --text-main: #f5f5f7;
  --text-secondary: #98989d;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
  --code-bg: #0d0d0d;

  /* Apple Notes Specifics (Dark) */
  --notes-sidebar-bg: #1a1a1a;
  --notes-list-bg: #252525;
  --notes-paper-bg: #151515;
  --notes-selection: #e95420;
  --notes-line: #2c2c2e;
}

/* ========================================
  2. RESET & GLOBAL STYLES 
  ========================================
  */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Ubuntu", Helvetica, Arial, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color var(--duration) var(--ease-smooth),
    color var(--duration) var(--ease-smooth);
  padding-top: 70px;
  height: 100vh;
  overflow-x: hidden;
  font-size: 16px;
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(128, 128, 128, 0.3);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(128, 128, 128, 0.5);
}

h1,
h2,
h3 {
  font-weight: 700;
  letter-spacing: -0.025em;
}

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

/* ========================================
  3. LAYOUT COMPONENTS 
  ========================================
  */

/* HEADER */
.os-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-lg);
  background: var(--bg-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  transition: background var(--duration);
}

.brand {
  font-size: 1.15rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}

.brand span {
  color: var(--brand-orange);
}

.os-nav {
  display: flex;
  gap: var(--space-xl);
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s;
  position: relative;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-main);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -22px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand-orange);
  border-radius: 2px 2px 0 0;
}

.theme-switch {
  background: transparent;
  border: 1px solid var(--border-subtle);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--text-main);
  transition: all 0.2s var(--ease-spring);
}

.theme-switch:hover {
  background: var(--bg-panel);
  transform: scale(1.05);
}

.theme-switch:active {
  transform: scale(0.95);
}

/* HERO - REFINED & PERFECTED */
.hero {
  padding: 140px var(--space-lg) 100px;
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

/* Subtle Background Glow */
.hero::before {
  content: "";
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle,
      rgba(233, 84, 32, 0.08) 0%,
      rgba(0, 0, 0, 0) 70%);
  z-index: -1;
  pointer-events: none;
  filter: blur(80px);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 99px;
  background: rgba(233, 84, 32, 0.08);
  color: var(--brand-orange);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 32px;
  border: 1px solid rgba(233, 84, 32, 0.15);
  letter-spacing: 0.02em;
  animation: fadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero h1 {
  font-size: clamp(3.2rem, 7vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
  background: linear-gradient(180deg,
      var(--text-main) 20%,
      rgba(100, 100, 100, 0.8) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s backwards;
}

/* Dark mode override for gradient text brightness */
[data-theme="dark"] .hero h1 {
  background: linear-gradient(180deg,
      #fff 20%,
      rgba(255, 255, 255, 0.6) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.35rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 48px;
  font-weight: 400;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s backwards;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s backwards;
}

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

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

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-lg) 80px;
  display: grid;
  gap: 40px;
}

/* ========================================
  4. COMPONENTS WRAPPERS 
  ========================================
  */
.component-section {
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: box-shadow 0.3s;
}

.component-section:hover {
  box-shadow: var(--shadow-md);
}

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

.section-title h2 {
  font-size: 1.25rem;
  margin-bottom: 2px;
}

.section-title p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

.preview-area {
  padding: 40px;
  background: var(--bg-body);
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  position: relative;
}

.preview-area::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--border-subtle) 1px,
      transparent 1px);
  background-size: 24px 24px;
  opacity: 0.6;
  pointer-events: none;
}

.doc-tabs {
  display: flex;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 16px;
}

.doc-tab {
  padding: 14px 20px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s;
}

.doc-tab:hover {
  color: var(--text-main);
}

.doc-tab.active {
  color: var(--brand-orange);
  border-bottom-color: var(--brand-orange);
}

.doc-content {
  padding: 24px;
  display: none;
  animation: fadeIn 0.3s ease;
}

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

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

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

/* TERMINAL STYLE */
.terminal-window {
  background-color: #2b2b2b;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-md);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.2);
  font-family: "SF Mono", "Fira Code", monospace;
}

.terminal-header {
  background: #1e1e1e;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.terminal-controls {
  position: absolute;
  left: 16px;
  display: flex;
  gap: 8px;
}

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

.dot-close {
  background-color: #ff5f56;
}

.dot-min {
  background-color: #ffbd2e;
}

.dot-max {
  background-color: #27c93f;
}

.terminal-title {
  color: #888;
  font-size: 0.8rem;
  font-weight: 500;
}

.terminal-body {
  padding: 20px;
  color: #efefef;
  overflow-x: auto;
  white-space: pre;
  font-size: 0.9rem;
  line-height: 1.5;
}

.code-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
}

/* NOTEPAD STYLE */
.notepad-note {
  background-color: #fffde7;
  border: 1px solid #f9fbe7;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  margin-bottom: 0;
}

[data-theme="dark"] .notepad-note {
  background-color: #2c2c2e;
  border-color: #3a3a3c;
  color: #fff;
}

[data-theme="dark"] .notepad-header {
  background-color: #1c1c1e;
  border-color: #3a3a3c;
  color: #a1a1a6;
}

[data-theme="dark"] .notepad-body {
  background-image: linear-gradient(#333 1px, transparent 1px);
}

[data-theme="dark"] .notepad-body h3 {
  color: #ff9f0a;
}

[data-theme="dark"] .notepad-body strong {
  color: #fff;
}

[data-theme="dark"] .notepad-body p {
  color: #ccc;
}

[data-theme="dark"] .note-tag {
  color: #ff9f0a;
  background: rgba(255, 255, 255, 0.1);
}

.notepad-header {
  background-color: #fff9c4;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  color: #f57f17;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.notepad-body {
  padding: 24px;
  line-height: 1.8;
  background-image: linear-gradient(#f1f8e9 1px, transparent 1px);
  background-size: 100% 32px;
  background-position: 0 6px;
}

.notepad-body h3 {
  font-size: 1.1rem;
  color: #33691e;
  margin: 0 0 16px 0;
  font-family: inherit;
}

.notepad-body ul {
  padding-left: 18px;
  margin-bottom: 0;
}

.notepad-body li {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.note-tag {
  background: rgba(0, 0, 0, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.85em;
  color: #d84315;
}

/* BUTTON CONTROLS STYLING */
.controls-wrapper {
  width: 100%;
  display: flex;
  gap: 32px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  justify-content: center;
  align-items: flex-end;
}

.control-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.control-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Custom Range Slider */
input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 140px;
  background: transparent;
}

input[type="range"]:focus {
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: var(--brand-orange);
  cursor: pointer;
  margin-top: -8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2), inset 0 0 0 2px #fff;
  transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  cursor: pointer;
  background: var(--border-subtle);
  border-radius: 2px;
}

/* Custom Color Picker */
input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

input[type="color"]:hover {
  transform: scale(1.1);
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

/* SKELETON STYLES - More on the way */
.coming-soon-section {
  margin-top: 80px;
  text-align: center;
}

.coming-soon-title {
  font-size: 1.25rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 40px;
  letter-spacing: -0.02em;
  opacity: 0.7;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  opacity: 0.7;
}

.skeleton-card {
  background: var(--bg-panel);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  height: 240px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.sk-block {
  background: var(--border-subtle);
  border-radius: 4px;
  width: 100%;
}

.sk-img {
  height: 120px;
  border-radius: var(--radius-md);
  opacity: 0.5;
}

.sk-title {
  height: 20px;
  width: 60%;
  opacity: 0.6;
}

.sk-text {
  height: 14px;
  width: 85%;
  opacity: 0.4;
}

.sk-text-2 {
  height: 14px;
  width: 70%;
  opacity: 0.4;
}

/* Shimmer Animation */
.skeleton-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0,
      rgba(255, 255, 255, 0.1) 20%,
      rgba(255, 255, 255, 0.2) 60%,
      rgba(255, 255, 255, 0));
  animation: shimmer 2.5s infinite;
}

[data-theme="dark"] .skeleton-card::after {
  background-image: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0,
      rgba(255, 255, 255, 0.03) 20%,
      rgba(255, 255, 255, 0.05) 60%,
      rgba(255, 255, 255, 0));
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* GRADIENT TEXT MAKER SPECIFIC */
.gradient-text-result {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  /* Default fallback */
  background-image: linear-gradient(45deg, #e95420, #4c1f3d);
  padding: 20px;
}

/* ========================================
  5. UI COMPONENTS 
  ========================================
  */

/* BUTTONS - POLISHED */
.btn {
  appearance: none;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  height: 48px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s var(--ease-smooth);
  gap: 8px;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
}

.btn:active {
  transform: scale(0.96);
}

/* PRIMARY: Gradient & Deep Shadow */
.btn-primary {
  background: linear-gradient(180deg, #f06535 0%, #e95420 100%);
  /* Background color fallback for gradient updates via JS */
  background-color: var(--brand-orange);
  /* Use JS variable if gradient override needed, or simplified background */
  /* For the color picker to work perfectly with gradient, we might need to simplify or use variable in gradient */
  background: var(--brand-orange);
  color: white;
  box-shadow: 0 4px 12px rgba(233, 84, 32, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  filter: brightness(1.1);
  /* Better for dynamic colors */
  box-shadow: 0 6px 16px rgba(233, 84, 32, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* MEDIA PLAYER WIDGET (Premium & Minimalist) */
.media-widget {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-radius: 28px;
  padding: 24px;
  width: 320px;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.5) inset;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s;
}

[data-theme="dark"] .media-widget {
  background: rgba(30, 30, 30, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.05) inset;
}

.media-widget:hover {
  transform: translateY(-4px);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.5) inset;
}

.media-art {
  width: 140px;
  height: 140px;
  border-radius: 20px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.media-art-inner {
  width: 100%;
  height: 100%;
  /* Minimalist Premium Gradient */
  background: linear-gradient(135deg, #FF9A9E 0%, #FECFEF 100%);
  position: relative;
}

/* Glass reflection overlay */
.media-art-inner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 50%);
}

[data-theme="dark"] .media-art-inner {
  background: linear-gradient(135deg, #4c1f3d 0%, #2c001e 100%);
}

.media-info {
  text-align: center;
  margin-top: 12px;
}

.track-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-main);
}

.track-artist {
  margin: 0;
  font-size: 0.9rem;
  color: var(--brand-orange);
  font-weight: 500;
}

.media-progress-container {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}

.media-time {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  width: 32px;
  /* Fixed width prevents jitter */
}

.media-time.current {
  text-align: right;
}

.media-time.total {
  text-align: left;
}

.media-progress-bar {
  flex-grow: 1;
  height: 4px;
  background: rgba(0, 0, 0, 0.05);
  /* Light mode track */
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

[data-theme="dark"] .media-progress-bar {
  background: rgba(255, 255, 255, 0.1);
}

.media-progress-fill {
  width: 30%;
  height: 100%;
  background: var(--brand-orange);
  border-radius: 2px;
  position: relative;
}

/* Shimmer effect on progress bar */
.media-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.5s infinite;
}

.media-controls {
  display: flex;
  align-items: center;
  gap: 24px;
}

.media-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  border-radius: 50%;
}

.media-btn.secondary {
  width: 40px;
  height: 40px;
  opacity: 0.6;
}

.media-btn.secondary:hover {
  background: rgba(0, 0, 0, 0.05);
  opacity: 1;
}

[data-theme="dark"] .media-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.media-btn.primary {
  width: 56px;
  height: 56px;
  background: var(--text-main);
  color: var(--bg-body);
  /* Inverse color icon */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.media-btn.primary:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

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



/* SECONDARY: Soft & Neutral */
.btn-secondary {
  background: var(--border-subtle);
  color: var(--text-main);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.02);
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-main);
}

[data-theme="dark"] .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* OUTLINE: Crisp Border */
.btn-outline {
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--border-subtle);
  color: var(--text-main);
}

.btn-outline:hover {
  box-shadow: inset 0 0 0 2px var(--brand-orange);
  color: var(--brand-orange);
  background: rgba(233, 84, 32, 0.04);
}

/* GHOST: Minimal */
.btn-ghost {
  background: transparent;
  color: var(--brand-orange);
}

.btn-ghost:hover {
  background: rgba(233, 84, 32, 0.08);
}

/* FOOTER */
footer {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
  margin-top: 60px;
  background: var(--bg-panel);
  font-size: 0.9rem;
}

.hidden {
  display: none !important;
}

.icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ========================================
  6. FULL SCREEN DOCS APP
  ========================================
  */
#view-home {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#view-home.fade-out {
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
}

#view-docs {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--notes-sidebar-bg);
  z-index: 2000;
  display: flex;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.98);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#view-docs.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.docs-sidebar {
  width: 320px;
  background: var(--notes-sidebar-bg);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding-top: 10px;
}

.sidebar-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-to-home {
  background: transparent;
  color: var(--brand-orange);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 1rem;
  padding: 8px 0;
}

.back-to-home:hover {
  opacity: 0.8;
}

.docs-search-bar {
  padding: 0 20px 16px;
}

.docs-search-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  padding: 10px 12px 10px 36px;
  border-radius: 10px;
  font-size: 0.95rem;
  color: var(--text-main);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
  transition: background 0.2s;
}

[data-theme="dark"] .docs-search-input {
  background: rgba(255, 255, 255, 0.1);
}

.docs-search-input:focus {
  background: rgba(0, 0, 0, 0.08);
  outline: none;
}

.docs-list {
  overflow-y: auto;
  flex: 1;
  padding: 0 16px;
}

.doc-item {
  padding: 14px 18px;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 4px;
  transition: background 0.2s;
}

.doc-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .doc-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.doc-item.active {
  background: var(--notes-selection);
}

.doc-item.active * {
  color: #fff !important;
}

.doc-item-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
  display: block;
  color: var(--text-main);
}

.doc-item-meta {
  display: flex;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  opacity: 0.9;
}

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

.docs-editor {
  flex: 1;
  background: var(--notes-paper-bg);
  padding: 60px 10%;
  overflow-y: auto;
  position: relative;
}

.editor-timestamp {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 40px;
  opacity: 0.6;
  font-weight: 500;
}

.editor-content {
  max-width: 800px;
  margin: 0 auto;
}

.editor-content h1 {
  font-size: 2.5rem;
  margin-bottom: 24px;
  color: var(--text-main);
  line-height: 1.1;
}

.editor-content h2 {
  font-size: 1.6rem;
  margin-top: 48px;
  margin-bottom: 16px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.editor-content p {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-main);
  margin-bottom: 24px;
  font-weight: 400;
  opacity: 0.9;
}

.editor-content ul {
  padding-left: 24px;
  margin-bottom: 24px;
}

.editor-content li {
  margin-bottom: 12px;
  font-size: 1.15rem;
  color: var(--text-main);
  opacity: 0.9;
}

.editor-content .terminal-window {
  margin: 24px 0;
  border-radius: 8px;
}

@media (max-width: 850px) {
  .docs-sidebar {
    width: 100%;
  }

  .docs-editor {
    display: none;
  }

  #view-docs.reading-mode .docs-sidebar {
    display: none;
  }

  #view-docs.reading-mode .docs-editor {
    display: block;
    padding: 40px 24px;
  }

  .mobile-back {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--brand-orange);
    margin-bottom: 20px;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1rem;
  }
}

@media (min-width: 851px) {
  .mobile-back {
    display: none;
  }
}

/* COOL FOOTER CREDITS */
.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 99px;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all 0.4s var(--ease-spring);
  cursor: default;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.footer-badge:hover {
  border-color: rgba(233, 84, 32, 0.3);
  box-shadow: 0 10px 30px rgba(233, 84, 32, 0.15);
  transform: translateY(-3px) scale(1.02);
  background: var(--bg-panel);
}

.dev-name {
  font-weight: 800;
  background: linear-gradient(90deg, #e95420, #9b2c6b, #e95420);
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 4s linear infinite;
  letter-spacing: -0.02em;
}

#gradTextInput {
  width: 300px;
  height: 50px;
  border-radius: 10px;
}

.input-field {
  padding: 5px;
  font-size: 20px;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

.heart-icon {
  color: var(--danger);
  animation: pulse 2s infinite ease-in-out;
  display: inline-block;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.25);
  }

  100% {
    transform: scale(1);
  }
}

/* LIQUID GOOEY LOADER */
.gooey-loader-container {
  width: 200px;
  height: 200px;
  position: relative;
  filter: url("#goo");
  animation: rotate-goo 12s linear infinite;
  margin: 0 auto;
}

.blob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--brand-orange);
  border-radius: 50%;
  width: 60px;
  height: 60px;
}

.blob-1 {
  animation: blob-move-1 4s ease-in-out infinite;
}

.blob-2 {
  animation: blob-move-2 5s ease-in-out infinite;
  width: 40px;
  height: 40px;
  background: var(--brand-aubergine-light);
}

.blob-3 {
  animation: blob-move-3 6s ease-in-out infinite;
  width: 50px;
  height: 50px;
}

.blob-4 {
  animation: blob-move-4 3.5s ease-in-out infinite;
  width: 30px;
  height: 30px;
  background: var(--brand-aubergine);
}

.blob-5 {
  width: 80px;
  height: 80px;
  /* Center blob stays mostly put but pulses */
  animation: blob-pulse 3s ease-in-out infinite;
}

@keyframes rotate-goo {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes blob-move-1 {

  0%,
  100% {
    transform: translate(-50%, -50%) translate(0, 0);
  }

  33% {
    transform: translate(-50%, -50%) translate(50px, -20px);
  }

  66% {
    transform: translate(-50%, -50%) translate(-30px, 40px);
  }
}

@keyframes blob-move-2 {

  0%,
  100% {
    transform: translate(-50%, -50%) translate(0, 0);
  }

  33% {
    transform: translate(-50%, -50%) translate(-50px, -30px);
  }

  66% {
    transform: translate(-50%, -50%) translate(20px, 50px);
  }
}

@keyframes blob-move-3 {

  0%,
  100% {
    transform: translate(-50%, -50%) translate(0, 0);
  }

  33% {
    transform: translate(-50%, -50%) translate(40px, 40px);
  }

  66% {
    transform: translate(-50%, -50%) translate(-40px, -40px);
  }
}

@keyframes blob-move-4 {

  0%,
  100% {
    transform: translate(-50%, -50%) translate(0, 0);
  }

  50% {
    transform: translate(-50%, -50%) translate(-60px, 10px);
  }
}

@keyframes blob-pulse {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.1);
  }
}