/* CSS Variables */
:root {
  --forge-orange: #FF6B35;
  --forge-orange-hover: #e85a26;
  --deep-charcoal: #1A1A2E;
  --warm-gray: #F5F5F7;
  --white: #FFFFFF;
  --text-secondary: #666;
  --border-color: #E0E0E0;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --transition: all 0.2s ease;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--warm-gray);
  color: var(--deep-charcoal);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: var(--white);
  padding: 16px 0;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--forge-orange);
  color: var(--white);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
}

.logo-text {
  font-size: 24px;
  font-weight: 700;
  color: var(--deep-charcoal);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--deep-charcoal) 0%, #2a2a4a 100%);
  color: var(--white);
  padding: 48px 0;
  text-align: center;
}

.hero h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.hero-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  max-width: 500px;
  margin: 0 auto;
}

/* Main Content */
.main {
  flex: 1;
  padding: 32px 0;
}

/* Cards */
.form-card,
.loading-card,
.results-card,
.error-card {
  background: var(--white);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.form-card h2,
.results-card h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--deep-charcoal);
}

/* Form Styles */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--deep-charcoal);
}

.form-group input[type="text"],
.form-group select {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--white);
  transition: var(--transition);
  font-family: inherit;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--forge-orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-group input[type="text"]::placeholder {
  color: #999;
}

/* Checkbox Styles */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  padding: 8px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  transition: var(--transition);
}

.checkbox-label:hover {
  border-color: var(--forge-orange);
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--forge-orange);
  border-color: var(--forge-orange);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '';
  width: 6px;
  height: 10px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.checkbox-label input[type="checkbox"]:checked ~ * {
  color: var(--forge-orange);
}

/* Radio Styles */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  padding: 8px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  transition: var(--transition);
}

.radio-label:hover {
  border-color: var(--forge-orange);
}

.radio-label input[type="radio"] {
  display: none;
}

.radio-custom {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.radio-label input[type="radio"]:checked + .radio-custom {
  border-color: var(--forge-orange);
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--forge-orange);
  border-radius: 50%;
}

.radio-label input[type="radio"]:checked ~ * {
  color: var(--forge-orange);
}

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  background: var(--forge-orange);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var(--forge-orange-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  background: var(--forge-orange);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--forge-orange-hover);
}

.btn-outline {
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  color: var(--deep-charcoal);
  background: transparent;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-outline:hover {
  border-color: var(--deep-charcoal);
  background: var(--warm-gray);
}

/* Loading State */
.loading-card {
  text-align: center;
  padding: 64px 32px;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top-color: var(--forge-orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 24px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-message {
  font-size: 16px;
  color: var(--text-secondary);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Results Section */
.results-card {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.results-header {
  text-align: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.brand-name {
  font-size: 32px;
  font-weight: 700;
  color: var(--forge-orange);
  margin-bottom: 8px;
}

.tagline {
  font-size: 18px;
  color: var(--text-secondary);
  font-style: italic;
}

.positioning-section {
  margin-bottom: 32px;
}

.positioning-section h3,
.menu-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--deep-charcoal);
}

.positioning-section p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Menu Grid */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.menu-item {
  background: var(--warm-gray);
  padding: 16px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.menu-item-info {
  flex: 1;
}

.menu-item-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--deep-charcoal);
  margin-bottom: 4px;
}

.menu-item-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.menu-item-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--forge-orange);
  white-space: nowrap;
}

/* Results Actions */
.results-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

/* Error State */
.error-card {
  text-align: center;
  padding: 48px 32px;
}

.error-icon {
  width: 56px;
  height: 56px;
  background: #fee;
  color: #d44;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  margin: 0 auto 16px;
}

.error-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--deep-charcoal);
}

.error-card p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.error-card .btn-primary {
  width: auto;
  display: inline-flex;
}

/* Footer */
.footer {
  background: var(--deep-charcoal);
  color: rgba(255, 255, 255, 0.7);
  padding: 24px 0;
  text-align: center;
  font-size: 14px;
}

/* Utility */
[hidden] {
  display: none !important;
}

/* Responsive Design */
@media (min-width: 640px) {
  .hero h1 {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .form-card,
  .loading-card,
  .results-card,
  .error-card {
    padding: 40px;
  }

  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .results-actions {
    flex-direction: row;
    justify-content: center;
  }

  .results-actions button {
    width: auto;
  }
}

@media (min-width: 768px) {
  .hero {
    padding: 64px 0;
  }

  .hero h1 {
    font-size: 42px;
  }

  .brand-name {
    font-size: 40px;
  }
}
