:root {
    --primary-blue: #003366;
    --secondary-blue: #e6f2ff;
    --white: #ffffff;
    --text-color: #333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    display: flex;
    min-height: 100vh;
    color: var(--text-color);
}

/* Sidebar styling */
#sidebar {
    width: 200px;
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 20px;
    flex-shrink: 0;
    overflow-y: auto;
}

#sidebar h2 {
    font-size: 1.2rem;
    border-bottom: 1px solid var(--white);
    padding-bottom: 10px;
}

#sidebar nav ul {
    list-style: none;
    padding: 0;
}

#sidebar nav ul li {
    margin-bottom: 10px;
}

#sidebar nav ul li a {
    color: var(--white);
    text-decoration: none;
    display: block;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

#sidebar nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

#sidebar nav ul li a.active {
    font-weight: bold;
    background-color: rgba(255, 255, 255, 0.2);
}

.decade-section {
    margin-top: 20px;
}

.decade-section h3 {
    font-size: 0.9rem;
    color: var(--secondary-blue);
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 3px;
}

.year-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}

.year-link {
    color: var(--white);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 5px 2px;
    text-align: center;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.year-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.year-link.active {
    font-weight: bold;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Main content styling */
main {
    flex-grow: 1;
    padding: 40px;
    background-color: var(--white);
}

h1 {
    color: var(--primary-blue);
}

.plate-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.plate-nav-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.nav-button {
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: bold;
    padding: 10px;
    border: 1px solid var(--primary-blue);
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
    min-width: 80px;
}

.nav-button:hover {
    background-color: var(--primary-blue);
    color: var(--white);
}

.nav-button.placeholder {
    border: none;
    visibility: hidden;
}

.plate-image-placeholder {
    width: 300px;
    height: 300px;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f9f9f9;
    color: #666;
    overflow: hidden;
    flex-shrink: 0;
}

.plate-image-placeholder.has-image {
    border: none;
    background-color: transparent;
}

.plate-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
}

.plate-image {
    max-width: 100%;
    height: auto;
    border: 5px solid var(--secondary-blue);
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.plate-description {
    text-align: left;
    background-color: var(--secondary-blue);
    padding: 20px;
    border-radius: 8px;
    line-height: 1.6;
}

.backside-text {
    font-style: italic;
    margin-top: 20px;
    /*border-bottom: 1px solid var(--primary-blue);*/
    padding-bottom: 10px;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
}

#modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    #sidebar {
        width: 100%;
        padding: 10px;
        box-sizing: border-box;
    }

    #sidebar h2 {
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    #sidebar h2::after {
        content: '☰';
    }

    #sidebar nav {
        display: none;
    }

    #sidebar.open nav {
        display: block;
    }

    main {
        padding: 20px;
    }

    .plate-nav-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .plate-image-placeholder {
        grid-column: 1 / span 2;
        grid-row: 1;
        justify-self: center;
        width: 250px;
        height: 250px;
        margin-bottom: 10px;
    }

    .nav-button {
        min-width: 80px;
        font-size: 0.9rem;
    }

    .nav-button:nth-child(1) {
        grid-column: 1;
        grid-row: 2;
        justify-self: end;
    }

    .nav-button:nth-child(3) {
        grid-column: 2;
        grid-row: 2;
        justify-self: start;
    }
}
