/* 東京セキュリティブリーフィング - メインスタイル */
/* サイバーセキュリティをテーマにしたダークモダンデザイン */

/* 廻想体フォント */
@font-face {
    font-family: 'Kaisotai';
    src: url('/assets/fonts/Kaisotai-Next-UP-B.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* ダークテーマカラー */
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #1a2332;
    --bg-card-hover: #222d3f;

    /* アクセントカラー（サイバーグリーン/シアン） */
    --accent-primary: #00d4aa;
    --accent-secondary: #00b4d8;
    --accent-tertiary: #7c3aed;
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));

    /* テキストカラー */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* ステータスカラー */
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* ボーダー */
    --border-color: #1e293b;
    --border-glow: rgba(0, 212, 170, 0.3);

    /* シャドウ */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(0, 212, 170, 0.15);

    /* フォント */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-title: 'Kaisotai', 'Noto Sans CJK JP', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

    /* トランジション */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
}

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
}

/* 背景パターン（グリッド） */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 212, 170, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 170, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* リンク */
a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-secondary);
}

/* ========================================
   ヘッダー
======================================== */
.site-header {
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.site-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-logo::before {
    content: '';
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-logo h1 {
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.site-nav ul {
    display: flex;
    list-style: none;
    gap: 8px;
}

.site-nav a {
    display: block;
    padding: 8px 16px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.site-nav a:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.site-nav .rss-link {
    color: var(--warning);
}

.site-nav .rss-link:hover {
    background: rgba(245, 158, 11, 0.1);
}

/* 検索フォーム */
.header-search {
    display: flex;
    align-items: center;
}

.search-input {
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px 0 0 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 200px;
    transition: all var(--transition-fast);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--border-glow);
    width: 260px;
}

.search-btn {
    padding: 10px 14px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 0 8px 8px 0;
    color: var(--bg-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all var(--transition-fast);
}

.search-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* ========================================
   メインコンテンツ
======================================== */
.site-main {
    padding: 48px 0;
    min-height: calc(100vh - 200px);
}

/* ========================================
   ヒーローセクション
======================================== */
.hero {
    text-align: center;
    padding: 80px 24px;
    margin: -48px -24px 48px;
    background:
        radial-gradient(ellipse at top, rgba(0, 212, 170, 0.15), transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(124, 58, 237, 0.1), transparent 50%),
        var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(0, 212, 170, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 170, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.5;
}

.hero h1 {
    font-family: var(--font-title);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 0.02em;
    position: relative;
}

.hero h1 span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.hero-subscribe {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
}

/* ========================================
   ボタン
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--bg-primary);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 212, 170, 0.3);
    color: var(--bg-primary);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-download {
    background: var(--success);
    color: white;
}

.btn-download:hover {
    background: #16a34a;
    color: white;
}

/* ========================================
   エピソード一覧
======================================== */
.episodes-section h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.episodes-section h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.episodes-list {
    display: grid;
    gap: 16px;
}

/* エピソードカード */
.episode-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.episode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.episode-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(0, 212, 170, 0.3);
    box-shadow: var(--shadow-glow);
    transform: translateX(4px);
}

.episode-card:hover::before {
    opacity: 1;
}

.episode-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.episode-type {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.episode-type-daily {
    background: rgba(0, 212, 170, 0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(0, 212, 170, 0.3);
}

.episode-type-weekly_column {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.episode-type-weekly_summary {
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent-tertiary);
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.episode-meta time {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.episode-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.episode-title a {
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.episode-title a:hover {
    color: var(--accent-primary);
}

.episode-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.6;
}

.episode-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.episode-duration {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 6px;
}

.episode-duration::before {
    content: '';
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ========================================
   エピソード詳細
======================================== */
.episode-detail {
    max-width: 900px;
    margin: 0 auto;
}

.episode-header {
    margin-bottom: 32px;
}

.episode-header .episode-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.3;
}

.episode-header .episode-description {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* プレーヤー */
.episode-player {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-md);
}

.audio-player {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 8px;
    background: var(--bg-secondary);
}

.audio-player::-webkit-media-controls-panel {
    background: var(--bg-secondary);
}

.episode-info {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.info-item {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-item strong {
    color: var(--text-muted);
    font-weight: 500;
}

/* トークスクリプト */
.episode-script {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-md);
}

.episode-script h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.episode-script h2::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.script-content {
    line-height: 1.9;
    color: var(--text-secondary);
}

.script-content p {
    margin-bottom: 1.2em;
}

.script-content .script-heading {
    color: var(--text-primary);
    font-weight: 600;
    margin-top: 2em;
    margin-bottom: 1em;
}

.script-content h3.script-heading {
    font-size: 1.3rem;
    color: var(--accent-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.script-content h4.script-heading {
    font-size: 1.15rem;
    color: var(--text-primary);
}

.script-content h5.script-heading {
    font-size: 1rem;
    color: var(--text-secondary);
}

.script-content .script-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 2.5em 0;
}

.episode-footer {
    padding-top: 24px;
}

/* ========================================
   ページネーション
======================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.pagination a {
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--accent-primary);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.pagination a:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
}

.pagination-info {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ========================================
   フッター
======================================== */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 64px 0 32px;
    margin-top: 64px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 48px;
    margin-bottom: 48px;
}

.footer-about h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-about p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-subscribe h4,
.footer-links h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.footer-content ul {
    list-style: none;
}

.footer-content li {
    margin-bottom: 10px;
}

.footer-content a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-content a:hover {
    color: var(--accent-primary);
}

.footer-copyright {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ========================================
   About ページ
======================================== */
.about-page h1 {
    font-family: var(--font-title);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 32px;
    letter-spacing: 0.02em;
}

.about-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.about-section h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-section h2::before {
    content: '';
    width: 3px;
    height: 18px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.about-section p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.schedule-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    transition: all var(--transition-fast);
}

.schedule-item:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.schedule-item h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--accent-primary);
}

.schedule-item p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.subscribe-list {
    list-style: none;
}

.subscribe-list li {
    margin-bottom: 12px;
}

.subscribe-list a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-primary);
    font-weight: 500;
}

/* ========================================
   エラーページ
======================================== */
.error-page {
    text-align: center;
    padding: 80px 24px;
}

.error-page h1 {
    font-size: 6rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.error-page p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* ========================================
   検索ページ
======================================== */
.search-page h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 28px;
}

.search-form-large {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.search-input-large {
    flex: 1;
    padding: 14px 20px;
    font-size: 1rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.search-input-large::placeholder {
    color: var(--text-muted);
}

.search-input-large:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px var(--border-glow);
}

.search-results-info {
    color: var(--text-muted);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.no-results {
    text-align: center;
    padding: 64px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-muted);
}

.no-results p {
    margin-bottom: 12px;
}

.search-tips {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
}

.search-tips h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--accent-primary);
}

.search-tips ul {
    list-style: none;
}

.search-tips li {
    padding: 10px 0;
    padding-left: 24px;
    position: relative;
    color: var(--text-secondary);
}

.search-tips li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
}

/* ========================================
   レスポンシブ
======================================== */
@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        gap: 16px;
    }

    .site-nav ul {
        gap: 4px;
    }

    .site-nav a {
        padding: 8px 12px;
    }

    .header-search {
        width: 100%;
        order: 3;
    }

    .search-input {
        flex: 1;
        width: auto;
    }

    .search-input:focus {
        width: auto;
    }

    .hero {
        padding: 48px 20px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-subscribe {
        flex-direction: column;
        align-items: center;
    }

    .hero-subscribe .btn {
        width: 100%;
        max-width: 280px;
    }

    .episode-header .episode-title {
        font-size: 1.4rem;
    }

    .episode-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .search-form-large {
        flex-direction: column;
    }

    .search-page h1 {
        font-size: 1.4rem;
    }

    .footer-content {
        gap: 32px;
    }
}

/* ========================================
   アニメーション
======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.episode-card {
    animation: fadeIn 0.4s ease forwards;
}

.episode-card:nth-child(1) { animation-delay: 0.05s; }
.episode-card:nth-child(2) { animation-delay: 0.1s; }
.episode-card:nth-child(3) { animation-delay: 0.15s; }
.episode-card:nth-child(4) { animation-delay: 0.2s; }
.episode-card:nth-child(5) { animation-delay: 0.25s; }

/* スクロールバー */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* セレクション */
::selection {
    background: rgba(0, 212, 170, 0.3);
    color: var(--text-primary);
}
