:root {
    --primary: #e63946;
    --primary-dark: #d62828;
    --secondary: #457b9d;
    --bg: #f8f9fa;
    --surface: #ffffff;
    --text: #1d3557;
    --text-light: #5c677d;
    --glass: rgba(255, 255, 255, 0.9);
    --border: #e9ecef;
    --radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header & Footer */
.site-header {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links, .footer-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-links a, .footer-links a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover, .footer-links a:hover {
    color: var(--primary);
}

/* Sections */
.hero-section {
    text-align: center;
    padding: 4rem 0 2rem;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* App Grid */
.tool-section {
    padding: 2rem 0;
}

.app-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    align-items: stretch;
}

@media (max-width: 768px) {
    .app-grid {
        grid-template-columns: 1fr;
    }
}

.app-controls, .app-display {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

input[type="text"], input[type="number"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--secondary);
}

.highlight-group {
    background: var(--bg);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.stepper {
    display: flex;
    gap: 0.5rem;
}

.stepper input {
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
}

button {
    cursor: pointer;
    border: none;
    padding: 0.75rem 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.stepper button {
    background-color: var(--secondary);
    color: white;
    flex: 1;
}

.stepper button:hover {
    background-color: #315b75;
}

.primary-btn {
    width: 100%;
    background-color: var(--primary);
    color: white;
    font-size: 1.1rem;
    margin-top: 1rem;
}

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

.app-note {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 1.5rem;
    font-style: italic;
}

/* Thermometer Display */
.app-display {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.display-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.thermometer-wrapper {
    position: relative;
    width: 120px;
    height: 400px;
    margin: 0 auto 2rem;
}

.thermometer-glass {
    width: 100%;
    height: 100%;
    background-color: #f1f3f5;
    border: 4px solid #dee2e6;
    border-radius: 60px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 4px 8px rgba(0,0,0,0.1);
}

.thermometer-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 45%; 
    background: linear-gradient(to top, var(--primary-dark), var(--primary));
    transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 0 60px 60px;
}

.thermometer-markers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 0;
    pointer-events: none;
}

.thermometer-markers span {
    text-align: center;
    color: rgba(0,0,0,0.3);
    font-weight: bold;
    font-size: 0.85rem;
    z-index: 2;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.7);
}

.stats {
    display: flex;
    gap: 3rem;
    margin-bottom: 1rem;
}

.stat-box {
    text-align: center;
}

.stat-label {
    display: block;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: var(--text-light);
    letter-spacing: 1px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
}

.progress-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

/* Fullscreen Mode */
:fullscreen .app-display {
    width: 100vw;
    height: 100vh;
    justify-content: center;
    padding: 4rem;
}
:fullscreen .thermometer-wrapper {
    height: 60vh;
}
:fullscreen .display-title {
    font-size: 4rem;
}
:fullscreen .stat-value {
    font-size: 4rem;
}
:fullscreen .progress-text {
    font-size: 2.5rem;
}

/* Content Section */
.content-section {
    padding: 3rem 0;
    background-color: var(--surface);
    margin-top: 3rem;
}

.content-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.content-section h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.content-section p {
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
}

.site-footer {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-light);
}

.site-footer .footer-links {
    justify-content: center;
    margin-top: 1rem;
}


/* 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;
}
