/* css/style.css */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #0f172a;
    color: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
}

/* --- 1. ヘッダーUI（ログイン状態表示） --- */
header {
    background-color: #1e293b;
    padding: 12px 16px;
    border-bottom: 1px solid #334155;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.logo {
    font-size: 13pt;
    font-weight: 800;
    color: #3b82f6;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.user-status-area {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 9pt;
}

.badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 8pt;
    font-weight: 700;
    color: #fff;
}

.badge-god {
    background: #eab308;
    color: #0f172a;
} /* Lv.3 金色 */

.badge-regular {
    background: #3b82f6;
} /* Lv.2 青色 */

.badge-intermediate {
    background: #8b5cf6;
    color: #fff;
}/* Lv.1.5 灰色 */

.badge-restricted {
    background: #64748b;
} /* Lv.1 灰色 */

.badge-guest {
    background: #ef4444;
} /* Lv.0 赤色 */

.btn-auth {
    color: #3b82f6;
    text-decoration: none;
    border: 1px solid #3b82f6;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-auth:hover {
    background: #3b82f6;
    color: #fff;
}

.btn-logout {
    color: #94a3b8;
    text-decoration: none;
    font-size: 8.5pt;
    margin-left: 4px;
}

.btn-logout:hover {
    color: #f87171;
}

/* --- 2. サムネイルグリッド --- */
.main-content {
    max-width: 1200px;
    margin: 16px auto;
    padding: 0 12px;
}

.section-title {
    font-size: 10.5pt;
    font-weight: 700;
    margin-bottom: 14px;
    color: #94a3b8;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.short-card {
    background: #1e293b;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
    border: 1px solid #334155;
    position: relative;
}

.short-card:hover {
    transform: translateY(-3px);
    border-color: #475569;
}

.thumb-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
    position: relative;
}

.play-overlay-icon {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 8pt;
}

.card-info {
    padding: 8px;
}

.card-title {
    font-size: 9.5pt;
    font-weight: 700;
    line-height: 1.3;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 3px;
    height: 2.6em;
}

.card-author {
    font-size: 8pt;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- 3. 縦スワイププレイヤー --- */
#player-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 100;
    display: none;
}

.close-player-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 110;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 9.5pt;
    backdrop-filter: blur(8px);
}

.v-container {
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
}

.v-container::-webkit-scrollbar {
    display: none;
}

.slide {
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 24px;
    overflow: hidden;
    background: #09090b;
}

.slide-bg {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-size: cover;
    background-position: center;
    filter: blur(40px) brightness(0.4);
    z-index: 1;
}

.player-content-wrapper {
    z-index: 2;
    position: relative;
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.player-jacket {
    width: 70vw;
    max-width: 240px;
    aspect-ratio: 9 / 16;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.7);
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.info-container {
    color: #ffffff;
    width: 100%;
    margin-bottom: 32px;
}

.author {
    font-size: 10pt;
    font-weight: 600;
    color: #60a5fa;
    margin-bottom: 4px;
}

.title {
    font-size: 13pt;
    font-weight: 700;
    line-height: 1.4;
}

.controls {
    display: flex;
    justify-content: center;
    width: 100%;
}

.play-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #0f172a;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* --- 4. 視聴制限ポップアップ警告 --- */
.limit-notice {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    text-align: center;
    display: none;
}

.limit-notice h4 {
    font-size: 13pt;
    color: #ef4444;
    margin-bottom: 12px;
}

.limit-notice p {
    font-size: 9.5pt;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 20px;
}

.empty-state {
    padding: 40px;
    text-align: center;
    color: #64748b;
    font-size: 11pt;
}