:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --header-bg: #f0f0f0;
    --table-header-bg: #e0e0e0;
    --highlight-schuman-bg: #ffeb3b40; /* Light yellow for Schuman */
    --highlight-bldg13-bg: #4fc3f740; /* Light blue for BLDG 13 */
    --border-color: #dddddd;
    --button-bg: #f0f0f0;
    --button-hover-bg: #e0e0e0;
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #ffffff;
    --header-bg: #2d2d2d;
    --table-header-bg: #333333;
    --highlight-schuman-bg: #ffd70040; /* Gold for Schuman in dark mode */
    --highlight-bldg13-bg: #00bcd440; /* Cyan for BLDG 13 in dark mode */
    --border-color: #404040;
    --button-bg: #2d2d2d;
    --button-hover-bg: #333333;
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 100%;
    padding: 1rem;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--header-bg);
    margin-bottom: 1rem;
    border-radius: 8px;
}

.header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

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

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
}

.view-toggle {
    background: var(--button-bg);
    color: var(--text-color);
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.view-toggle:hover {
    background: var(--button-hover-bg);
}

.subtitle {
    text-align: center;
    margin-bottom: 1rem;
}

.subtitle h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.subtitle p {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
}

.table-container {
    overflow-x: auto;
    margin-top: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    margin: 0 auto;
}

table {
    width: auto;
    margin: 0 auto;
    border-collapse: collapse;
    white-space: nowrap;
    background-color: var(--bg-color);
}

th, td {
    padding: 0.5rem 0.3rem;
    text-align: center;
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
}

th {
    background-color: var(--table-header-bg);
    font-weight: 600;
    position: sticky;
    top: 0;
    white-space: normal;
    min-width: 60px;
}

.highlight-schuman {
    background-color: var(--highlight-schuman-bg);
}

.highlight-bldg13 {
    background-color: var(--highlight-bldg13-bg);
}

/* Direction indicator styles */
.direction-indicator {
    margin-left: 5px;
    font-size: 0.8rem;
    opacity: 0.8;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.image-container {
    background: var(--bg-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    margin-top: 20px;
    width: 100%;
}

.image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.image-wrapper img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Add tooltip styles */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem;
    background-color: var(--text-color);
    color: var(--bg-color);
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@media screen and (max-width: 768px) {
    .container {
        padding: 10px;
        margin: 0;
        border-radius: 0;
    }

    .header-buttons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .table-container {
        margin: 10px -10px;
        border-radius: 0;
        padding: 5px;
    }

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 6px 4px;
    }

    .image-container {
        margin: 10px -10px;
        border-radius: 0;
        padding: 10px;
    }

    .image-container img {
        width: 100%;
        object-fit: contain;
    }
}

@media screen and (max-width: 480px) {
    table {
        font-size: 0.8rem;
    }

    th, td {
        padding: 4px 2px;
    }

    h1 {
        font-size: 1.2rem;
    }

    h2 {
        font-size: 1rem;
    }
}
