/* ============================================================
   Pomoly – Complete Stylesheet
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --white: #ffffff;
  --black: #000000;
  --red: #ff3b30;
  --green: #22c55e;
  --red-dark: #d63031;
  --green-dark: #16a34a;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d4;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --gray-900: #171717;
  --gray-950: #0a0a0a;

  --bg: var(--white);
  --bg-alt: var(--gray-50);
  --text: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-tertiary: var(--gray-400);
  --border: var(--gray-200);
  --card-bg: var(--white);
  --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.1);
  --header-bg: rgba(255, 255, 255, 0.72);
  --header-border: rgba(255, 255, 255, 0.18);
  --hero-gradient: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #fce7f3 100%);
  --accent-gradient: linear-gradient(135deg, var(--red), var(--green));
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1200px;
  --header-height: 72px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode */
[data-theme="dark"] {
  --bg: var(--gray-950);
  --bg-alt: var(--gray-900);
  --text: var(--gray-100);
  --text-secondary: var(--gray-400);
  --text-tertiary: var(--gray-500);
  --border: var(--gray-800);
  --card-bg: var(--gray-900);
  --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.4);
  --header-bg: rgba(10, 10, 10, 0.78);
  --header-border: rgba(255, 255, 255, 0.06);
  --hero-gradient: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea {
  font-family: inherit;
  font-size: 1rem;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
  position: relative;
}

.section-alt {
  background: var(--bg-alt);
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--red);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.7;
}

.text-center { text-align: center; }
.text-center .section-subtitle { margin: 0 auto; }

/* ---------- Animations / Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ---------- Header / Navigation ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--header-bg);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid var(--header-border);
  transition: background var(--transition), border-color var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--white);
  font-weight: 700;
  flex-shrink: 0;
}

.logo-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Dropdown Navigation */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dropdown-arrow {
  font-size: 0.65rem;
  transition: transform var(--transition);
}

.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(4px);
}

.nav-dropdown-menu .nav-link {
  display: block;
  padding: 10px 16px;
  white-space: nowrap;
  border-radius: var(--radius-sm);
}

/* Mobile dropdown */
@media (max-width: 768px) {
  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0 16px;
    background: transparent;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    max-height: 400px;
  }

  .nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}

.nav-link {
  position: relative;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(255, 59, 48, 0.06);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--red);
  border-radius: 1px;
  transition: width var(--transition), left var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 60%;
  left: 20%;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  z-index: 1001;
}

.hamburger:hover {
  background: var(--gray-100);
}

[data-theme="dark"] .hamburger:hover {
  background: var(--gray-800);
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero Section ---------- */
.hero {
  min-height: 100vh;
  padding-top: var(--header-height);
  background: var(--hero-gradient);
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  transition: background var(--transition);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(255, 59, 48, 0.04) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(34, 197, 94, 0.04) 0%, transparent 50%);
  pointer-events: none;
  animation: heroGlow 12s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(2%, 2%) rotate(3deg); }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.hero-content {
  padding: 40px 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255, 59, 48, 0.08);
  border: 1px solid rgba(255, 59, 48, 0.15);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--red);
  margin-bottom: 20px;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
}

.hero h1 .highlight {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .btn-primary {
  background: var(--white);
  color: var(--black);
}

[data-theme="dark"] .btn-primary:hover {
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.1);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--text);
  transform: translateY(-2px);
}

/* ---------- 3D Cube ---------- */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  min-height: 400px;
}

.cube-wrapper {
  position: relative;
  animation: floatCube 4s ease-in-out infinite;
}

@keyframes floatCube {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-16px); }
}

.cube {
  width: 180px;
  height: 180px;
  position: relative;
  transform-style: preserve-3d;
  animation: spinCube 12s linear infinite;
}

@keyframes spinCube {
  0% { transform: rotateX(-20deg) rotateY(0deg); }
  100% { transform: rotateX(-20deg) rotateY(360deg); }
}

.cube-face {
  position: absolute;
  width: 180px;
  height: 180px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  backdrop-filter: blur(4px);
  border-radius: 12px;
}

.cube-face::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 59, 48, 0.2), rgba(34, 197, 94, 0.2));
  opacity: 0.6;
}

.cube-face span {
  position: relative;
  z-index: 1;
  font-size: 1.8rem;
}

.cube-face-front  { transform: translateZ(90px); background: rgba(255, 59, 48, 0.15); }
.cube-face-back   { transform: rotateY(180deg) translateZ(90px); background: rgba(34, 197, 94, 0.15); }
.cube-face-right  { transform: rotateY(90deg) translateZ(90px); background: rgba(255, 59, 48, 0.1); }
.cube-face-left   { transform: rotateY(-90deg) translateZ(90px); background: rgba(34, 197, 94, 0.1); }
.cube-face-top    { transform: rotateX(90deg) translateZ(90px); background: rgba(255, 59, 48, 0.12); }
.cube-face-bottom { transform: rotateX(-90deg) translateZ(90px); background: rgba(34, 197, 94, 0.12); }

.cube-glow {
  position: absolute;
  width: 240px;
  height: 240px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 59, 48, 0.12), rgba(34, 197, 94, 0.08), transparent 70%);
  border-radius: 50%;
  filter: blur(30px);
  z-index: -1;
  animation: glowPulse 3s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  0% { opacity: 0.6; transform: translate(-50%, -50%) scale(0.8); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

/* ---------- Settings Button ---------- */
.settings-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: 1.1rem;
  transition: all var(--transition);
  cursor: pointer;
  color: var(--text-secondary);
}

.settings-btn:hover {
  border-color: var(--text-secondary);
  transform: rotate(30deg);
  color: var(--text);
}

/* ---------- Stats Panel ---------- */
.stats-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
  padding: 24px;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}

.stats-card {
  text-align: center;
  padding: 12px 8px;
}

.stats-value {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.stats-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.stats-highlight .stats-value {
  color: var(--red);
}

.stats-highlight-green .stats-value {
  color: var(--green);
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
}

.modal-overlay.open .modal-content {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: 1.1rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--gray-200);
  color: var(--text);
}

[data-theme="dark"] .modal-close:hover {
  background: var(--gray-800);
}

/* Modal Settings Groups */
.settings-group {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.settings-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.settings-group-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
}

.settings-row-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.settings-row-desc {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.settings-input {
  width: 72px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  font-family: var(--font-mono);
  outline: none;
  transition: border-color var(--transition);
}

.settings-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.1);
}

.settings-input-unit {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-left: 6px;
}

.settings-select {
  padding: 8px 32px 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23737373' d='M6 8.825a.5.5 0 0 1-.354-.146l-4-4a.5.5 0 0 1 .708-.708L6 7.617l3.646-3.646a.5.5 0 0 1 .708.708l-4 4A.5.5 0 0 1 6 8.825z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  min-width: 100px;
}

.settings-select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.1);
}

.settings-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ---------- Timer Section ---------- */
.timer-section {
  background: var(--bg);
  transition: background var(--transition);
}

.timer-wrapper {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.timer-mode-selector {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 32px;
  background: var(--bg-alt);
  padding: 5px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.timer-mode-btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.timer-mode-btn:hover {
  color: var(--text);
}

.timer-mode-btn.active {
  background: var(--black);
  color: var(--white);
}

[data-theme="dark"] .timer-mode-btn.active {
  background: var(--white);
  color: var(--black);
}

/* Progress Ring */
.timer-ring-container {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto 28px;
}

.timer-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-ring-bg {
  fill: none;
  stroke: var(--gray-200);
  stroke-width: 6;
}

[data-theme="dark"] .timer-ring-bg {
  stroke: var(--gray-800);
}

.timer-ring-progress {
  fill: none;
  stroke: var(--red);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 753.98;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.5s ease, stroke 0.3s ease;
}

.timer-ring-progress.break-mode {
  stroke: var(--green);
}

.timer-display {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.timer-time {
  font-size: 3.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 4px;
}

.timer-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.timer-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.timer-btn {
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.timer-btn-start {
  background: var(--red);
  color: var(--white);
  min-width: 140px;
  justify-content: center;
}

.timer-btn-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255, 59, 48, 0.3);
}

.timer-btn-start.running {
  background: var(--gray-600);
}

.timer-btn-start.running:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

.timer-btn-secondary {
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 14px 20px;
}

.timer-btn-secondary:hover {
  border-color: var(--text-secondary);
  transform: translateY(-2px);
}

/* Timer extras */
.timer-extras {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.timer-extra-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--gray-300);
  border-radius: 22px;
  transition: var(--transition);
}

[data-theme="dark"] .toggle-slider {
  background: var(--gray-600);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  bottom: 2px;
  background: var(--white);
  border-radius: 50%;
  transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--green);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

/* Theme Toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: 1.1rem;
  transition: all var(--transition);
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--text-secondary);
  transform: rotate(15deg);
}

/* ---------- Content Sections (SEO) ---------- */
.content-section {
  padding: 100px 0;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.content-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.content-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.content-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition);
}

.content-card:hover::before {
  opacity: 1;
}

.content-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

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

.content-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255, 59, 48, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.step-list {
  counter-reset: step;
}

.step-item {
  counter-increment: step;
  display: flex;
  gap: 20px;
  padding: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  transition: all var(--transition);
}

.step-item:hover {
  transform: translateX(4px);
  box-shadow: var(--card-shadow);
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
  font-size: 0.9rem;
}

.step-content h4 {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 6px;
}

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

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  transition: border-color var(--transition);
}

.faq-question {
  width: 100%;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  transition: color var(--transition);
  gap: 16px;
}

.faq-question:hover {
  color: var(--red);
}

.faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition);
  font-size: 1.2rem;
  color: var(--text-secondary);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: var(--red);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-answer-inner {
  padding-bottom: 20px;
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
}

.faq-item.active .faq-answer {
  max-height: 400px;
}

/* ---------- About / Contact / Legal Pages ---------- */
.page-hero {
  padding: 140px 0 60px;
  background: var(--hero-gradient);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: background var(--transition);
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
}

.page-hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.page-content {
  padding: 80px 0;
}

.page-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 40px 0 16px;
  letter-spacing: -0.02em;
}

.page-content h2:first-child {
  margin-top: 0;
}

.page-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 28px 0 12px;
}

.page-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
  font-size: 1rem;
}

.page-content ul,
.page-content ol {
  margin: 16px 0;
  padding-left: 24px;
}

.page-content ul { list-style: disc; }
.page-content ol { list-style: decimal; }

.page-content li {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 8px;
}

.page-content strong {
  color: var(--text);
}

.page-content .highlight-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin: 24px 0;
}

/* Contact Form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.1);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-submit {
  padding: 14px 36px;
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  cursor: pointer;
}

[data-theme="dark"] .form-submit {
  background: var(--white);
  color: var(--black);
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
}

.contact-info-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}

.contact-info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-info-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255, 59, 48, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-info-label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.contact-info-value {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--gray-950);
  color: var(--gray-300);
  padding: 80px 0 0;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  animation: borderGlow 4s ease-in-out infinite alternate;
}

@keyframes borderGlow {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.footer-brand .logo {
  margin-bottom: 16px;
}

.footer-brand .logo-text {
  color: var(--white);
  -webkit-text-fill-color: var(--white);
}

.footer-brand .logo-icon {
  background: var(--accent-gradient);
}

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--gray-400);
  margin-bottom: 20px;
  max-width: 320px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--gray-800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--gray-400);
  transition: all var(--transition);
}

.footer-social-link:hover {
  transform: translateY(-3px);
  border-color: transparent;
}

.footer-social-link:hover .icon-facebook { color: #1877F2; }
.footer-social-link:hover .icon-instagram { color: #E4405F; }
.footer-social-link:hover .icon-x { color: var(--white); }
.footer-social-link:hover .icon-linkedin { color: #0A66C2; }

.footer-social-link:hover[data-social="facebook"] {
  background: rgba(24, 119, 242, 0.12);
  border-color: #1877F2;
  box-shadow: 0 4px 16px rgba(24, 119, 242, 0.2);
}

.footer-social-link:hover[data-social="instagram"] {
  background: rgba(228, 64, 95, 0.12);
  border-color: #E4405F;
  box-shadow: 0 4px 16px rgba(228, 64, 95, 0.2);
}

.footer-social-link:hover[data-social="x"] {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--white);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.1);
}

.footer-social-link:hover[data-social="linkedin"] {
  background: rgba(10, 102, 194, 0.12);
  border-color: #0A66C2;
  box-shadow: 0 4px 16px rgba(10, 102, 194, 0.2);
}

.footer-heading {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--gray-400);
  transition: color var(--transition);
  position: relative;
  display: inline-block;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--white);
  transition: width var(--transition);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-links a:hover::after {
  width: 100%;
}

.footer-newsletter p {
  font-size: 0.9rem;
  color: var(--gray-400);
  margin-bottom: 16px;
  line-height: 1.6;
}

.newsletter-form {
  display: flex;
  gap: 8px;
}

.newsletter-input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-800);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
}

.newsletter-input::placeholder {
  color: var(--gray-500);
}

.newsletter-input:focus {
  border-color: var(--red);
}

.newsletter-btn {
  padding: 12px 20px;
  background: var(--accent-gradient);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition);
  white-space: nowrap;
}

.newsletter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 59, 48, 0.3);
}

.footer-bottom {
  border-top: 1px solid var(--gray-800);
  margin-top: 60px;
  padding: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray-500);
}

/* ---------- Ripple Effect ---------- */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: rippleAnim 0.6s ease-out;
  pointer-events: none;
}

@keyframes rippleAnim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ---------- Responsive ---------- */

/* Tablets */
@media (max-width: 1024px) {
  .hero-grid {
    gap: 40px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .contact-grid {
    gap: 40px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .section {
    padding: 60px 0;
  }

  .content-section {
    padding: 60px 0;
  }

  /* Header */
  .nav-list {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg);
    flex-direction: column;
    padding: 80px 24px 24px;
    border-left: 1px solid var(--border);
    transition: right var(--transition);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.08);
    gap: 4px;
    z-index: 999;
  }

  .nav-list.open {
    right: 0;
  }

  .nav-link {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
  }

  .nav-dropdown-menu .nav-link {
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  .hamburger {
    display: flex;
  }

  /* Hero */
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }

  .hero-content {
    padding: 20px 0;
  }

  .hero p {
    margin: 0 auto 28px;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-visual {
    min-height: 280px;
  }

  .cube {
    width: 140px;
    height: 140px;
  }

  .cube-face {
    width: 140px;
    height: 140px;
  }

  .cube-face-front  { transform: translateZ(70px); }
  .cube-face-back   { transform: rotateY(180deg) translateZ(70px); }
  .cube-face-right  { transform: rotateY(90deg) translateZ(70px); }
  .cube-face-left   { transform: rotateY(-90deg) translateZ(70px); }
  .cube-face-top    { transform: rotateX(90deg) translateZ(70px); }
  .cube-face-bottom { transform: rotateX(-90deg) translateZ(70px); }

  /* Stats */
  .stats-panel {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 16px;
  }

  .stats-value {
    font-size: 1.2rem;
  }

  .stats-label {
    font-size: 0.65rem;
  }

  .modal-content {
    padding: 24px;
  }

  /* Timer */
  .timer-ring-container {
    width: 240px;
    height: 240px;
  }

  .timer-time {
    font-size: 2.8rem;
  }

  .timer-controls {
    gap: 8px;
  }

  .timer-btn {
    padding: 12px 24px;
    font-size: 0.85rem;
  }

  /* Content */
  .content-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .content-card {
    padding: 24px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .timer-ring-container {
    width: 200px;
    height: 200px;
  }

  .timer-time {
    font-size: 2.2rem;
  }

  .timer-mode-btn {
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .timer-extras {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .stats-panel {
    grid-template-columns: repeat(2, 1fr);
  }

  .newsletter-form {
    flex-direction: column;
  }
}

/* Ultra-wide */
@media (min-width: 1600px) {
  .hero h1 {
    font-size: 3.8rem;
  }
}

/* ---------- Accessibility: Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header { position: static; }
  .hero { min-height: auto; padding: 60px 0; }
  .hero-visual { display: none; }
  .site-footer { break-inside: avoid; }
  .hamburger { display: none; }
}
