/* Base Styles & Reset */
:root {
    --primary-color: #ff4757;
    --primary-dark: #ff253a;
    --text-main: #333333;
    --text-muted: #666666;
    --bg-main: #ffffff;
    --bg-sub: #f8f9fa;
    --border-color: #eeeeee;
    --gold: #fbc531;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-cta: 0 -4px 16px rgba(0,0,0,0.15);
}

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

body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-sub);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 80px; /* For floating CTA */
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utilities */
.text-gold { color: var(--gold); }
.text-red { color: var(--primary-color); }
.bg-pink { background-color: #ff9ff3; color: #fff; }
.bg-blue { background-color: #48dbfb; color: #fff; }
.bg-orange { background-color: #ff9f43; color: #fff; }
.bg-purple { background-color: #a29bfe; color: #fff; }

/* Header */
.header {
    background-color: #1a1a1a;
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

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

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

/* Main Content Layout */
.main-content {
    max-width: 800px; /* Readability width */
    margin: 0 auto;
    padding: 1rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

/* Ranking Section */
.ranking-section {
    background: var(--bg-main);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ranking-card {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: var(--bg-sub);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.ranking-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--gold);
}

.rank-1 { background: linear-gradient(to right, #fffdf0, #ffffff); border-color: var(--gold); }
.rank-1 .rank-badge { background: var(--gold); color: #fff; font-weight: 700; }

.rank-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--text-muted);
    color: #fff;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-bottom-right-radius: var(--radius-md);
    z-index: 10;
}

.ranking-img-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 1rem;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ranking-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-info {
    flex-grow: 1;
}

.ranking-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.ranking-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Status Bar */
.status-bar {
    background: #fff0f2;
    border: 1px solid #ffd0d5;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.update-time {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 400;
}

/* Article Grid */
.article-section {
    margin-bottom: 2rem;
}

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

@media (min-width: 600px) {
    .article-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

.article-card {
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    transition: transform 0.2s;
}

.article-card:hover {
    transform: translateY(-2px);
}

.thumbnail-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.thumbnail-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .thumbnail-wrapper img {
    transform: scale(1.05);
}

.tag-badge {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0.2rem 0.5rem;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 10;
    border-bottom-right-radius: var(--radius-md);
    box-shadow: none;
}

.article-content {
    padding: 0;
}

.article-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pagination {
    text-align: center;
    margin-top: 2rem;
}

.btn-more {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 0.75rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: background 0.2s;
}

.btn-more:hover {
    background: var(--bg-sub);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 1rem 6rem; /* extra padding for floating cta */
    background: var(--bg-main);
    border-top: 1px solid var(--border-color);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.copyright {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Floating CTA (Affiliate Action) */
.floating-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    box-shadow: var(--shadow-cta);
    z-index: 1000;
    display: flex;
    justify-content: center;
}

.cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 400px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4);
    animation: pulse 2s infinite;
    transition: transform 0.2s;
}

.cta-btn:active {
    transform: scale(0.98);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 71, 87, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
}

@media (min-width: 800px) {
    .floating-cta {
        padding: 1rem 2rem;
    }
    .cta-btn {
        font-size: 1.1rem;
    }
}

/* Article Detail Page */
.article-detail-container {
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

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

.article-title-large {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.article-meta-large {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.article-body {
    font-size: 1rem;
    line-height: 1.8;
}

.article-body img {
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
}

.article-body p {
    margin-bottom: 1rem;
}

.article-cta {
    display: block;
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1.1rem;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
    transition: transform 0.2s;
    text-decoration: none;
}

.article-cta:hover {
    color: #fff;
}

.article-cta:active {
    transform: scale(0.98);
}

/* CTA Button Group for Articles (Affiliate Strategy) */
.article-cta-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
}

@media (min-width: 600px) {
    .article-cta-group {
        flex-direction: column; /* 横並びではなく縦並びにし、SNSリンク集のような自然なUIに */
    }
}

.btn-single, .btn-plan {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-single:active, .btn-plan:active {
    transform: scale(0.98);
}

.btn-single {
    background: var(--bg-main);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    font-weight: 600;
}

.btn-single:hover {
    background: var(--bg-sub);
}

.btn-plan {
    background: #ff6b81; /* ギラギラしたグラデーションから柔らかいピンクへ */
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(255, 107, 129, 0.2);
}

.btn-plan:hover {
    color: #fff;
    background: #ff4757;
    box-shadow: 0 6px 14px rgba(255, 71, 87, 0.3);
}

.btn-title {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.btn-sub {
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 400;
}

.best-rate-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff4757; /* ゴールドからピンクへ */
    color: #fff;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transform: rotate(5deg); /* 傾きを少し抑える */
}

.btn-plan-wrapper {
    position: relative;
    width: 100%;
}
/* Tag Filters */
.tag-filters {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}
.tag-filters::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.tag-btn {
    white-space: nowrap;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    background: #fff;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.tag-btn:before {
    content: "#";
    color: var(--text-muted);
    margin-right: 2px;
}
.tag-btn.active {
    background: #333;
    color: #fff;
    border-color: #333;
}
.tag-btn.active:before {
    color: #fff;
}

/* Article Filter Animation */
.article-card {
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.article-card.hidden {
    display: none;
}

/* Breadcrumbs */
.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.breadcrumb a {
    color: var(--primary-color);
}
.breadcrumb a:hover {
    text-decoration: underline;
}
.breadcrumb span {
    margin: 0 0.5rem;
    color: var(--border-color);
}

/* Creator Profile */
.creator-profile {
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}
.creator-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 3px solid var(--primary-color);
}
.creator-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.creator-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
}
