.shospo-random-grid-container {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    height: 400px;
    overflow: hidden;
}

.shospo-channel-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    z-index: 100;
    max-width: 490px;
    height: auto;
    display: block;
}

.shospo-channel-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

@media (max-width: 600px) {
    .shospo-channel-logo {
        max-width: 320px;
    }
}

/* グリッドコンテナ */
.shospo-random-grid {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 460px;
    margin: 0 auto;
    padding: 10px;
    display: block;
    justify-content: center;
    align-content: center;
    justify-items: center;
    align-items: center;
    overflow: hidden;
    opacity: .6;
}

/* グリッドアイテム */
.shospo-grid-item {
    position: absolute;
    display: block;
    width: 200px;
    height: 200px;
    z-index: 1;
    border-radius: 15px;
    overflow: hidden;
    transition: left 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                top 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: default;
    will-change: left, top;
}

/* シャッフリング中のエフェクト */
.shospo-grid-item.shospo-shuffling {
    z-index: 10;
    animation: fadeInOut 0.8s ease-in-out;
}

.shospo-grid-item:hover {
    transform: scale(1.05);
    z-index: 10;
}

.shospo-item-content {
    position: relative;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    overflow: hidden;
}

.shospo-item-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    background-color: #f0f0f0;
}

/* 画像読み込み中の表示 */
.shospo-item-content img:not([src*="data:"]) {
    background: transparent;
}

.shospo-grid-item:hover .shospo-item-content img {
    transform: scale(1.1);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .shospo-random-grid-container {
        padding: 0;
        width: 100%;
        height: 500px;
    }
    
    h1 {
        font-size: 2rem;
        margin-bottom: 20px;
        padding: 0 10px;
    }
    
    .shospo-random-grid {
        height: auto;
        min-height: 450px;
        width: 100%;
        margin: 0 auto;
        padding: 15px;
    }
    
    .shospo-grid-item {
        width: clamp(110px, 15vw, 130px);
        height: clamp(110px, 15vw, 130px);
    }
}

@media (max-width: 480px) {
    .shospo-random-grid-container {
        height: 400px;
    }
    
    .shospo-random-grid {
        height: auto;
        min-height: 350px;
        width: 100%;
        margin: 0 auto;
        padding: 10px;
    }
    
    .shospo-grid-item {
        width: clamp(80px, 12vw, 110px);
        height: clamp(80px, 12vw, 110px);
    }
    
    .shospo-item-content {
        font-size: 1.5rem;
    }
}

@media (max-width: 600px) and (min-width: 481px) {
    .shospo-random-grid-container {
        height: 450px;
    }
    
    .shospo-random-grid {
        min-height: 400px;
        padding: 12px;
    }
    
    .shospo-grid-item {
        width: clamp(95px, 14vw, 120px);
        height: clamp(95px, 14vw, 120px);
    }
}

/* アニメーション効果 */
@keyframes fadeInOut {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 1;
    }
}

@keyframes shuffleEffect {
    0% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.15);
    }
    100% {
        filter: brightness(1);
    }
}

@keyframes floatMove {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0px);
    }
}

.shospo-grid-item {
    /* 初期アニメーションを削除して即座に表示 */
}

.shospo-grid-item.shospo-shuffle-effect {
    animation: shuffleEffect 0.2s ease-in-out;
}

/* カスタムローディングエフェクト */
.shospo-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.shospo-loading::after {
    content: '';
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255,255,255,0.3);
    border-top: 5px solid white;
    border-radius: 50%;
}
