:root {
  --bg-color: #121212;
  --card-bg: #1e1e1e;
  --text-primary: #ffffff;
  --text-secondary: #aaaaaa;
  --accent-green: #00ff66;
  --chip-bg: #2c2c2c;
  --chip-active: #ffffff;
  --chip-text-inactive: #aaaaaa;
  --chip-text-active: #000000;
}

* {
  cursor: none !important;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
  cursor: none; /* Hide default cursor */
}

@media (max-width: 1024px) {
  body {
    cursor: auto; /* Restore default cursor on tablet/mobile */
  }
  .custom-cursor {
    display: none !important;
  }
}

/* Custom Cursor */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  background-color: var(--accent-green);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 10002; /* Ensure above modal (10001) */
  mix-blend-mode: difference; /* Cool effect over text/bg */
  transition:
    transform 0.1s ease,
    width 0.2s,
    height 0.2s;
  box-shadow: 0 0 10px var(--accent-green);
}

/* Hover effect state (triggered by JS) */
.custom-cursor.hovered {
  width: 50px;
  height: 50px;
  opacity: 0.5;
}

.container {
  text-align: center;
  width: 90%;
  max-width: 680px;
}

/* Chips */
.chips {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.chip {
  background-color: var(--chip-bg);
  color: var(--chip-text-inactive);
  border: none;
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.chip:hover {
  background-color: #333;
}

.chip.active {
  background-color: var(--chip-active);
  color: var(--chip-text-active);
  transform: scale(1.05);
}

/* Content */
.content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 30px;
  color: var(--text-primary);
}

#date-display {
  font-family: "Courier New", Courier, monospace;
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-top: -20px;
  margin-bottom: 30px;
}

/* Progress Bar */
.progress-container {
  background-color: #333;
  height: 40px;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.progress-bar {
  background-color: var(--accent-green);
  height: 100%;
  width: 0%; /* JS will animate this */
  /* transition: width 0.5s ease-out;  <-- Removed for JS smooth animation */
  box-shadow: 0 0 10px var(--accent-green);
}

/* Settings Button */
.settings-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  z-index: 100;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.settings-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  transform: rotate(90deg);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10001; /* Above cursor */
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.3s ease,
    visibility 0.3s;
}

.modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal {
  background-color: var(--card-bg);
  padding: 24px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  transform: scale(1);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid #333;
}

.modal-overlay.hidden .modal {
  transform: scale(0.9);
}

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

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.close-btn:hover {
  color: var(--text-primary);
}

.setting-item {
  margin-bottom: 24px;
}

.setting-item label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

input[type="number"] {
  background-color: #2c2c2c;
  border: 1px solid #444;
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  width: 80px;
}

.input-hint {
  font-size: 0.85rem;
  color: #666;
}

.color-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s;
}

.color-swatch:hover {
  transform: scale(1.1);
}

.color-swatch.active {
  border-color: #fff;
  transform: scale(1.1);
}

.custom-color-wrapper {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #555;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #2c2c2c;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.2s,
    border-color 0.2s;
}

.custom-color-wrapper:hover {
  transform: scale(1.1);
  border-color: #fff;
}

.custom-color-wrapper svg {
  pointer-events: none;
  opacity: 0.8;
}

#custom-color-picker {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  padding: 0;
  border: none;
}

.countdown {
  font-size: clamp(1rem, 4vw, 2.5rem);
  font-weight: 600;
  color: var(--accent-green);
  text-shadow: 0 0 10px var(--accent-green);
  width: 100%;
}
