.ff-root {
  --ff-brand: #6366f1;
  --ff-brand-light: #818cf8;
  --ff-brand-dark: #4f46e5;
  --ff-success: #10b981;
  --ff-warning: #f59e0b;
  --ff-danger: #ef4444;
  --ff-bg: var(--surface-1);
  --ff-card-bg: var(--surface-2);
  --ff-input-bg: var(--surface-3);
  --ff-text: var(--text-1);
  --ff-text-muted: var(--text-2);
  --ff-border: var(--border-color);
  
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.theme-dark .ff-root {
  --ff-input-bg: #1e293b;
  --ff-card-bg: #0f172a;
  --ff-border: #334155;
}

.ff-card {
  background: var(--ff-card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--ff-border);
  border-radius: 2rem;
  padding: 3rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.ff-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--ff-brand), var(--ff-brand-light));
}

.ff-calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

@media (max-width: 900px) {
  .ff-calculator-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

.ff-input-group {
  margin-bottom: 2.5rem;
}

.ff-input-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ff-text);
  letter-spacing: -0.01em;
}

.ff-input-field {
  width: 100%;
  background: var(--ff-input-bg);
  border: 2px solid var(--ff-border);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ff-text);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 0.5rem;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.ff-input-field:hover {
  border-color: var(--ff-brand-light);
}

.ff-input-field:focus {
  border-color: var(--ff-brand);
  background: var(--ff-card-bg);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
  outline: none;
}

.ff-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 12px;
  border-radius: 6px;
  background: var(--ff-input-bg);
  border: 1px solid var(--ff-border);
  outline: none;
  margin: 1.5rem 0;
  cursor: pointer;
}

.ff-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ff-brand);
  cursor: pointer;
  border: 4px solid #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.theme-dark .ff-slider::-webkit-slider-thumb {
  border-color: #0f172a;
}

.ff-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: var(--ff-brand-light);
  box-shadow: 0 6px 15px rgba(99, 102, 241, 0.4);
}

.ff-switch {
  display: inline-flex;
  background: var(--ff-input-bg);
  padding: 0.4rem;
  border-radius: 0.75rem;
  gap: 0.25rem;
  border: 1px solid var(--ff-border);
}

.ff-switch-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: none;
  background: transparent;
  color: var(--ff-text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.ff-switch-btn.active {
  background: var(--ff-brand);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.ff-results-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  background: var(--ff-input-bg);
  padding: 2.5rem;
  border-radius: 2rem;
  border: 1px solid var(--ff-border);
}

.ff-time-hero {
  text-align: center;
}

.ff-time-label {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ff-text-muted);
  margin-bottom: 0.5rem;
}

.ff-time-display {
  font-size: 4.5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(135deg, var(--ff-brand), var(--ff-brand-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 1rem 0;
}

.ff-time-units {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.ff-unit-card {
  background: var(--ff-card-bg);
  padding: 1.25rem;
  border-radius: 1.25rem;
  text-align: center;
  border: 1px solid var(--ff-border);
}

.ff-unit-val {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--ff-text);
}

.ff-unit-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ff-text-muted);
  text-transform: uppercase;
}

.ff-status-indicator {
  padding: 1.5rem;
  border-radius: 1.5rem;
  font-weight: 800;
  font-size: 1.2rem;
  text-align: center;
}

.status-red {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.status-yellow {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.status-green {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.ff-burn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.ff-burn-card {
  padding: 1.5rem;
}

.ff-burn-val {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--ff-brand);
}

.ff-what-if-card {
  margin-top: 1.5rem;
  padding: 2.5rem;
  background: linear-gradient(135deg, var(--ff-brand), var(--ff-brand-dark));
  border-radius: 2rem;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 30px rgba(99, 102, 241, 0.3);
}

.ff-what-if-title {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
}

.ff-what-if-desc {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.ff-gain-display {
  font-size: 1.5rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.2);
  padding: 1rem 1.5rem;
  border-radius: 1.25rem;
  display: inline-block;
  backdrop-filter: blur(5px);
}

.ff-currency-select {
  appearance: none;
  background-color: var(--ff-input-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236366f1' stroke-width='3' %3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
  border: 2px solid var(--ff-border);
  border-radius: 1rem;
  color: var(--ff-text);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
  padding: 0.8rem 3rem 0.8rem 1.25rem;
  transition: all 0.2s;
  width: auto;
  min-width: 120px;
}

.ff-currency-select:hover {
  border-color: var(--ff-brand);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ff-currency-select:focus {
  outline: none;
  border-color: var(--ff-brand);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.ff-currency-select option {
  background-color: var(--ff-card-bg);
  color: var(--ff-text);
  padding: 1rem;
}

:global(.theme-dark) .ff-currency-select {
  background-color: #1e293b;
  color: #f8fafc;
  border-color: #334155;
}

:global(.theme-dark) .ff-currency-select option {
  background-color: #1e293b;
  color: #f8fafc;
}
