/* Tool Specific Styling */
.tool-container {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.tool-title-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
}

.tool-headline {
  font-size: 1.75rem;
  font-weight: 800;
}

.tool-sub {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

/* Time tool specific classes */
.local-clock-card {
  background: linear-gradient(135deg, var(--bg-tertiary), var(--card-glow));
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

.time-display {
  font-size: 4rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1;
}

.date-display {
  font-size: 1.15rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.timezone-display {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* World time selector grid */
.world-time-section {
  margin-top: 2rem;
}

.search-input-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.search-input {
  width: 100%;
  padding: 0.95rem 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--card-glow);
  background-color: var(--bg-secondary);
}

.world-clocks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.world-clock-card {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  position: relative;
}

.world-clock-card:hover {
  border-color: var(--accent);
  background-color: var(--bg-secondary);
  box-shadow: var(--shadow);
}

.world-city {
  font-weight: 700;
  font-size: 1.1rem;
}

.world-country {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.world-time {
  font-size: 1.75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.world-offset {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 0.25rem;
}

.remove-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-radius: 4px;
}

.world-clock-card:hover .remove-btn {
  opacity: 1;
}

.remove-btn:hover {
  background-color: #fee2e2;
  color: #ef4444;
}

[data-theme="medium"] .remove-btn:hover,
[data-theme="dark"] .remove-btn:hover {
  background-color: #7f1d1d;
  color: #fca5a5;
}

/* Suggestion box */
.suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-top: 0.5rem;
  max-height: 250px;
  overflow-y: auto;
  z-index: 10;
  box-shadow: var(--shadow-lg);
}

.suggestion-item {
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  transition: var(--transition);
}

.suggestion-item:hover {
  background-color: var(--bg-tertiary);
  color: var(--accent);
}

.suggestion-timezone {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Countdown Form Layouts */
.countdown-creator-card {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 1rem;
  align-items: end;
}

@media (max-width: 768px) {
  .form-row,
  .tool-container [style*="display: grid"] {
    grid-template-columns: 1fr !important;
  }
  .btn-primary {
    width: 100%;
  }
  .form-input {
    width: 100%;
  }
  .time-display {
    font-size: 2.75rem;
  }
  .countdown-grid {
    grid-template-columns: 1fr !important;
  }
  #planner-grid {
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }
  .planner-row {
    min-width: 550px;
  }

  /* Loan & Mortgage Calculator */
  .loan-summary-grid {
    grid-template-columns: 1fr !important;
  }
  .loan-grid {
    grid-template-columns: 1fr !important;
  }
  .extra-fields {
    grid-template-columns: 1fr !important;
  }
  .amort-wrapper {
    overflow-x: auto !important;
    overflow-y: auto !important;
  }
  .amort-table {
    min-width: 480px !important;
    font-size: 0.78rem !important;
  }
  .amort-table td,
  .amort-table th {
    padding: 0.5rem 0.6rem !important;
  }
}

.input-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--accent);
}

.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: var(--transition);
  height: 44px;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

/* Countdown Grid */
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.countdown-card {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.countdown-card:hover {
  border-color: var(--accent);
  background-color: var(--bg-secondary);
  box-shadow: var(--shadow);
}

.countdown-card-header {
  margin-bottom: 1rem;
}

.countdown-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-right: 1.5rem;
}

.countdown-target {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.countdown-numbers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  text-align: center;
  margin: 1rem 0;
}

.countdown-num-box {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 0.25rem;
}

.countdown-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 0.25rem;
}

.countdown-card-footer {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  text-align: right;
  margin-top: 0.5rem;
}

/* Percentage Calculator Layouts */
.calc-card {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.calc-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.calc-input-small {
  width: 90px;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 1.05rem;
  text-align: center;
  outline: none;
  transition: var(--transition);
  font-variant-numeric: tabular-nums;
}

.calc-input-small:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--card-glow);
}

.calc-result-box {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
  min-width: 100px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  display: inline-block;
}

.calc-result-box.error {
  color: #ef4444;
  font-size: 0.9rem;
}

/* Word Counter Layouts */
.counter-textarea-wrapper {
  margin-bottom: 2rem;
}

.counter-textarea {
  width: 100%;
  height: 250px;
  padding: 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 1.05rem;
  line-height: 1.6;
  outline: none;
  resize: vertical;
  transition: var(--transition);
}

.counter-textarea:focus {
  border-color: var(--accent);
  background-color: var(--bg-secondary);
  box-shadow: 0 0 0 3px var(--card-glow);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.metric-card {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  transition: var(--transition);
}

.metric-card:hover {
  border-color: var(--accent);
  background-color: var(--bg-secondary);
  box-shadow: var(--shadow);
}

.metric-val {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.metric-lbl {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 0.5rem;
}

.extra-info-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.info-val {
  font-weight: 700;
  color: var(--text-primary);
}

/* Password Generator Layouts */
.password-display-card {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.password-text {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: monospace;
  color: var(--text-primary);
  word-break: break-all;
  padding-right: 3rem;
}

.copy-btn {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 1.5rem;
}

.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background-color: var(--card-glow);
}

.copy-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 1.5rem;
  background-color: var(--text-primary);
  color: var(--bg-primary);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
  font-weight: 600;
}

.copy-tooltip.show {
  opacity: 1;
}

.strength-bar-wrapper {
  margin-bottom: 1.5rem;
}

.strength-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.strength-indicator {
  height: 6px;
  border-radius: 9999px;
  background-color: var(--border-color);
  overflow: hidden;
  position: relative;
}

.strength-fill {
  height: 100%;
  width: 0;
  transition: var(--transition);
}

.strength-fill.weak {
  width: 25%;
  background-color: #ef4444;
}

.strength-fill.medium {
  width: 50%;
  background-color: #f59e0b;
}

.strength-fill.strong {
  width: 75%;
  background-color: #3b82f6;
}

.strength-fill.secure {
  width: 100%;
  background-color: #10b981;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.checkbox-group input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Meeting Planner Timeline */
.planner-timeline-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.planner-row {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
}

.planner-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.planner-city-info {
  font-weight: 700;
}

.hours-track {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 2px;
}

.hour-slot {
  aspect-ratio: 1/1;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-weight: bold;
  user-select: none;
  font-variant-numeric: tabular-nums;
}

.hour-slot.sleep {
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  opacity: 0.4;
}

.hour-slot.work {
  background-color: var(--accent);
  color: #ffffff;
}

.hour-slot.overlap {
  background-color: var(--overlap-color);
  color: #ffffff;
}

.hour-slot.off {
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
}

/* Diff Checker Blocks */
.diff-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .diff-container {
    grid-template-columns: 1fr !important;
  }
}

.diff-input-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.diff-textarea {
  width: 100%;
  height: 200px;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  font-family: monospace;
  font-size: 0.9rem;
  outline: none;
  resize: vertical;
}

.diff-output-viewport {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  font-family: monospace;
  font-size: 0.9rem;
  white-space: pre-wrap;
  overflow-x: auto;
  line-height: 1.6;
}

.diff-line {
  display: flex;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
}

.diff-line.added {
  background-color: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.diff-line.removed {
  background-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.diff-line.info {
  opacity: 0.5;
}

/* Spinner Styles */
.spinner-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
}

.spinner-canvas-container {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  margin: 0 auto 1.5rem auto;
}

.spinner-arrow {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 25px solid #ef4444;
  z-index: 5;
}

#wheel-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
}

.picker-inputs {
  width: 100%;
  height: 150px;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  outline: none;
  resize: none;
}





