/* ============================================
   トップページ専用CSS
   ============================================ */

body {
    background-color: #f4faff;
}

/* ============================================
   SNSマーキー
   ============================================ */

.sns-marquee-wrapper {
    overflow: hidden;
    width: 100%;
}

.sns-marquee {
    display: flex;
    gap: 1rem;
    width: max-content;
}

.sns-marquee-left {
    animation: sns-scroll-left 60s linear infinite;
}

.sns-marquee-right {
    animation: sns-scroll-right 60s linear infinite;
}

.sns-marquee-wrapper:hover .sns-marquee {
    animation-play-state: paused;
}

@keyframes sns-scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes sns-scroll-right {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

/* SNSカード */
.sns-card {
    display: block;
    flex-shrink: 0;
    width: 320px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sns-card:hover {
    border-color: #1BACE8;
    box-shadow: 0 4px 12px rgba(27, 172, 232, 0.12);
}

.sns-card-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
}

.sns-card-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #1BACE8, #06b6d4);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.sns-card-avatar-img {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    object-fit: cover;
    flex-shrink: 0;
}

.sns-card-user {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.sns-card-name {
    font-weight: 700;
    font-size: 0.8125rem;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sns-card-handle {
    font-size: 0.75rem;
    color: #94a3b8;
}

.sns-card-xlogo {
    flex-shrink: 0;
    color: #94a3b8;
}

.sns-card-text {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #334155;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.sns-card-date {
    font-size: 0.6875rem;
    color: #94a3b8;
}

@media (max-width: 640px) {
    .sns-card {
        width: 280px;
        padding: 1rem;
    }
}

/* ============================================
   漫画セクション
   ============================================ */

/* Scrollable Track */
.manga-track-wrapper {
    position: relative;
}

.manga-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 8px 4px 20px;
    scrollbar-width: none;
}

.manga-track::-webkit-scrollbar {
    display: none;
}

/* Scroll Arrows (PC only) */
.scroll-arrow {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-60%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #E0F2FE;
    box-shadow: 0 4px 20px rgba(27, 172, 232, 0.12);
    cursor: pointer;
    z-index: 10;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #1BACE8;
    font-size: 18px;
}

.scroll-arrow:hover {
    background: #1BACE8;
    color: #fff;
    border-color: #1BACE8;
    box-shadow: 0 8px 32px rgba(27, 172, 232, 0.22);
}

.scroll-arrow-left { left: -22px; }
.scroll-arrow-right { right: -22px; }

@media (min-width: 768px) {
    .scroll-arrow { display: flex; }
}

/* Manga Card */
.manga-card {
    position: relative;
    flex: 0 0 220px;
    scroll-snap-align: start;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(27, 172, 232, 0.12);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.manga-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 32px rgba(27, 172, 232, 0.22);
}

.manga-card:active {
    transform: translateY(-2px) scale(0.98);
}

.manga-card img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.manga-card:hover img {
    transform: scale(1.05);
}

.theme-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    color: #0284c7;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    line-height: 1;
}

.manga-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 12px 12px;
    background: linear-gradient(to top, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.6) 60%, transparent 100%);
}

.manga-card-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    color: #333;
}

/* Scroll Indicator Dots (mobile only) */
.scroll-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.scroll-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D0E8EF;
    transition: all 0.3s ease;
}

.scroll-dot.active {
    width: 24px;
    border-radius: 4px;
    background: #1BACE8;
}

@media (min-width: 768px) {
    .scroll-dots { display: none; }
}

/* Fullscreen Modal */
.manga-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.manga-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.manga-modal-overlay.fade-in {
    opacity: 1;
}

.modal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    z-index: 10;
}

.modal-title-text {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    opacity: 0.9;
}

.modal-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    backdrop-filter: blur(8px);
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 80px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

@media (max-width: 767px) {
    .modal-image-container {
        align-items: flex-start;
        padding: 56px 8px 72px;
    }
    .modal-image-container img {
        max-height: none;
        width: 100%;
    }
}

.modal-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
}

.modal-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-nav-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.modal-page-indicator {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.8;
    min-width: 60px;
    text-align: center;
}

/* Manga Responsive */
@media (min-width: 768px) {
    .manga-card {
        flex: 0 0 220px;
    }
}

@media (max-width: 767px) {
    .manga-card {
        flex: 0 0 68vw;
    }
    .manga-track {
        padding-left: 16px;
        padding-right: 16px;
        gap: 12px;
    }
    .manga-card-title {
        font-size: 14px;
    }
}
