body {
    width: 60%;
    margin: auto;
    text-align: center;
    font-family: Arial, sans-serif;
}
@media screen and (max-width: 800px) {
    body {
        width: 100%;
    }
}

/* HEADER */
.header {
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: #f2f2f2;
}

/* COORDINATES */
.coordinates {
    font-size: 1rem;
    color: #555;
    margin: -0.5rem 0 0.5rem;
}


h1 {
    font-size: 3rem;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    color: #2f4468;
}
h2 {
    font-size: 2.2rem;
}

/* CONTROLS ROW */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 0.4rem;
}
.controls input[type="number"] {
    width: 160px;
    padding: 4px 8px;
    font-size: 0.95rem;
    border: 1px solid #aaa;
    border-radius: 3px;
    text-align: center;
}
.controls button {
    padding: 4px 16px;
    font-size: 0.95rem;
    background: #e8e8e8;
    border: 1px solid #aaa;
    border-radius: 3px;
    cursor: pointer;
}
.controls button:hover {
    background: #d0d0d0;
}

/* LAST READING */
.last-reading {
    font-size: 1rem;
    color: #444;
    margin: 0.8rem 0 1.5rem;
}

/* GAUGE LAYOUT */
.content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
}

/* GAUGE BLOCK */
.gauge {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* SVG GAUGE */
.gauge-svg {
    width: 12.5rem;
    height: auto;
    display: block;
    margin: 0.5rem auto;
}
.gauge-track {
    fill: none;
    stroke: #ddd;
    stroke-width: 18;
    stroke-linecap: round;
}
.gauge-arc {
    fill: none;
    stroke-width: 18;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 0.6s ease-in-out;
}

/* STATS TABLE — borders only, no background colors */
.stats-table {
    margin-top: 1rem;
    border-collapse: collapse;
    width: 100%;
    font-size: 0.95rem;
}
.stats-table th,
.stats-table td {
    border: 1px solid #aaa;
    padding: 8px 14px;
    background: transparent;
    color: inherit;
    font-weight: normal;
}
.stats-table thead tr:first-child th {
    background-color: #2f4468;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    border-bottom: 1px solid #aaa;
}

/* GAUGE + CHART SIDE BY SIDE */
.gauge-with-chart {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 16px;
}
.pressure-chart-sidebar {
    width: 293px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.readings-section {
    margin: 2.5rem auto 2rem;
    width: 100%;
}
.readings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.readings-table th,
.readings-table td {
    border: 1px solid #aaa;
    padding: 8px 14px;
    background: transparent;
    color: inherit;
    font-weight: normal;
}
.readings-table thead tr:first-child th {
    background-color: #a8a8a8;
    color: #333;
    font-weight: bold;
    font-size: 1rem;
    border-bottom: 1px solid #aaa;
}
.pressure-chart-sidebar .readings-table thead tr:first-child th {
    background-color: #2f4468;
    color: white;
}

/* PRESSURE BAR CHART — vertical columns */
.pressure-chart {
    width: 100%;
    border: 1px solid #aaa;
    border-top: none;
    padding: 16px 16px 8px;
    box-sizing: border-box;
}
.pressure-chart-inner {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 2px;
    height: 300px;
    width: 100%;
}
.pressure-bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    min-width: 0;
    height: 100%;
    gap: 2px;
    overflow: hidden;
}
.pressure-bar-value {
    font-size: 0.65rem;
    color: #333;
    text-align: center;
    white-space: nowrap;
    line-height: 1.2;
}
.pressure-bar-track {
    width: 100%;
    background: #eee;
    border-radius: 2px 2px 0 0;
    display: flex;
    align-items: flex-end;
    flex: 1;
    position: relative;
}
.pressure-bar-fill {
    width: 100%;
    background: #2f4468;
    border-radius: 2px 2px 0 0;
    transition: height 0.5s ease;
}
.pressure-bar-label {
    font-size: 0.6rem;
    color: #555;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    height: 64px;
    line-height: 1;
}