* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    display: flex;
    margin: 0;
    padding: 0;
    background-color: #d9d9d9;
}

.sidebar {
    width: 200px;
    background-color: #d9d9d9;
    padding: 10px;
    position: fixed;
    height: 100%;
    overflow-y: auto;
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
}

.sidebar ul li {
    margin: 10px 0;
}

.sidebar ul li a {
    color: #333;
    text-decoration: none;
    font-size: 0.9em;
}

.sidebar ul li a:hover {
    text-decoration: underline;
}

.content {
    margin-left: 220px;
    padding: 20px;
    width: calc(100% - 220px);
}

h1 {
    margin-top: 20px;
    font-size: 1.0em;
    text-align: center;
    color: #333;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin: 20px 0;
    align-items: end;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.gallery-item img {
    width: 100%;
    height: auto;
    transition: transform 0.3s;
    cursor: pointer;
}

.gallery-item img:hover {
    transform: scale(1.1);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.2em;
    text-align: center;
}

.modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

.modal .operation-hint {
    position: absolute;
    color: white;
    text-align: center;
    font-size: 1em;
}

.hint-top {
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
}

.hint-bottom {
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
}

.hidden {
    display: none;
}
