:root {
    --bg-color: #0F0F14;
    --accent-color: #EA2864;
    /* Pink Default */
    --sub-accent: #EA2864;
    --text-color: #F4F6F9;
    --text-muted: #A0A0B0;
    --card-bg: #1A1A24;
    --font-main: 'Inter', 'Noto Sans JP', sans-serif;
    --container-width: 1200px;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    padding-bottom: 100px;
    /* Player space */
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* --- Header --- */
.header {
    height: var(--header-height);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background-color: rgba(15, 15, 20, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: var(--text-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Search Box */
.search-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 2px 10px;
}

.search-box {
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 5px;
    font-size: 0.9rem;
    outline: none;
    width: 150px;
}

.search-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

/* Theme Toggle */
#theme-toggle {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 5px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    color: var(--accent-color);
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 10px var(--accent-color);
}

/* --- Layout --- */
.layout-wrapper {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* --- Sidebar --- */
.sidebar {
    width: 260px;
    background-color: rgba(15, 15, 20, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px 20px;
    flex-shrink: 0;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
}

.sidebar-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 15px;
    letter-spacing: 0.1em;
}

.sidebar-item {
    padding: 10px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 5px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.sidebar-item:hover,
.sidebar-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-color);
    border-left: 3px solid var(--accent-color);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    font-size: 0.8rem;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    cursor: pointer;
    color: var(--text-muted);
}

.tag-item:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 8px var(--accent-color);
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    padding: 40px;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

/* --- Card --- */
.card {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
    cursor: pointer;
    /* ★クリックできることを示す */
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px var(--accent-color);
}

.card-image {
    width: 100%;
    aspect-ratio: 16/9;
    background: #222;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.card-tag {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 6px;
}

.card-content {
    padding: 15px;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    color: var(--text-color);
}

.card:hover .card-title {
    color: var(--accent-color);
    text-shadow: 0 0 5px var(--accent-color);
}

.card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Badges --- */
.badge-base {
    position: absolute;
    top: 8px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 10;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.new-badge {
    left: 8px;
    background: var(--accent-color);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: pulse-new 2s infinite;
}

.status-badge {
    right: 8px;
    left: auto;
}

.status-upcoming {
    background: #fff;
    color: #000;
    border: 1px solid #000;
}

.status-report {
    background: #2c2c35;
    color: #A0A0B0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes pulse-new {
    0% {
        box-shadow: 0 0 0 0 rgba(234, 40, 100, 0.7);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(234, 40, 100, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(234, 40, 100, 0);
    }
}

/* --- Themes --- */
body.theme-green {
    --accent-color: #06E22C;
    --bg-color: #050614;
    --text-color: #F1F9FC;
    --sub-accent: #DB284F;
}

body.theme-yellow {
    --accent-color: #ffda3a;
    --bg-color: #1e252d;
    --text-color: #ffffff;
    --sub-accent: #000000;
}

body.theme-blue {
    --accent-color: #f0558b;
    --bg-color: #0b1a3a;
    --text-color: #F1F9FC;
    --sub-accent: #00d2ff;
}

/* Theme Overrides */
body[class*="theme-"] .card {
    border-color: var(--accent-color);
    box-shadow: 0 0 5px var(--accent-color);
}

body[class*="theme-"] .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px var(--accent-color);
}

body[class*="theme-"] .sidebar {
    border-right-color: var(--accent-color);
}

body[class*="theme-"] .header {
    border-bottom-color: var(--accent-color);
}

/* --- Music Player --- */
.music-player-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(15px);
    border-top: 1px solid var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 9999;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}

.track-info {
    flex: 1;
    margin-left: 20px;
}

.track-title {
    font-weight: 700;
    color: var(--accent-color);
    font-size: 1rem;
    text-shadow: 0 0 5px var(--accent-color);
}

.track-artist {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.control-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.control-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
}

.main-play {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: scale(1.1);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 15px;
}

#volume-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    box-shadow: 0 0 5px var(--accent-color);
}

/* Visualizer */
.visualizer-container {
    display: flex;
    gap: 3px;
    align-items: flex-end;
    height: 30px;
}

.bar {
    width: 6px;
    height: 10px;
    background: var(--accent-color);
    animation: none;
}

.music-player-dock.playing .bar {
    animation: bounce 1s infinite ease-in-out;
}

.bar:nth-child(1) {
    animation-delay: 0.1s;
}

.bar:nth-child(2) {
    animation-delay: 0.3s;
}

.bar:nth-child(3) {
    animation-delay: 0.5s;
}

.bar:nth-child(4) {
    animation-delay: 0.2s;
}

.bar:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes bounce {

    0%,
    100% {
        height: 10px;
    }

    50% {
        height: 25px;
        box-shadow: 0 0 10px var(--accent-color);
    }
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Article Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-container {
    background: #15151b;
    width: 95%;
    max-width: 1100px;
    height: 90vh;
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    position: relative;
    overflow-y: scroll;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: var(--accent-color);
    color: #000;
}

.modal-header {
    position: relative;
    flex-shrink: 0;
}

.modal-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.modal-title-area {
    padding: 30px 40px 10px;
}

.modal-date {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-right: 15px;
}

.modal-category {
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: bold;
}

.modal-title {
    font-size: 1.8rem;
    margin: 10px 0;
    line-height: 1.3;
    color: var(--text-color);
}

.modal-tags {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.modal-tag-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.modal-body {
    padding: 20px 40px 60px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #d0d0d0;
    white-space: pre-wrap;
}

.modal-container.no-image .modal-image {
    display: none;
}

/* Cyberpunk Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0F0F14;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
}

/* --- Enhanced Content Styles --- */
.modal-body h3 {
    font-size: 1.4rem;
    color: var(--text-color);
    border-left: 5px solid var(--accent-color);
    padding-left: 15px;
    margin-top: 50px;
    margin-bottom: 25px;
    line-height: 1.4;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    padding-top: 5px;
    padding-bottom: 5px;
}

.content-image {
    width: 100%;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Chat Layout */
.talk-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: flex-start;
}

.talk-row-reverse {
    flex-direction: row-reverse;
}

.talk-icon {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 2px solid var(--accent-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    background-color: #000;
}

.talk-bubble {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 10px;
    flex: 1;
    color: #f0f0f0;
    font-size: 0.9rem;
    line-height: 1.5;
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: normal;
}

.talk-row .talk-bubble::before {
    content: '';
    position: absolute;
    top: 12px;
    left: -6px;
    border-right: 6px solid rgba(255, 255, 255, 0.1);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.talk-row-reverse .talk-bubble::before {
    left: auto;
    right: -6px;
    border-right: none;
    border-left: 6px solid rgba(234, 40, 100, 0.25);
}

.guest-bubble {
    background: rgba(234, 40, 100, 0.25);
    border: 1px solid var(--accent-color);
    color: #fff;
}

.guest-bubble strong {
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    padding: 1px 5px;
    border-radius: 4px;
}

.speaker-name {
    display: block;
    font-size: 0.7rem;
    color: var(--accent-color);
    margin-bottom: 0;
    font-weight: 800;
    opacity: 0.9;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.guest-bubble .speaker-name {
    color: #fff;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

/* Link Button */
.link-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 12px 30px;
    background: var(--accent-color);
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 4px 15px rgba(234, 40, 100, 0.4);
    transition: all 0.3s;
}

.link-btn:hover {
    background: #fff;
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* Video Floating */
.video-wrapper {
    min-height: 250px;
    margin: 30px 0;
}

.video-container {
    width: 100%;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    background: #000;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 100;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* フローティング時のスタイル（強化版） */
.video-container.floating {
    position: fixed !important;
    bottom: 120px !important; /* 音楽プレイヤーの上 */
    right: 40px !important;   /* 右端 */
    width: 320px !important;  /* 小さいサイズ */
    height: 180px !important; /* 高さ確保 */
    padding-bottom: 0 !important; /* paddingでの高さ確保をキャンセル */
    margin: 0 !important;
    overflow: visible !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
    border: 2px solid var(--accent-color) !important;
    z-index: 9999 !important; /* 最前面 */
    animation: floatIn 0.4s ease;
    background: #000;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Like Button */
.like-container {
    margin-top: 40px;
    text-align: center;
    padding-bottom: 20px;
}

.like-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.like-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.like-btn.liked {
    background: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-color);
    transform: scale(1.1);
}

.like-icon {
    font-size: 1.3rem;
}