/* Furniture Flip Tool - Professional Dark Theme Styles */

.fft-container {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-radius: 16px;
  padding: 32px;
  margin: 20px auto;
  max-width: 900px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
  color: #e0e0e0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  position: relative;
  overflow: hidden;
}

.fft-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #4f46e5, #06b6d4, #10b981);
}

/* Header */
.fft-header {
  text-align: center;
  margin-bottom: 40px;
}

.fft-title {
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px 0;
  letter-spacing: -0.5px;
}

.fft-subtitle {
  font-size: 16px;
  color: #9ca3af;
  margin: 0;
  font-weight: 400;
}

/* Auth Status */
.fft-auth-status {
  text-align: center;
  padding: 16px;
  background: #1f2937;
  border-radius: 8px;
  margin-bottom: 24px;
  border: 1px solid #374151;
}

.fft-auth-user {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.fft-auth-email {
  color: #e5e7eb;
  font-size: 14px;
}

.fft-btn-link {
  background: none;
  border: none;
  color: #4f46e5;
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
  padding: 0;
}

.fft-btn-link:hover {
  color: #5b52f0;
}

/* Auth Section */
.fft-auth-section,
.fft-verification-section,
.fft-subscription-section {
  margin: 32px 0;
}

.fft-auth-card,
.fft-verification-card,
.fft-subscription-card {
  background: #1f2937;
  border-radius: 12px;
  padding: 32px;
  border: 1px solid #374151;
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

.fft-auth-header h3,
.fft-verification-card h3,
.fft-subscription-card h3 {
  color: #ffffff;
  font-size: 20px;
  margin: 0 0 8px 0;
}

.fft-auth-header p,
.fft-verification-card p,
.fft-subscription-card p {
  color: #9ca3af;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.fft-auth-tabs {
  display: flex;
  margin-bottom: 24px;
  border-radius: 8px;
  background: #374151;
  padding: 4px;
}

.fft-auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #9ca3af;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.fft-auth-tab.active {
  background: #4f46e5;
  color: #ffffff;
}

.fft-auth-form {
  margin-bottom: 16px;
  text-align: left;
}

.fft-auth-message {
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
  margin-bottom: 16px;
}

.fft-auth-message-success {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.fft-auth-message-error {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Form Layout */
.fft-form {
  margin-bottom: 32px;
}

.fft-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.fft-form-group {
  display: flex;
  flex-direction: column;
}

.fft-label {
  font-size: 14px;
  font-weight: 600;
  color: #f3f4f6;
  margin-bottom: 8px;
  letter-spacing: 0.025em;
}

/* Form Controls */
.fft-select,
.fft-input {
  background: #374151;
  border: 2px solid #4b5563;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  color: #ffffff;
  transition: all 0.2s ease;
  outline: none;
}

.fft-select:focus,
.fft-input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  background: #4b5563;
}

.fft-select:disabled {
  background: #2d3748;
  border-color: #2d3748;
  color: #6b7280;
  cursor: not-allowed;
}

.fft-select option {
  background: #374151;
  color: #ffffff;
}

/* Range Slider */
.fft-range-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.fft-range {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: #4b5563;
  border-radius: 3px;
  outline: none;
}

.fft-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #4f46e5;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.fft-range::-webkit-slider-thumb:hover {
  background: #5b52f0;
  transform: scale(1.1);
}

.fft-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #4f46e5;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.fft-range-value {
  font-size: 14px;
  font-weight: 600;
  color: #4f46e5;
  min-width: 80px;
  text-align: right;
}

/* Checkbox */
.fft-checkbox-group {
  justify-content: center;
  align-items: center;
}

.fft-checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 15px;
  color: #e5e7eb;
}

.fft-checkbox {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  accent-color: #4f46e5;
}

.fft-checkbox-text {
  user-select: none;
}

/* Button */
.fft-form-actions {
  text-align: center;
}

.fft-btn {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border: none;
  border-radius: 12px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-width: 200px;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.fft-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

.fft-btn:active {
  transform: translateY(0);
}

.fft-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.fft-btn-secondary {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
}

.fft-btn-secondary:hover:not(:disabled) {
  box-shadow: 0 8px 25px rgba(107, 114, 128, 0.4);
}

.fft-btn-loading {
  display: none;
}

.fft-btn.loading .fft-btn-text {
  display: none;
}

.fft-btn.loading .fft-btn-loading {
  display: inline;
}

/* Results Section */
.fft-results {
  background: #1f2937;
  border-radius: 12px;
  padding: 32px;
  border: 1px solid #374151;
  margin-top: 32px;
}

.fft-results-header {
  text-align: center;
  margin-bottom: 32px;
}

.fft-results-title {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px 0;
}

.fft-results-subtitle {
  font-size: 14px;
  color: #9ca3af;
  margin: 0;
}

.fft-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.fft-result-card {
  background: #374151;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  border: 1px solid #4b5563;
}

.fft-result-label {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.fft-result-value {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.fft-result-value.positive {
  color: #10b981;
}

.fft-result-value.negative {
  color: #ef4444;
}

.fft-result-value.neutral {
  color: #f59e0b;
}

/* Deal Quality Badge */
.fft-deal-quality {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 8px;
}

.fft-deal-quality.very-bad {
  background: rgba(127, 29, 29, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(127, 29, 29, 0.3);
}

.fft-deal-quality.bad {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.fft-deal-quality.okay {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.fft-deal-quality.good {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.fft-deal-quality.great {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.fft-deal-quality.excellent {
  background: rgba(99, 102, 241, 0.2);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Summary Section */
.fft-summary {
  background: #111827;
  border-radius: 8px;
  padding: 24px;
  border-left: 4px solid #4f46e5;
}

.fft-summary-title {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 16px 0;
}

.fft-summary-text {
  font-size: 15px;
  line-height: 1.6;
  color: #d1d5db;
  margin: 0;
}

.fft-summary-highlight {
  color: #4f46e5;
  font-weight: 600;
}

/* Loading Overlay */
.fft-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  color: #ffffff;
}

.fft-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #4b5563;
  border-top: 3px solid #4f46e5;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Error States */
.fft-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 16px;
  color: #fca5a5;
  font-size: 14px;
  margin-top: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .fft-container {
    padding: 24px 20px;
    margin: 10px;
    border-radius: 12px;
  }

  .fft-title {
    font-size: 24px;
  }

  .fft-form-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .fft-results-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
  }

  .fft-result-value {
    font-size: 20px;
  }

  .fft-btn {
    width: 100%;
    padding: 14px 24px;
  }

  .fft-auth-card,
  .fft-verification-card,
  .fft-subscription-card {
    padding: 24px 20px;
    margin: 0 10px;
  }

  .fft-auth-user {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .fft-container {
    padding: 20px 16px;
  }

  .fft-title {
    font-size: 20px;
  }

  .fft-results-grid {
    grid-template-columns: 1fr;
  }

  .fft-range-container {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .fft-range-value {
    text-align: center;
    min-width: auto;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .fft-btn,
  .fft-select,
  .fft-input,
  .fft-range::-webkit-slider-thumb {
    transition: none;
  }

  .fft-spinner {
    animation: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .fft-container {
    border: 2px solid #ffffff;
  }

  .fft-select,
  .fft-input {
    border-width: 2px;
  }

  .fft-btn {
    border: 2px solid #ffffff;
  }
}
