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

body {
  font-family: "Share Tech Mono", monospace;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #38bdf8;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 0;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.header-inner {
  width: 100%;
  max-width: 1200px;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.breadcrumb {
  width: 100%;
  padding: 0;
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  width: fit-content;
  margin: 0;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  color: rgba(56, 189, 248, 0.7);
  font-size: 0.9rem;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  color: rgba(56, 189, 248, 0.4);
}

.breadcrumb a {
  color: #38bdf8;
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: #0ea5e9;
}

.breadcrumb li[aria-current="page"] {
  color: #38bdf8;
}

.logo {
  font-size: 1.5rem;
  color: #38bdf8;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
}

.logo-icon {
  height: 1em; /* Match the font height of the logo text */
  vertical-align: middle; /* Vertically align with the text */
}

.logo:hover {
  color: #0ea5e9;
}

.container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 6rem auto 0;
  min-height: 100vh;
}

.container h1 {
  width: 100%;
  text-align: center;
  color: #38bdf8;
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.container > p {
  width: 100%;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.container > h2 {
  color: #38bdf8;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.timer-display {
  width: 100%;
  text-align: center;
  margin-bottom: 0;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

#fullscreenBtn {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.timer {
  font-size: 10rem;
  font-weight: bold;
  color: #38bdf8;
  line-height: 1;
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
  word-break: break-all;
  max-width: 100vw;
  display: inline-block;
  text-align: center;
}
.timer-main {
  display: block;
  font-size: 1em;
  line-height: 1.1;
}
.timer-ms {
  display: block;
  font-size: 0.28em;
  color: #7dd3fc;
  margin-top: 0.1em;
  letter-spacing: 0.1em;
}
@media (max-width: 1200px) {
  .timer {
    font-size: 6rem;
  }
}
@media (max-width: 768px) {
  .timer {
    font-size: 2.7rem;
  }
  .timer-ms {
    font-size: 0.32em;
  }
}
@media (max-width: 480px) {
  .timer {
    font-size: 1rem;
    max-width: 99vw;
    white-space: nowrap;
    padding: 0;
    margin-bottom: 1rem;
  }
  .timer-main {
    font-size: 1em;
    letter-spacing: 0.01em;
    line-height: 1.05;
  }
  .timer-ms {
    font-size: 0.38em;
  }
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: rgba(56, 189, 248, 0.1);
  border-radius: 6px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.progress {
  width: 100%;
  height: 100%;
  background: #38bdf8;
  transform-origin: left;
  transition: transform 0.1s linear;
}

.controls {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.btn {
  font-family: "Share Tech Mono", monospace;
  font-size: 1.5rem;
  padding: 1rem 3rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.start {
  background: #38bdf8;
  color: #0f172a;
}

.start:hover {
  background: #0ea5e9;
  transform: translateY(-2px);
}

.start.pause {
  background: #f59e0b;
}

.reset {
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  border: 2px solid #38bdf8;
}

.reset:hover {
  background: rgba(56, 189, 248, 0.2);
  transform: translateY(-2px);
}

.message {
  margin-top: 2rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.5rem;
}

.footer {
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  padding: 1.5rem 0;
  margin-top: auto;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

.footer h2 {
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

.timer-categories {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  margin: 2rem 0;
  width: 100%;
  padding-top: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.timer-categories h2 {
  width: 100%;
  text-align: center;
  color: #38bdf8;
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.timer-categories p {
  width: 100%;
  text-align: center;
  color: #38bdf8;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.timer-category {
  flex: 1;
  min-width: 280px;
  max-width: 380px;
}

.timer-category h2 {
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 1rem;
  text-align: center;
  padding: 0 0.5rem;
}

.timer-category h3 {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  text-align: center;
}

.timer-options {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  transition: all 0.3s ease;
  overflow: hidden;
  padding: 0 15px;
}

.timer-option {
  margin: 10px 0;
  width: 100%;
  background: rgba(56, 189, 248, 0.1);
  border-radius: 8px;
  padding: 0.75rem 0.5rem;
  transition: all 0.3s ease;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.timer-option:hover {
  background: rgba(56, 189, 248, 0.2);
  transform: translateY(-2px);
}

.timer-option a {
  text-decoration: none;
  color: inherit;
  display: block;
  width: 100%;
  text-align: center;
}

.timer-option .time {
  font-size: 1.4rem;
  color: #38bdf8;
  margin-bottom: 0.25rem;
  display: block;
}

.timer-option .label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.2;
  margin: 0;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: #38bdf8;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #0ea5e9;
}

.copyright {
  color: rgba(255, 255, 255, 0.5);
}

/* Alarm Popup Styles */
.alarm-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.alarm-popup-content {
  background: #1e293b;
  color: #38bdf8;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.3);
  max-width: 90%;
  width: 400px;
}

.alarm-popup-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #fff;
}

.alarm-popup-content p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.alarm-popup-content .btn.close-popup {
  background: #38bdf8;
  color: #0f172a;
  padding: 0.8rem 2rem;
  font-size: 1.2rem;
  border-radius: 8px;
}

.alarm-popup-content .btn.close-popup:hover {
  background: #0ea5e9;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .container {
    margin-top: 8rem;
  }

  .timer-display {
    min-height: 60vh;
  }

  .timer-options {
    width: 100%;
    align-items: center;
  }

  .timer-option {
    width: 100%;
    max-width: 250px;
  }

  .message {
    font-size: 1.2rem;
  }

  .timer-categories {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .timer-category {
    width: 100%;
    max-width: 300px;
  }

  .btn {
    font-size: 1.2rem;
    padding: 0.8rem 2rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }

  .container h1 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .timer {
    font-size: 5rem;
  }

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

  .btn {
    width: 100%;
  }

  #fullscreenBtn {
    top: 0;
    right: 0;
    width: 28px;
    height: 28px;
    padding: 2px;
  }

  #fullscreenBtn svg {
    width: 18px;
    height: 18px;
  }
}

.scroll-arrow {
  display: flex;
  justify-content: center;
  margin: 20px 0;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.scroll-arrow:hover {
  transform: translateY(5px);
}

.scroll-arrow svg {
  color: #666;
  transition: color 0.3s ease;
}

.scroll-arrow:hover svg {
  color: #333;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 10px;
  transition: background-color 0.3s ease;
}

.category-header:hover {
  background-color: #e9ecef;
}

.category-header h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #333;
  text-align: center;
  flex-grow: 1;
}

.toggle-icon {
  width: 20px;
  height: 20px;
  color: #666;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
}

.category-header:hover .toggle-icon {
  color: #333;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

.modal-content {
  background: #1e293b;
  color: #38bdf8;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.3);
  max-width: 90vw;
  width: 400px;
  position: relative;
  margin: auto;
}

.modal-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #fff;
}

.modal-content label {
  display: block;
  margin: 1rem 0 0.5rem 0;
  color: #38bdf8;
  font-size: 1.1rem;
}

.modal-content input[type="number"] {
  width: 50px;
  padding: 0.4rem;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #38bdf8;
  background: #0f172a;
  color: #38bdf8;
  margin-left: 0.5rem;
}

.modal-content select {
  width: 60%;
  padding: 0.3rem 0.5rem;
  font-size: 0.95rem;
  border-radius: 6px;
  border: 1px solid #38bdf8;
  background: #0f172a;
  color: #38bdf8;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  min-width: 120px;
  max-width: 200px;
}

.modal-content .btn.save {
  margin-top: 1.5rem;
  background: #38bdf8;
  color: #0f172a;
  padding: 0.8rem 2rem;
  font-size: 1.2rem;
  border-radius: 8px;
}

.modal-content .btn.save:hover {
  background: #0ea5e9;
  transform: translateY(-2px);
}

.close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 2rem;
  color: #38bdf8;
  cursor: pointer;
  background: none;
  border: none;
}

@media (max-width: 480px) {
  .modal-content {
    width: 95vw;
    padding: 1rem;
  }
  .modal-content input[type="number"] {
    width: 32px;
    font-size: 0.9rem;
  }
}
