/* Hobby Project Completion Calculator Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; line-height: 1.6; color: #333; background: #fff; } 
@media (prefers-color-scheme: dark) { body { background: #1a1a1a; color: #e0e0e0; } }

header { background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%); color: white; padding: 1rem 2rem; position: sticky; top: 0; z-index: 100; }
.logo { color: white; text-decoration: none; font-weight: 700; font-size: 1.5rem; }

main { max-width: 1200px; margin: 0 auto; padding: 2rem; }

.hero { text-align: center; margin-bottom: 3rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 0.5rem; color: #2c3e50; }
.hero p { color: #666; font-size: 1.1rem; }

section { margin-bottom: 2.5rem; }
h2 { font-size: 1.8rem; margin-bottom: 1rem; color: #2c3e50; border-bottom: 2px solid #eee; padding-bottom: 0.5rem; }

.calculator { background: #f8f9fa; border-radius: 12px; padding: 2rem; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
@media (prefers-color-scheme: dark) { .calculator { background: #2a2a2a; } }

form { display: grid; gap: 1.5rem; }
.form-group { display: flex; flex-direction: column; }\nlabel { font-weight: 600; margin-bottom: 0.5rem; }

select, input[type="number"], textarea { padding: 0.8rem; border: 2px solid #ddd; border-radius: 6px; font-size: 1rem; }
@media (prefers-color-scheme: dark) { select, input, textarea { background: #3a3a3a; border-color: #555; } }

input[type="range"] { width: 100%; }
input[type="number"] { width: 100%; }
textarea { resize: vertical; }

#experience, #time-available { width: 100%; }

#calculate-btn { background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%); color: white; border: none; padding: 1rem 2rem; font-size: 1.1rem; border-radius: 8px; cursor: pointer; font-weight: 600; transition: transform 0.2s, box-shadow 0.2s; }
#calculate-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37, 117, 252, 0.4); }
#calculate-btn:active { transform: translateY(0); }

.results { background: #e8f4f8; border-radius: 12px; padding: 2rem; opacity: 0; transition: opacity 0.3s; }
.results[aria-hidden="false"] { opacity: 1; }

.result-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.result-card { background: white; border-radius: 8px; padding: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
@media (prefers-color-scheme: dark) { .result-card { background: #2a2a2a; }
.time-estimate { font-size: 2rem; font-weight: 700; color: #6a11cb; }
.time-range { color: #666; font-size: 0.9rem; }
.probability { font-size: 2.5rem; font-weight: 700; color: #27ae60; }
.success-message { font-size: 0.95rem; color: #2c3e50; }
.material-list { padding-left: 1.2rem; line-height: 1.8; }
.material-list li { margin-bottom: 0.3rem; }

.export-actions { display: flex; gap: 0.8rem; margin-top: 1.5rem; flex-wrap: wrap; }
.export-actions button { flex: 1; min-width: 120px; padding: 0.7rem; border: 1px solid #6a11cb; border-radius: 6px; background: white; cursor: pointer; transition: background 0.2s; }
.export-actions button:hover { background: #f0f4f8; }
@media (prefers-color-scheme: dark) { .export-actions button { background: #3a3a3a; }
.example-presets { display: grid; gap: 0.8rem; }
.example-presets button { padding: 1rem; border-radius: 8px; border: 2px solid #ddd; background: white; cursor: pointer; transition: all 0.2s; }
.example-presets button:hover { background: #e3f2fd; border-color: #6a11cb; }
@media (prefers-color-scheme: dark) { .example-presets button { background: #3a3a3a; border-color: #555; }
.mistake-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.mistake-card { background: white; border-radius: 8px; padding: 1.2rem; border-left: 4px solid #6a11cb; box-shadow: 0 2px 6px rgba(0,0,0,0.05); }
@media (prefers-color-scheme: dark) { .mistake-card { background: #2a2a2a; }
footer { text-align: center; padding: 1.5rem; color: #666; font-size: 0.9rem; border-top: 1px solid #eee; margin-top: 3rem; }
footer a { color: #6a11cb; text-decoration: none; }
footer a:hover { text-decoration: underline; }

.ad-slot-placeholder { min-height: 120px; background: #f0f0f0; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #999; font-size: 0.9rem; margin: 1rem 0; }

@media (max-width: 768px) { 
  main { padding: 1rem; }
  .calculator { padding: 1.5rem; }
  .result-grid { grid-template-columns: 1fr; }
  .export-actions { flex-direction: column; }
}

/* Loading and success states */
.loading { opacity: 0.6; pointer-events: none; }
.success-message.success { color: #27ae60; font-weight: 600; }
.error-message { color: #e74c3c; background: #fee; padding: 1rem; border-radius: 8px; margin-top: 1rem; }

/* History panel */
.history-section { background: #fff3cd; border-radius: 8px; padding: 1rem; margin-top: 1rem; }
@media (prefers-color-scheme: dark) { .history-section { background: #3a2a1a; }
.history-list { list-style: none; font-size: 0.9rem; }
.history-list li { padding: 0.5rem 0; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; }
.history-list li:last-child { border-bottom: none; }
.history-item { background: white; padding: 0.8rem; border-radius: 6px; margin-bottom: 0.5rem; }
@media (prefers-color-scheme: dark) { .history-item { background: #2a2a2a; }
.history-btn { background: #6a11cb; color: white; border: none; padding: 0.3rem 0.8rem; border-radius: 4px; font-size: 0.8rem; cursor: pointer; }
.history-btn:hover { opacity: 0.9; }
.history-clear { background: #e74c3c; color: white; border: none; padding: 0.3rem 0.8rem; border-radius: 4px; font-size: 0.8rem; cursor: pointer; }
.history-clear:hover { opacity: 0.9; }

/* Comparison table styling */
table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
table th, table td { padding: 0.8rem; text-align: left; border-bottom: 1px solid #ddd; }
table th { background: #6a11cb; color: white; }
@media (prefers-color-scheme: dark) { table th { background: #5a4a3a; }

/* Print styles */
@media print {
  header, footer, .ad-slot-placeholder { display: none; }
  main { padding: 0; }
  .calculator, .examples { display: none; }
  .results { background: white; padding: 0; box-shadow: none; }
  .result-card { box-shadow: none; border: 1px solid #ddd; }
}


/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
