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

body {
  font-family: 'Courier New', Courier, monospace;
  background: #050508;
  color: #e0d0c0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

.bg-layer img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 2s ease;
}

.bg-layer img.active {
  opacity: 0.2;
}

.main-content {
  position: relative;
  z-index: 1;
  padding: 2rem 3rem;
  max-width: 780px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #cc3333;
  text-shadow: 0 0 20px rgba(200, 40, 40, 0.4), 0 0 60px rgba(200, 40, 40, 0.1);
  margin-bottom: 0.3rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  animation: flicker 3s infinite;
}

@keyframes flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: 0.6; }
}

.subtitle {
  color: rgba(220, 180, 160, 0.8);
  font-size: 1.3rem;
  margin-bottom: 2rem;
  letter-spacing: 2px;
}

.timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.time-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.time-value {
  font-size: 5rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 6px;
  line-height: 1.1;
  color: #ff3333;
  text-shadow: 0 0 20px rgba(255, 30, 30, 0.5), 0 0 60px rgba(255, 0, 0, 0.15);
}

.time-label {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: rgba(220, 180, 160, 0.6);
  margin-top: 0.2rem;
}

.separator {
  font-size: 4rem;
  font-weight: 300;
  color: rgba(220, 80, 80, 0.4);
  margin-bottom: 0.5rem;
}

.times-up {
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(90deg, #ff4444, #ff6b6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pulse 1.5s ease-in-out infinite;
  letter-spacing: 4px;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.progress-section {
  margin-bottom: 1.2rem;
  width: 100%;
  max-width: 500px;
}

.progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.3rem;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: #cc3333;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(200, 40, 40, 0.4);
  transition: width 1s ease;
}

.progress-text {
  font-size: 1rem;
  color: rgba(220, 180, 160, 0.6);
  letter-spacing: 1px;
}

.reminder {
  font-size: 1.2rem;
  color: rgba(230, 180, 130, 0.85);
  margin-bottom: 0.7rem;
  font-weight: 500;
  letter-spacing: 1px;
  min-height: 1.2rem;
}

.quotes-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
}

.quote-box {
  padding: 0.8rem 1rem;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
}

#motivationalText {
  font-size: 1.3rem;
  font-weight: 600;
  color: rgba(220, 200, 190, 0.9);
  margin-bottom: 0.4rem;
  line-height: 1.5;
  letter-spacing: 0.5px;
}

#motivationalAuthor {
  font-size: 1rem;
  color: rgba(220, 160, 140, 0.7);
  letter-spacing: 1px;
}

.quote-lang {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: rgba(230, 160, 130, 0.7);
  margin-bottom: 0.3rem;
}

#quoteText {
  font-size: 1.2rem;
  font-style: italic;
  color: rgba(200, 180, 170, 0.75);
  margin-bottom: 0.3rem;
  line-height: 1.6;
}

#quoteAuthor {
  font-size: 0.95rem;
  color: rgba(220, 180, 160, 0.55);
  letter-spacing: 0.5px;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.overlay.hidden {
  display: none;
}

.overlay-content {
  background: rgba(30, 27, 58, 0.95);
  border-radius: 20px;
  padding: 2rem;
  max-width: 420px;
  width: 90%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.overlay-content h2 {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.overlay-content p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1rem;
}

#dailyNote {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 0.8rem;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 1rem;
  outline: none;
}

#dailyNote:focus {
  border-color: #f7971e;
}

.btn {
  background: linear-gradient(90deg, #f7971e, #ffd200);
  color: #1a1a2e;
  border: none;
  padding: 0.7rem 1.8rem;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(247, 151, 30, 0.4);
}

@media (min-width: 1600px) {
  .main-content { max-width: 900px; padding: 3rem 4rem; }
  .title { font-size: 3rem; }
  .subtitle { font-size: 1.5rem; }
  .time-value { font-size: 6rem; }
  .time-label { font-size: 1.1rem; }
  .separator { font-size: 5rem; }
  .timer { gap: 1.2rem; }
  #motivationalText { font-size: 1.6rem; }
  #quoteText { font-size: 1.5rem; }
}

@media (max-width: 1024px) {
  .main-content { max-width: 90vw; padding: 2rem; }
  .time-value { font-size: 4rem; }
  .title { font-size: 2rem; }
}

@media (max-width: 768px) {
  .main-content { padding: 1.5rem; max-width: 95vw; }
  .title { font-size: 1.6rem; }
  .time-value { font-size: 3rem; }
  .time-label { font-size: 0.75rem; }
  .separator { font-size: 2.5rem; }
  .timer { gap: 0.4rem; }
  #motivationalText { font-size: 1.1rem; }
  #quoteText { font-size: 1rem; }
}

@media (max-width: 480px) {
  .main-content { padding: 1rem; }
  .title { font-size: 1.2rem; letter-spacing: 2px; }
  .subtitle { font-size: 0.9rem; }
  .time-value { font-size: 2.2rem; letter-spacing: 3px; }
  .time-label { font-size: 0.6rem; letter-spacing: 2px; }
  .separator { font-size: 1.8rem; }
  .timer { gap: 0.25rem; }
  #motivationalText { font-size: 0.9rem; }
  #quoteText { font-size: 0.85rem; }
  .quote-box { padding: 0.4rem 0.5rem; }
  .reminder { font-size: 0.9rem; }
  .progress-section { max-width: 100%; }
}
