/* Modern System Font Stack & Reset */
:root {
    --bg-color: #f9fafb;
    --text-main: #111827;
    --text-muted: #6b7280;
    --accent: #0f172a;
    --border: #e5e7eb;
    --card-bg: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
    padding: 40px 20px;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* Typography */
h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

p.subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    text-decoration: underline;
}

/* Controls Layout (The First Block) */
.controls {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.control-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

label {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
}

select {
    font-family: inherit;
    font-size: 0.95rem;
    padding: 8px 36px 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background-color: var(--bg-color);
    color: var(--text-main);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    transition: border-color 0.2s ease;
}

select:focus {
    outline: none;
    border-color: var(--text-muted);
}

button {
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    background-color: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    cursor: pointer;
    transition: transform 0.1s ease, background-color 0.2s ease;
}

button:hover {
    background-color: #334155;
}

button:active {
    transform: scale(0.97);
}

#time {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.95rem;
    color: var(--accent);
}

#option {
    font-size: 0.9rem;
    color: var(--text-muted);
}

#option:empty {
    display: none;
}

#option label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.canvas-container {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.03);
    margin-bottom: 30px;
}

canvas {
    width: 100%;
    display: block;
}

.map-container {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.03);
    margin-bottom: 30px;
}

.map-container h2 {
    margin-top: 0;
}

.map-container img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-top: 15px;
    display: block;
    background-color: var(--bg-color);
}

.signal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.signal-card {
    background: var(--bg-color);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

.signal-card strong {
    display: block;
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 2px;
}

/* Instructions */
.instructions {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 40px;
}

.instructions p {
    margin-bottom: 1rem;
}