html {
    height: 100%;
}

:root {
    --bg-color: #1a1a1a;
    --text-color: #f0f0f0;
    --primary-color: #007bff;
    --error-color: #dc3545;
    --success-color: #28a745;
    --border-color: #444;
    --bar-color-good: #28a745;
    --bar-color-medium: #ffc107;
    --bar-color-bad: #dc3545;
    --bar-color-off: #333;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100%;
    text-align: center;
}

.page {
    width: 100%;
    max-width: 480px;
    padding: 2rem;
    box-sizing: border-box;
    display: none; /* Hide all pages by default */
}

h1, h2 {
    margin-top: 0;
}

input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1.2rem;
    box-sizing: border-box;
    text-align: center;
    text-transform: uppercase;
}

button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    background-color: var(--primary-color);
    color: white;
    transition: background-color 0.2s, transform 0.1s;
}

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

button.secondary {
    background-color: #6c757d;
}

button.danger {
    background-color: var(--error-color);
}

button.success {
    background-color: var(--success-color);
}

.list-container {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
    max-height: 40vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.list-container li {
    background-color: #2a2a2a;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: monospace;
    font-size: 0.9rem;
    text-align: left;
    line-height: 1.4;
}

.list-container li:hover {
    background-color: #3a3a3a;
}

/* NEW: Styles for the alignment info in the picker list */
.list-container li .align-info {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: #ccc;
}

.error-text {
    color: var(--error-color);
    min-height: 1.2rem;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

/* Alignment Page */
.back-button {
    margin-bottom: 2rem;
}

.back-button + .back-button {
    margin-left: 0.5rem;
}

.signal-container {
    margin-bottom: 2rem;
}

.signal-box {
    margin-bottom: 2.5rem;
}

.signal-label {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.signal-value {
    font-size: 5rem;
    font-weight: bold;
    line-height: 1;
}

/* --- NEW STYLE FOR MAX STRENGTH --- */
.signal-value .max-strength {
    font-size: 2.5rem; /* Half the main size */
    font-weight: normal;
    color: #aaa; /* Dimmer color */
}
/* --- END NEW STYLE --- */

.signal-bars {
    display: flex;
    height: 15px;
    gap: 2px;
    margin-top: 1rem;
}

.bar {
    flex-grow: 1;
    background-color: var(--bar-color-off);
    border-radius: 2px;
}

#device-info, #uptime-info, #ap-info, #device-ip, #device-ip a, #ap-info a {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-family: monospace;
    font-size: 1rem;
    min-height: 1.2em;
    text-decoration: none;
}
#ap-info { margin-bottom: 2rem; }

#status-message {
    height: 1.2rem;
    color: var(--error-color);
    margin-bottom: 1rem;
}
#clear-button {
    margin-right: 3rem;
}