body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    width: 100%;
    max-width: 900px;
}

h1 {
    color: #007bff;
    margin-bottom: 15px;
    font-size: 3em;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 15px;
}

.description {
    font-size: 1.1em;
    line-height: 1.7;
    color: #555;
    margin-top: 20px;
}

.apps-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    width: 100%;
    max-width: 900px;
    padding-bottom: 40px;
}

@media (min-width: 768px) {
    .apps-container {
        grid-template-columns: 1fr 1fr;
    }
}

.app-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: left;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* 画像カルーセルコンテナ */
.app-card-image-carousel {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
    background-color: #f0f0f0; /* 画像がない場合の背景色 */
}

.app-card-image-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out; /* スライドアニメーション */
}

.app-card-image {
    min-width: 100%; /* 各画像をコンテナの幅いっぱいに */
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}

.carousel-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.5em;
    z-index: 10;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.carousel-nav-button:hover {
    opacity: 1;
}

.carousel-nav-button.prev {
    left: 0;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.carousel-nav-button.next {
    right: 0;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.app-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.app-card-content h3 {
    color: #0056b3;
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 10px;
}

.app-card-content p {
    font-size: 0.95em;
    line-height: 1.6;
    color: #495057;
    margin-bottom: 15px;
    flex-grow: 1;
}

.app-added-date {
    font-size: 0.85em;
    color: #888;
    margin-bottom: 10px;
    text-align: right; /* 右寄せ */
    border-bottom: 1px dashed #eee; /* 区切り線 */
    padding-bottom: 5px;
}

/* 複数リンクのリスト */
.app-links-list {
    list-style: none;
    padding: 0;
    margin-bottom: 10px;
}
.app-links-list li {
    margin-bottom: 5px;
}
.app-links-list a {
    display: inline-block;
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}
.app-links-list a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.app-card-link-button {
    /* 以前の単一リンクボタンのスタイル。今は主に上記app-links-listを使うが、残しておく */
    display: inline-block;
    background-color: #28a745;
    color: white;
    padding: 12px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    align-self: flex-start;
    margin-top: auto; /* コンテンツ下部に押しやる */
}

.app-card-link-button:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

/* フッター */
footer {
    margin-top: auto;
    padding: 20px;
    font-size: 0.9em;
    color: #888;
    text-align: center;
    width: 100%;
    max-width: 900px;
}

footer a {
    color: #007bff;
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}

/* モーダル（画像拡大表示用ダイアログ）スタイル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    animation: fadeInModal 0.3s ease-out;
}

/* モーダル内のナビゲーションボタン */
.modal-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.8em; /* モーダルなので少し大きく */
    z-index: 1001; /* モーダルのコンテンツより手前 */
    opacity: 0.8;
    transition: opacity 0.2s;
}

.modal-nav-button:hover {
    opacity: 1;
}

.modal-nav-button.prev {
    left: 20px; /* 画面左端から */
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.modal-nav-button.next {
    right: 20px; /* 画面右端から */
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    animation: zoomInModal 0.3s ease-out;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    white-space: pre-wrap; /* テキストの折り返し */
    word-break: break-all;
}

.close-button {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomInModal {
    from { transform: scale(0.8); opacity: 0.8; }
    to { transform: scale(1); opacity: 1; }
}

.license{
    font-size: 0.8em;
    color: #555;
}
.license a{
    color: #555;
}