@font-face {
  font-family: 'Martian Mono';
  font-display: swap;
  src: url('/assets/fonts/MartianMonoVF.woff2') format('woff2');
  font-weight: 100 1000;
  font-stretch: 75% 200%;
}

:root {
  --text-color: #ffffff;
  --background-color: #000000;
  --layer-color: #222222;
  --elevated-color: #333333;
  --accent-color: #ffffff;
}

:root[data-theme="red"] {
  --text-color: #DCDCDC;
  --background-color: #1B1B1B;
  --layer-color: #331F1E;
  --elevated-color: #333333;
  --accent-color: #ED313B;
}

:root[data-theme="blue"] {
  --text-color: #DCDCDC;
  --background-color: #1B1B1B;
  --layer-color: #1E3333;
  --elevated-color: #333333;
  --accent-color: #3B7AED;
}

:root[data-theme="green"] {
  --text-color: #DCDCDC;
  --background-color: #1B1B1B;
  --layer-color: #1E3322;
  --elevated-color: #333333;
  --accent-color: #3BED5E;
}

:root[data-theme="purple"] {
  --text-color: #DCDCDC;
  --background-color: #1B1B1B;
  --layer-color: #331E33;
  --elevated-color: #333333;
  --accent-color: #9B3BED;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Martian Mono', monospace;
  line-height: 1.5;
  color: var(--text-color);
  background-color: var(--background-color);
  user-select: none;
  -webkit-user-select: none;
  /* cursor: default; */
}

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

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

ul,
ol,
li {
  list-style: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
}

textarea {
  resize: vertical;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
}

.logo {
  line-height: 0;
}

nav {
  display: flex;
  gap: 2px;
  background-color: var(--layer-color);
  padding: 2px;
  border-radius: 10px;
  border: 1px solid var(--background-color);
}

.tab-button {
  line-height: 0;
  background-color: var(--layer-color);
  padding: 5px 10px;
  border-radius: 8px;
}

.tab-button-text {
  font-size: 13px;
  line-height: 100%;
  padding: 8px 12px 10px;
  font-weight: 300;
}

.tab-button-active {
  background-color: var(--elevated-color);
  font-weight: 500;
  cursor: default;
}

section {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  transition: opacity 0.2s ease-out;
}

section.active {
  display: flex;
  animation: tabFadeIn 0.25s ease-out;
}

/* Tab switch animation */
@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.timer {
  margin-bottom: 20px;
}

.time {
  font-size: 50px;
  font-weight: 350;
  font-stretch: 110%;
}

.session-buttons {
  display: flex;
  gap: 1px;
  margin-bottom: 24px;
}

.session-button {
  font-size: 14px;
  background-color: var(--layer-color);
  color: var(--accent-color);
  padding: 10px 12px;
  font-weight: 400;
  font-stretch: 110%;
  width: 85px;
  transition: transform 0.1s ease-out;
}

.session-button:first-child {
  border-radius: 10px 0 0 10px;
}

.session-button:last-child {
  border-radius: 0 10px 10px 0;
}

.session-button:hover {
  opacity: 0.8;
}

.session-button:active {
  transform: scale(0.9);
}

.control-buttons {
  display: flex;
  flex-direction: row;
  gap: 0px;
  margin-bottom: 24px;
}

.control-button {
  font-size: 13px;
  border: 2px solid var(--layer-color);
  padding: 8px 28px;
  font-weight: 500;
  font-stretch: 95%;
  height: 62px;
  line-height: 0;
  transition: transform 0.1s ease-out;
}

.control-button:first-child {
  border-radius: 10px 0 0 10px;
  border-right: none;
}

.control-button:last-child {
  border-radius: 0 10px 10px 0;
  border-left: none;
}

.control-button:hover {
  opacity: 0.8;
}

.control-button:active {
  transform: scale(0.9);
}

/* Hidden class for toggling visibility */
.hidden {
  display: none !important;
}

/* Animation classes */
.session-buttons.animating-out {
  animation: fadeOut 0.3s ease-out forwards;
}

.session-buttons.animating-in {
  animation: fadeInZoom 0.3s ease-out forwards;
}

.session-buttons.hidden {
  display: none;
}

.control-buttons.animating-in {
  display: flex;
  animation: fadeInZoom 0.3s ease-out forwards;
}

.control-buttons.animating-out {
  animation: fadeOut 0.3s ease-out forwards;
}

.control-buttons.hidden {
  display: none;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

@keyframes fadeInZoom {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rotateFade {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(-360deg);
  }
}

.rotate-icon {
  animation: rotateFade 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.stats {
  max-width: 350px;
  margin: 32px 0;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  gap: 200px;
  font-size: 14px;
  font-weight: 300;
  padding: 8px 0 6px 0;
  border-bottom: 1px dashed #333;
}

.settings-heading {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.settings-group {
  max-width: 350px;
  margin-bottom: 12px;
  background-color: var(--layer-color);
  padding: 12px 16px 16px;
  border-radius: 20px;
  width: 100%;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 300;
  padding: 0 0 12px 0;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.setting-item:last-child {
  padding-bottom: 2px;
}

.setting-label {
  font-size: 13px;
  flex: 1;
  color: var(--text-color);
  opacity: 0.8;
}

.setting-item:hover .setting-label {
  opacity: 1;
}

/* switch */
.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #444;
  transition: .2s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: #444;
  transition: .2s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: #444;
}

input:checked+.slider:before {
  transform: translateX(16px);
  background-color: var(--accent-color);
}

/* Theme options */
.theme-options {
  display: flex;
  gap: 8px;
}

.theme-circle {
  width: 32px;
  height: 32px;
  border-radius: 30%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-circle:hover {
  /* transform: scale(0.9); */
  opacity: 0.8;
  /* box-shadow: 0 0 0 2px var(--layer-color), 0 0 0 4px #fff; */
}

.theme-circle-active {
  /* border-color: #fff; */
  box-shadow: 0 0 0 2px var(--layer-color), 0 0 0 4px #fff;
}

/* Email input */
input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #444;
  border-radius: 8px;
  background-color: #222;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 12px;
}

input[type="email"]:focus {
  border-color: var(--text-color);
}

input[type="email"]::placeholder {
  color: #666;
}

/* Submit button */
.submit-button {
  width: 100%;
  padding: 10px 12px;
  background-color: var(--text-color);
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}

.submit-button:hover {
  opacity: 0.8;
}

.submit-button:active {
  transform: scale(0.98);
}

/* Notification animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -20px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  to {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
}