@import url(../fonts/quicksand-woff/stylesheet.css);
@import url(../fonts/jetbrains-mono/stylesheet.css);
:root {
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-color: #1e293b;
  --text-muted: #64748b;
  --accent-color: #3b82f6;
  --accent-hover: #2563eb;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3),
      0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3),
      0 4px 6px -4px rgb(0 0 0 / 0.3);
  }
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Quicksand", sans-serif;
  background: linear-gradient(135deg, var(--bg-color) 0%, #e2e8f0 100%);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
}
@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(135deg, var(--bg-color) 0%, #1e293b 100%);
  }
}

header {
  text-align: center;
  margin-bottom: 3rem;
}
header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-color), var(--success-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}
header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 500;
}

.timer-container {
  background: var(--card-bg);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 480px;
  transition: transform 0.2s ease;
}
.timer-container:hover {
  transform: translateY(-2px);
}
.timer-container .input-section {
  margin-bottom: 1.5rem;
}
.timer-container .input-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--text-muted);
}
.timer-container .input-section input[type=number]::-webkit-inner-spin-button, .timer-container .input-section input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
}
.timer-container .input-section .inputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.timer-container .input-section .inputs .input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.timer-container .input-section .inputs .input-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.timer-container .input-section .inputs .input-group .limit {
  margin-top: 3px;
  color: var(--text-muted);
  font-weight: 600;
}
.timer-container .input-section .inputs .input-group .limit span {
  margin: 0 2px;
}
.timer-container .input-section .inputs .input-group .limit.error {
  color: var(--danger-color);
}
.timer-container .input-section .inputs .input-group input {
  width: 100%;
  padding: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--text-color);
  transition: all 0.2s ease;
}
.timer-container .input-section .inputs .input-group input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.timer-container .timer-display {
  text-align: center;
  margin: 2rem 0;
  padding: 2rem;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border-radius: 16px;
  border: 1px solid var(--border-color);
}
@media (prefers-color-scheme: dark) {
  .timer-container .timer-display {
    background: linear-gradient(135deg, #0f172a, #1e293b);
  }
}
.timer-container .timer-display .time {
  font-family: "JetBrains Mono", monospace;
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--accent-color);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  animation: pulse 2s infinite;
}
.timer-container .controls {
  position: relative;
  display: flex;
  gap: 1rem;
  justify-content: center;
}
.timer-container .controls button {
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  font-family: "Quicksand", sans-serif;
  letter-spacing: 0.5px;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 100px;
  justify-content: center;
}
.timer-container .controls button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.timer-container .controls button:active {
  transform: translateY(0);
}
.timer-container .controls #startBtn {
  background: linear-gradient(135deg, var(--success-color), #059669);
  color: white;
}
.timer-container .controls #pauseBtn {
  background: linear-gradient(135deg, var(--warning-color), #d97706);
  color: white;
}
.timer-container .controls #resetBtn {
  background: linear-gradient(135deg, var(--danger-color), #dc2626);
  color: white;
}
.timer-container .quote-section {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(16, 185, 129, 0.05));
  border: 1px solid rgba(59, 130, 246, 0.1);
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  transition: opacity 0.6s ease, max-height 0.6s ease, padding-top 0.6s ease, padding-bottom 0.6s ease;
}
.timer-container .quote-section::before, .timer-container .quote-section::after {
  font-size: 3rem;
  color: var(--accent-color);
  opacity: 0.3;
  font-family: Georgia, serif;
}
.timer-container .quote-section::before {
  content: '"';
  position: absolute;
  top: 0.5rem;
  left: 1rem;
}
.timer-container .quote-section::after {
  content: '"';
  position: absolute;
  bottom: -1rem;
  right: 0.8rem;
}
.timer-container .quote-section .quote-text {
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 80%;
  color: var(--text-muted);
  font-style: italic;
}
.timer-container .quote-section .author {
  font-weight: 600;
}
.timer-container .quote-section.visible {
  opacity: 1;
  visibility: visible;
  max-height: 200px;
  padding-top: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 2.5rem;
}
.timer-container audio {
  display: none;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}
@media (max-width: 640px) {
  .timer-container {
    padding: 1rem;
    margin: 0 1rem;
  }
  header h1 {
    font-size: 2rem;
  }
  .timer-display .time {
    font-size: 3rem !important;
  }
  .controls {
    flex-direction: column;
  }
  .controls button {
    width: 100%;
  }
  .inputs {
    gap: 0.75rem;
  }
}
@media (max-width: 576px) {
  .timer-display .time {
    font-size: 2.75rem !important;
  }
}
@media (max-width: 430px) {
  .limit {
    display: flex;
    flex-direction: column;
  }
}
.swal2-popup {
  font-family: "Inter", sans-serif !important;
  border-radius: 24px !important;
  padding: 2.5rem !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-lg) !important;
  background: var(--card-bg) !important;
  color: var(--text-color) !important;
  max-width: 400px !important;
}

.swal2-title {
  font-weight: 600 !important;
  font-size: 1.5rem !important;
  background: linear-gradient(135deg, var(--accent-color), var(--success-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem !important;
  text-align: center;
}

.swal2-content {
  font-size: 1.1rem !important;
  color: var(--text-muted) !important;
  margin-bottom: 1.5rem !important;
  text-align: center;
}

.swal2-actions {
  justify-content: center !important;
  gap: 1rem !important;
}

.swal2-confirm {
  background: linear-gradient(135deg, var(--success-color), #059669) !important;
  color: white !important;
  font-weight: 500 !important;
  padding: 0.75rem 2rem !important;
  font-size: 1rem !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow-md) !important;
  border: none !important;
  cursor: pointer !important;
  transition: background-color 0.2s ease !important;
}

.swal2-confirm:hover {
  background: linear-gradient(135deg, #059669, var(--success-color)) !important;
}

.swal2-cancel {
  background: linear-gradient(135deg, var(--danger-color), #dc2626) !important;
  color: white !important;
  font-weight: 500 !important;
  padding: 0.75rem 2rem !important;
  font-size: 1rem !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow-md) !important;
  border: none !important;
  cursor: pointer !important;
  transition: background-color 0.2s ease !important;
}

.swal2-cancel:hover {
  background: linear-gradient(135deg, #dc2626, var(--danger-color)) !important;
}

@media (prefers-color-scheme: dark) {
  .swal2-popup {
    background: var(--card-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
    box-shadow: var(--shadow-lg) !important;
  }
  .swal2-content {
    color: var(--text-muted) !important;
  }
}