/* ===== CSS Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* フラットカラーパレット */
    --accent: #f5a623;
    --accent-hover: #e09515;
    --accent-light: rgba(245, 166, 35, 0.12);
    --bg-primary: #faf9f7;
    --bg-secondary: #ffffff;
    --bg-dark: #1a1a2e;
    --bg-dark-secondary: #16213e;
    --text-primary: #1a1a2e;
    --text-secondary: #5a5a72;
    --text-muted: #8e8ea0;
    --text-on-dark: #e8e8ed;
    --border: #e8e6e1;
    --border-light: #f0eeea;
    --youtube-red: #ff4444;
    --success: #27ae60;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 3px rgba(26, 26, 46, 0.06);
    --shadow-md: 0 4px 16px rgba(26, 26, 46, 0.08);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== ヘッダー / ナビゲーション ===== */
header {
    background-color: var(--bg-dark);
    color: #fff;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity var(--transition);
}
.logo:hover { opacity: 0.85; }

.logo-icon {
    width: 28px;
    height: 28px;
    background-color: var(--accent);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
}

nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background var(--transition), color var(--transition);
    color: var(--text-on-dark);
    user-select: none;
}
.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent);
}
.nav-link.active {
    color: var(--accent);
}

/* モバイルメニュー */
.menu-toggle {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    color: #fff;
    padding: 0.5rem;
}
.menu-toggle svg {
    width: 24px;
    height: 24px;
}

/* ===== ページコンテナ ===== */
.page-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

/* ===== ボタン ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.8rem 1.75rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--accent);
    color: #fff;
}
.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.3);
}

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

.btn svg {
    width: 18px;
    height: 18px;
}

/* ===== ヒーローセクション ===== */
.hero {
    text-align: center;
    padding: 5rem 0 3rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.375rem 1rem;
    border-radius: 100px;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===== アラートバナー ===== */
.alert-section {
    margin: 2rem 0 3rem;
}

.alert-card {
    background: var(--bg-dark);
    color: var(--text-on-dark);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.alert-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(255, 68, 68, 0.15);
    color: var(--youtube-red);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.alert-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.alert-content p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
}

.alert-highlight {
    color: var(--accent);
    font-weight: 600;
}

/* ===== 特徴セクション ===== */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.section-description {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin-bottom: 2.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all var(--transition);
}
.feature-card:hover {
    border-color: var(--border);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1.25rem;
}

.feature-icon.youtube { background: rgba(255, 68, 68, 0.1); }
.feature-icon.speed   { background: rgba(52, 152, 219, 0.1); }
.feature-icon.free    { background: rgba(39, 174, 96, 0.1); }
.feature-icon.queue   { background: rgba(155, 89, 182, 0.1); }
.feature-icon.stable  { background: rgba(245, 166, 35, 0.1); }
.feature-icon.easy    { background: rgba(241, 196, 15, 0.1); }

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== コマンド紹介セクション ===== */
.commands-section {
    margin-top: 4rem;
}

.command-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.command-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    transition: border-color var(--transition);
}
.command-item:hover {
    border-color: var(--border);
}

.command-name {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-light);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    flex-shrink: 0;
}

.command-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ===== CTAセクション ===== */
.cta-section {
    margin-top: 4rem;
    text-align: center;
    background: var(--bg-dark);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
}

.cta-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

.cta-section p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2rem;
}

/* ===== 規約 & ポリシーページ ===== */
.document-page {
    padding-top: 2rem;
}

.document-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.document-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.document-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.document-body h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

.document-body p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.document-body ul {
    margin-bottom: 1rem;
    padding-left: 1.25rem;
}

.document-body li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    line-height: 1.7;
}

.document-body li::marker {
    color: var(--accent);
}

.document-note {
    background: var(--accent-light);
    border-left: 3px solid var(--accent);
    padding: 1rem 1.25rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1.5rem 0;
}

.document-note p {
    color: var(--text-primary);
    font-size: 0.9rem;
    margin: 0;
}

.back-to-home {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: color var(--transition);
}
.back-to-home:hover {
    color: var(--accent);
}
.back-to-home svg {
    width: 16px;
    height: 16px;
}

/* ===== フッター ===== */
footer {
    background: var(--bg-dark);
    color: var(--text-on-dark);
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-brand .logo {
    font-size: 1.1rem;
}

.footer-brand p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
}

.footer-links {
    display: flex;
    gap: 2.5rem;
}

.footer-col h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 0.75rem;
}

.footer-col a {
    display: block;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.4rem;
    cursor: pointer;
    transition: color var(--transition);
}
.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    max-width: 960px;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
}

/* ===== スクロールアニメーション ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
    header {
        padding: 0 1.25rem;
    }

    .menu-toggle {
        display: block;
    }

    nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 0.5rem 1rem 1rem;
        gap: 0;
        transform: translateY(-100%);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
        pointer-events: none;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .nav-link {
        width: 100%;
        text-align: left;
        padding: 0.75rem 1rem;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .command-list {
        grid-template-columns: 1fr;
    }

    .alert-card {
        flex-direction: column;
        padding: 2rem 1.5rem;
    }

    .footer-inner {
        flex-direction: column;
    }

    .footer-links {
        flex-direction: column;
        gap: 1.5rem;
    }

    .page-inner {
        padding: 2rem 1.25rem 3rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 0 2rem;
    }
    .hero h1 {
        font-size: 1.75rem;
    }
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .btn {
        justify-content: center;
    }
}
