/*
Theme Name: MGS Affiliate Theme
Theme URI: https://example.com/mgs-theme
Author: Antigravity Team
Description: MGSアフィリエイトブログ特化のダークモードレスポンシブテーマ。
Version: 1.7.0
*/

:root {
    --bg-color: #0b0f19;
    --card-bg: #151c2c;
    --card-bg-subtle: #1c2538;
    --accent-red: #ff3366;
    --accent-purple: #8b5cf6;
    --accent-blue: #38bdf8;
    --accent-gold: #f59e0b;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --border-color: #1e293b;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 75px;
}

a {
    color: var(--accent-red);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.85;
}

/* Header */
.site-header {
    background: rgba(21, 28, 44, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 14px 0;
}

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

.site-title {
    font-size: 24px;
    font-weight: 900;
    background: linear-gradient(135deg, #ff3366 0%, #ff6b8b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.header-sub-title {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.breadcrumbs a {
    color: var(--text-secondary);
}

.breadcrumbs a:hover {
    color: var(--accent-blue);
}

/* Layout */
.container {
    max-width: 1100px;
    margin: 25px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 900px) {
    .container {
        grid-template-columns: 2.8fr 1.2fr;
    }
}

.main-content {
    min-width: 0;
}

/* Contact Form Styles */
.mgs-contact-form-wrapper,
.wpcf7 {
    background: var(--card-bg-subtle);
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
}

.mgs-contact-success-msg {
    background: #15803d;
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 14px;
}

.mgs-form-field {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

.mgs-form-field label {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
}

.mgs-form-field label .required {
    color: var(--accent-red);
}

.mgs-form-field input[type="text"],
.mgs-form-field input[type="email"],
.mgs-form-field textarea,
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
    width: 100%;
    background: #0f172a;
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.mgs-form-field input:focus,
.mgs-form-field textarea:focus,
.wpcf7 input:focus,
.wpcf7 textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.mgs-contact-submit-btn,
.wpcf7 input[type="submit"] {
    background: linear-gradient(135deg, #ff3366 0%, #f85149 100%);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mgs-contact-submit-btn:hover,
.wpcf7 input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 51, 102, 0.4);
}

/* Archives & Cards */
.archive-header-box {
    margin-bottom: 25px;
    padding: 15px 20px;
    background: var(--card-bg);
    border-radius: 12px;
}

.archive-header-title {
    font-size: 22px;
    color: #fff;
}

.post-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.post-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.post-card-inner {
    display: flex;
    flex-direction: column;
}

.post-thumbnail-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #000;
}

.post-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-content-preview {
    padding: 20px;
}

.post-meta-badges {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.meta-product-id {
    color: var(--accent-blue);
    font-weight: bold;
}

.meta-actress-name {
    color: #ff7b72;
    font-weight: bold;
}

.meta-rating-score {
    color: var(--accent-gold);
    font-weight: bold;
}

.post-card-title {
    font-size: 19px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.post-card-title a {
    color: #fff;
}

.post-excerpt-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Spec Table (Optimized for Mobile) */
.mgs-spec-table-box {
    background: #0f172a;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.mgs-spec-title {
    font-size: 18px;
    color: #fff;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-red);
}

.mgs-spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed;
}

.mgs-spec-table th {
    background: #1e293b;
    color: var(--accent-blue);
    width: 28%;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    vertical-align: middle;
    word-break: keep-all;
    white-space: nowrap;
}

.mgs-spec-table td {
    padding: 10px 12px;
    color: var(--text-primary);
    vertical-align: middle;
    word-break: break-word;
}

/* Mobile Responsive Optimization for Spec Table */
@media (max-width: 640px) {
    .mgs-spec-table-box {
        padding: 14px 12px;
    }
    
    .mgs-spec-title {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .mgs-spec-table {
        font-size: 13px;
    }

    .mgs-spec-table th {
        width: 32%;
        padding: 8px 10px;
        font-size: 12px;
    }

    .mgs-spec-table td {
        padding: 8px 10px;
        font-size: 13px;
    }
}

.mgs-badge-spec {
    background: #238636;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

.actress-highlight {
    color: #ff7b72;
    font-weight: bold;
}

/* Automatic Table of Contents (TOC) */
.mgs-toc-box {
    background: var(--card-bg-subtle);
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 30px;
}

.mgs-toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.mgs-toc-title {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
}

.mgs-toc-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    border: none !important;
}

.mgs-toc-list li {
    margin-bottom: 6px;
    font-size: 14px;
}

.mgs-toc-list li.toc-level-3 {
    margin-left: 18px;
    font-size: 13px;
}

.mgs-toc-list a {
    color: var(--text-primary);
    text-decoration: none;
}

.mgs-toc-list a:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

/* Single Post Content */
.single-post-wrapper {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .single-post-wrapper {
        padding: 35px;
    }
}

.entry-header-box {
    margin-bottom: 20px;
}

.entry-title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 15px;
}

@media (min-width: 768px) {
    .entry-title {
        font-size: 30px;
    }
}

.single-post-thumbnail-box {
    margin-bottom: 25px;
    border-radius: 12px;
    overflow: hidden;
}

.single-thumbnail-img {
    width: 100%;
    height: auto;
    display: block;
}

.entry-content {
    font-size: 16px;
    line-height: 1.8;
}

.entry-content h2 {
    font-size: 20px;
    border-left: 4px solid var(--accent-red);
    background: linear-gradient(90deg, rgba(255, 51, 102, 0.1) 0%, transparent 100%);
    padding: 8px 14px;
    border-radius: 0 8px 8px 0;
    margin: 35px 0 15px;
    color: #fff;
}

.entry-content h3 {
    font-size: 17px;
    margin: 25px 0 10px;
    color: var(--accent-blue);
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content ul {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px 20px 15px 35px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.entry-content ul li {
    margin-bottom: 8px;
}

/* Social Share Buttons */
.social-share-buttons {
    display: flex;
    gap: 10px;
    margin: 30px 0 20px;
    flex-wrap: wrap;
    align-items: center;
}

.social-share-label {
    font-size: 13px;
    font-weight: bold;
    color: var(--text-secondary);
}

.share-btn {
    padding: 8px 16px;
    border-radius: 20px;
    color: #fff !important;
    font-size: 13px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.share-btn.x-twitter { background: #000; }
.share-btn.line { background: #06c755; }
.share-btn.hatena { background: #008fde; }

/* Related Posts */
.related-posts-section {
    margin-top: 35px;
    padding-top: 20px;
    background: rgba(255, 255, 255, 0.015);
    border-radius: 12px;
    padding: 20px;
}

.related-posts-title {
    font-size: 18px;
    color: #fff;
    margin-bottom: 15px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.related-post-card {
    background: var(--card-bg-subtle);
    border-radius: 8px;
    overflow: hidden;
    padding: 10px;
    transition: transform 0.2s ease;
}

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

.related-post-thumb {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.related-post-card-title {
    font-size: 13px;
    margin-top: 8px;
    line-height: 1.4;
}

.related-post-card-title a {
    color: #fff;
}

/* Sticky Floating Bottom CTA Bar */
.sticky-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 51, 102, 0.3);
    padding: 12px 20px;
    z-index: 999;
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.6);
}

.sticky-cta-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.sticky-cta-text {
    display: none;
    flex-direction: column;
}

@media (min-width: 640px) {
    .sticky-cta-text {
        display: flex;
    }
}

.cta-badge {
    font-size: 11px;
    color: #ff7b72;
    font-weight: bold;
}

.cta-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 450px;
}

.sticky-cta-button {
    flex: 1;
    max-width: 380px;
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #ff3366 0%, #f85149 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 800;
    font-size: 15px;
    padding: 12px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(255, 51, 102, 0.5);
    transition: all 0.3s ease;
    margin-left: auto;
}

.sticky-cta-button:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(255, 51, 102, 0.7);
}

/* Sidebar & Widgets */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.widget {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-red);
    color: #fff;
}

/* Search Box Widget */
.search-form {
    display: flex;
    gap: 8px;
}

.search-form input[type="search"] {
    flex: 1;
    background: #0f172a;
    border: none;
    color: #fff;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
}

.search-form button {
    background: var(--accent-red);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

/* Ranking Widget (Entire Card Clickable) */
.ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ranking-item {
    margin-bottom: 12px;
    background: var(--card-bg-subtle);
    border-radius: 8px;
    overflow: hidden;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-item:hover {
    background: #232d44;
    transform: translateY(-2px);
}

.ranking-card-link {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px;
    width: 100%;
    text-decoration: none !important;
    color: inherit !important;
}

.rank-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #334155;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.rank-badge.rank-1 { background: #f59e0b; color: #000; }
.rank-badge.rank-2 { background: #94a3b8; color: #000; }
.rank-badge.rank-3 { background: #b45309; color: #fff; }

.rank-thumb-box {
    flex-shrink: 0;
}

.rank-thumb-img {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.rank-title-box {
    font-size: 13px;
    line-height: 1.35;
    flex: 1;
}

.rank-title-text {
    color: #fff;
    font-weight: 600;
    display: block;
}

.rank-meta-rating {
    font-size: 11px;
    color: var(--accent-gold);
    margin-top: 3px;
}

/* EEAT Profile Card */
.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6 0%, #ff3366 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.profile-info h4 {
    font-size: 16px;
    color: #fff;
    margin-bottom: 6px;
}

.profile-bio {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 10px;
}

.eeat-badges {
    list-style: none;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #38bdf8;
    text-align: left;
}

/* Banner Widget */
.banner-box {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.banner-tag {
    background: var(--accent-red);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 10px;
}

.banner-content h4 {
    font-size: 15px;
    color: #fff;
    margin: 8px 0 4px;
}

.banner-content p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 50px;
}

.footer-subtext {
    font-size: 11px;
    margin-top: 5px;
    color: var(--text-secondary);
}
