* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #101827, #1f2937);
  color: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.dashboard {
  width: min(1200px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card {
  background: rgba(17, 24, 39, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.header {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.timer-card {
  grid-column: 1 / 2;
}

.notes-section {
  grid-column: 2 / 3;
}

.notes-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.notes-controls button {
  padding: 6px 12px;
  font-size: 16px;
  cursor: pointer;
}

#notes {
  font-size: 18px;
  line-height: 1.5;
}

.player-section {
  grid-column: 1 / -1;
}

h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  margin-bottom: 8px;
}

h2 {
  margin-bottom: 14px;
  font-size: 1.4rem;
}

.subtitle {
  color: #cbd5e1;
  font-size: 1.05rem;
}

.clock {
  text-align: right;
}

.clock .label {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

#currentTime {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 1px;
}

#currentDate {
  color: #cbd5e1;
  margin-top: 6px;
}

.timer-display {
  text-align: center;
  margin: 28px 0;
}

#modeLabel {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: #2563eb;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: 0.5px;
}

#timer {
  font-size: clamp(4.5rem, 11vw, 9rem);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.progress-wrap {
  width: 100%;
  height: 16px;
  background: #374151;
  border-radius: 999px;
  overflow: hidden;
  margin: 24px 0;
}

#progressBar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #22c55e, #eab308, #ef4444);
  transition: width 0.4s ease;
}

.controls,
.presets,
.custom-time {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 18px;
}

button,
input {
  border: none;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 1rem;
}

button {
  cursor: pointer;
  font-weight: 700;
  color: #0f172a;
  background: #e5e7eb;
  transition: transform 0.1s ease, opacity 0.1s ease;
}

button:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.start {
  background: #22c55e;
}

.pause {
  background: #f59e0b;
}

.reset {
  background: #ef4444;
  color: white;
}

.preset {
  background: #60a5fa;
}

.break {
  background: #a78bfa;
}

.fullscreen-btn {
  margin-top: 16px;
  width: 100%;
  background: #38bdf8;
}

input {
  background: #111827;
  color: white;
  border: 1px solid #374151;
  width: 110px;
  text-align: center;
}

.youtube-form {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.youtube-form input {
  flex: 1;
  width: auto;
  text-align: left;
}

iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 18px;
  background: #020617;
}

textarea {
  width: 100%;
  min-height: 420px;
  resize: vertical;
  border-radius: 18px;
  border: 1px solid #374151;
  background: #111827;
  color: white;
  padding: 16px;
  font-size: 1rem;
  line-height: 1.5;
}

.hint {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-top: 10px;
}

.alert {
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  from {
    background: linear-gradient(135deg, #7f1d1d, #111827);
  }

  to {
    background: linear-gradient(135deg, #dc2626, #111827);
  }
}

@media (max-width: 850px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .header,
  .timer-card,
  .notes-section,
  .player-section {
    grid-column: 1 / -1;
  }

  .header {
    flex-direction: column;
    text-align: center;
  }

  .clock {
    text-align: center;
  }

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

  textarea {
    min-height: 260px;
  }
}
