/* ベース */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #101010;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-image: url('image/background.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 40px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    filter: blur(10px);
    background: linear-gradient(to bottom, rgba(50, 50, 50, 0.7) 0%, rgba(255, 255, 255, 0) 100%),
        url('image.jpg');
    background-size: cover;
    background-position: center;
    filter: blur(8px);
    pointer-events: none;
    z-index: 1;
}

.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    text-align: center;
    z-index: 2;
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.horse-number {
    font-size: 2rem;
    font-weight: bold;
    color: #5654db;
    margin-right: 10px;
}

.horse-name {
    font-size: 2rem;
    color: #ffffff;
}

.profile-details {
    color: #ff6f61;
    text-align: center;
}

.profile-details p {
    font-size: 1rem;
    color: #bbb;
    margin-top: 5px;
}

.sns-links {
    margin-top: 10px;
    display: flex;
    gap: 15px;
}

.sns-button {
    background-color: #3f9e37;
    color: #fff;
    padding: 12px 20px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.sns-button i {
    margin-right: 10px;
    font-size: 1.3rem;
}

.sns-button:hover {
    background-color: #965808;
    transform: translateY(-5px);
}

.sns-button:active {
    background-color: #3f9e37;
    transform: translateY(0);
}

.search-container {
    align-items: center;
    margin-top: 20px;
    width: 100%;
    max-width: 400px;
}

#search-input {
    padding: 12px;
    width: 93%;
    font-size: 16px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 50px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    outline: none;
}

#search-input::placeholder {
    color: #aaa;
}

/* メイン */
main {
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 30px;
}

.cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.card {
    background-color: #222;
    margin: 10px;
    padding: 20px;
    width: 320px;
    border-radius: 15px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    text-align: center;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-10px);
}

.card img {
    width: 100%;
    border-radius: 12px;
    height: 180px;
    object-fit: cover;
    pointer-events: none;
}

.comment p {
    margin-top: 15px;
    font-size: 1.2rem;
    color: #ccc;
}

/* 拡大表示スタイル */
.modal {
    display: none;
    position: fixed;
    z-index: 3;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #333;
    padding: 20px;
    text-align: center;
    border-radius: 15px;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    display: flex;
}

.modal-content img {
    max-width: 90vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
}

.close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #ff6f61;
    text-decoration: none;
    cursor: pointer;
}

/* フッター */
.site-footer {
    background-color: #2c2c2c;
    color: white;
    padding: 20px 0;
    position: relative;
    width: 100%;
    bottom: 0;
    text-align: center;
    flex: 1;
}

/* フッター内部のコンテナ */
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* フッターの著作権情報 */
.footer-container p {
    font-size: 14px;
    margin: 5px 0;
}

/* 薄いテキストスタイル */
.footer-note {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

/* レスポンシブ対応 - スマホ向け */
@media (max-width: 800px) {
    header {
        padding: 20px 10px;
    }

    .profile-container {
        margin-bottom: 10px;
    }

    .profile-header {
        flex-direction: column;
        margin-bottom: 10px;
    }

    .horse-number,
    .horse-name {
        font-size: 1.6rem;
    }
    .sns-links a,
    .sns-links i {
        font-size: 0.8rem;
    }
    .sns-button {
        padding: 5px 14px; /* ボタンのサイズを小さく */
        font-size: 0.9rem; /* フォントサイズを少し小さく */
        border-radius: 15px;
    }

    .search-container {
        width: 100%;
        max-width: 300px; /* 検索バーの幅を調整 */
    }

    #search-input {
        padding: 10px; /* 検索バーの内側の余白を少し小さく */
        font-size: 14px; /* フォントサイズを少し小さく */
    }

    .cards-container {
        display: flex;
        flex-wrap: wrap;  /* カードを横並びにする */
        justify-content: center;
        gap: 10px; /* カードの間隔を調整 */
        
    }

    .card {
        width: 150px; /* カードの幅をスマホ向けに調整 */
        margin: 10px 5px;
        padding: 15px; /* パディングも少し小さくする */
        
    }

    .modal-content img {
        max-width: 80vw;
        max-height: 70vh;
    }

    .site-footer {
        padding: 10px 0;
    }
}

/* レスポンシブ対応 - タブレット向け */
@media (max-width: 1024px) {
    .card {
        width: 300px;
    }

    .sns-button {
        padding: 10px 16px; /* ボタンのサイズを調整 */
        font-size: 1rem; /* フォントサイズを調整 */
    }

    .search-container {
        width: 100%;
        max-width: 350px; /* 検索バーの幅を調整 */
    }

    #search-input {
        padding: 12px; /* 検索バーの内側の余白を調整 */
        font-size: 15px; /* フォントサイズを調整 */
    }
}

