:root {
    --primary-color: #007bff;
    --light-gray: #f8f9fa;
    --medium-gray: #dee2e6;
    --dark-gray: #6c757d;
    --text-color: #212529;
    --white: #fff;
    --border-radius: 8px;
    --shadow: 0 2px 4px rgba(0,0,0,0.05);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    font-family: var(--font-family);
    margin: 0;
    background-color: var(--light-gray);
    color: var(--text-color);
    line-height: 1.6;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--white);
    border-bottom: 1px solid var(--medium-gray);
    box-shadow: var(--shadow);
}

header h1, .station-header h2, .modal-content h3 {
    font-family: var(--font-family);
    font-weight: 600; /* Reduced from 700 */
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.logo {
    height: 40px;
}

main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.station-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.button-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--medium-gray);
    background-color: var(--white);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: var(--font-family);
    font-weight: 600;
    color: var(--text-color);
    transition: background-color 0.2s, box-shadow 0.2s;
}

.button-text:hover {
    background-color: #f1f3f5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--medium-gray);
    background-color: var(--white);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    color: var(--dark-gray);
}

.button:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.button.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.button.copying {
    background-color: #28a745;
    color: var(--white);
    border-color: #28a745;
    cursor: default;
}

.button .material-symbols-outlined {
    font-size: 24px;
}

#data-container {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--medium-gray);
    padding: 1rem; /* Add padding for the graph */
}

#data-container table {
    width: 100%;
    border-collapse: collapse;
}

#data-container th, #data-container td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--medium-gray);
}

#data-container tr:last-child td {
    border-bottom: none;
}

#data-container th {
    background-color: #f1f3f5;
    font-weight: 600;
    border-bottom-width: 2px;
    border-bottom-color: var(--medium-gray);
}

.hidden {
    display: none !important; /* Use !important to ensure it overrides other display properties */
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal.hidden {
    opacity: 0;
    visibility: hidden;
}

.modal-content {
    background-color: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.close-btn {
    color: var(--dark-gray);
    float: right;
    font-size: 28px;
    font-weight: bold;
    align-self: flex-end;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--text-color);
}

.modal-content h3 {
    margin: 0 0 1rem 0;
}

#station-search {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    box-sizing: border-box;
    font-family: var(--font-family);
}

#station-search:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

#station-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
}

#station-list li {
    padding: 12px;
    border-bottom: 1px solid var(--medium-gray);
    cursor: pointer;
    transition: background-color 0.2s;
}

#station-list li:last-child {
    border-bottom: none;
}

#station-list li:hover {
    background-color: var(--light-gray);
}
