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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
header {
    background: #b11313;
    color: white;
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

nav .logo {
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
}

nav a:hover {
    text-decoration: underline;
}

/* Main */
main {
    flex: 1;
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 1rem;
    width: 100%;
}

/* Hero */
.hero {
    text-align: center;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2rem;
    color: #b11313;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.1rem;
    color: #555;
}

/* Simulator Layout */
.simulator {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.controls-panel {
    flex: 1 1 300px;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.controls-panel h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #b11313;
}

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

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

input[type="range"] {
    width: 100%;
    cursor: pointer;
}

select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
}

.results {
    background: #f1f1f1;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
}

.results p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    background: #b11313;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

button:hover {
    background: #8f0f0f;
}

button:active {
    background: #6a0b0b;
}

.canvas-container {
    flex: 2 1 500px;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

canvas {
    width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.canvas-note {
    font-size: 0.8rem;
    color: #777;
    margin-top: 0.5rem;
    text-align: center;
}

/* Content Section */
.content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.content h2 {
    font-size: 1.5rem;
    color: #b11313;
    margin-bottom: 1rem;
}

.content h3 {
    font-size: 1.2rem;
    color: #333;
    margin: 1.5rem 0 0.5rem;
}

.content p, .content li {
    margin-bottom: 0.8rem;
}

.content ul, .content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.content em {
    font-style: italic;
    font-weight: 500;
}

/* Footer */
footer {
    background: #333;
    color: #ccc;
    text-align: center;
    padding: 1rem;
    margin-top: auto;
    font-size: 0.85rem;
}

footer a {
    color: #ff6b6b;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    .simulator {
        flex-direction: column;
    }
    .canvas-container {
        order: -1;
    }
    .hero h1 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .actions {
        flex-direction: column;
    }
    .content {
        padding: 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;
}
