/* Base Styles */
:root {
    --primary-color: #000000;
    --secondary-color: #bd271b;
    --accent-color: #c0b198;
    --light-color: #f8f8f8;
    --dark-color: #1a1a1a;
    --success-color: #27ae60;
    --text-color: #333;
    --text-light: #fff;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f8f9fa;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.main-title {
    font-size: 3rem;
    font-weight: 900;
    text-align: center;
    color: var(--light-color);
    margin-bottom: 2rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    line-height: 1.3;
}

.main-title .highlight {
    color: var(--secondary-color);
    font-weight: 900;
    font-size: 3.2rem;
    display: inline-block;
    transform: scale(1.1);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4), 0 0 20px rgba(189, 39, 27, 0.3);
    position: relative;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--secondary-color);
}

.section-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

.highlight {
    color: var(--secondary-color);
    font-weight: 900;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-color) 100%);
    color: var(--text-light);
    padding: 4rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.hero:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;charset=utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"%3E%3Cpath fill="%23ffffff" fill-opacity="0.05" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,213.3C1248,235,1344,213,1392,202.7L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"%3E%3C/path%3E%3C/svg%3E');
    background-size: cover;
    background-position: center;
    opacity: 0.1;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: center;
}

.book-cover {
    position: relative;
    text-align: center;
}

.book-image {
    max-width: 100%;
    border-radius: 16px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    transform: perspective(1000px) rotateY(5deg);
    transform-style: preserve-3d;
    position: relative;
}

.book-image:hover {
    transform: perspective(1000px) rotateY(10deg) translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.book-image::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.3), transparent);
    transform: translateX(100%) rotateY(90deg);
    transform-origin: left center;
}

.book-badge {
    position: absolute;
    top: -15px;
    left: -15px;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 15px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.8rem;
    box-shadow: var(--box-shadow);
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 1;
    transform: rotate(-15deg);
}

.badge-text {
    line-height: 1.2;
}

/* Hero Benefits */
.hero-benefits {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.achievements {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.achievement-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition);
}

.achievement-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.medal {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.achievement-title {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.achievement-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.benefit-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 1rem 0;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 1.2rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    margin-bottom: 0.8rem;
    border-left: 4px solid var(--accent-color);
}

.benefit-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.benefit-item i {
    font-size: 1.8rem;
    color: var(--success-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.benefit-item span {
    font-weight: 800;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.price-box {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.price-label {
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 0.75rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    font-weight: 800;
    font-size: 1.2rem;
    margin: -1rem -1rem 1rem -1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}

.price-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.original-price, .discount-price {
    display: flex;
    align-items: baseline;
}

.price-text {
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.price-value {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
}

.price-currency {
    font-size: 1.2rem;
    margin-left: 0.25rem;
}

.discount-price .price-value {
    color: var(--secondary-color);
    font-size: 4rem;
    font-weight: 900;
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.7), 
                 0 0 2px rgba(255, 255, 255, 0.7), 
                 0 0 3px rgba(255, 255, 255, 0.7), 
                 0 0 5px rgba(255, 255, 255, 0.5), 
                 0 2px 10px rgba(0, 0, 0, 0.4);
    position: relative;
    display: inline-block;
    z-index: 1;
}

.discount-price .price-text {
    color: var(--accent-color);
    font-weight: 800;
    font-size: 1.4rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    position: relative;
    display: inline-block;
}

.arrow {
    color: var(--accent-color);
    font-size: 1.5rem;
}

/* CTA Section */
.cta-primary {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
}

.cta-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--light-color);
}

.download-form {
    display: flex;
    gap: 0;
    margin: 2rem 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1000;
}

.download-form input[type="email"] {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 1rem;
    outline: none;
    pointer-events: auto;
    user-select: text;
    background-color: white;
    color: #333;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1000;
    cursor: text;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.download-button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1000;
}

.download-button:hover {
    background-color: #a01f16;
    transform: translateY(-2px);
}

.privacy-note {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 1rem;
}

/* Content Section */
.content-section {
    padding: 5rem 0;
    background-color: var(--light-color);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.content-item {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: center;
}

.content-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.content-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.content-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.content-description {
    color: #666;
    font-size: 0.95rem;
}

/* TOC Section */
.toc-section {
    padding: 5rem 0;
    background-color: #f8f9fa;
}

.toc-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
}

.toc-intro {
    margin-bottom: 2rem;
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.toc-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.toc-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.toc-chapter {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.toc-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.toc-subtitle {
    font-style: italic;
    color: #666;
    font-size: 0.95rem;
}

/* Reviews Section */
.reviews-section {
    padding: 5rem 0;
    background-color: #f8f9fa;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.review-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.reviewer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reviewer-avatar {
    font-size: 2rem;
    color: var(--secondary-color);
}

.reviewer-name {
    font-weight: 700;
}

.review-stars {
    color: var(--accent-color);
}

.review-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.review-date {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 1rem;
}

.review-text {
    font-size: 0.95rem;
    color: #444;
}

/* Author Section */
.author-section {
    padding: 5rem 0;
    background-color: var(--secondary-color);
    color: var(--text-light);
}

.author-section .section-title {
    color: var(--text-light);
}

.author-content {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.author-image {
    width: 180px;
    height: auto;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #ffffff;
}

.author-photo {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 4px solid var(--light-color);
    box-shadow: var(--box-shadow);
    display: block;
}

.author-name {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.author-name-en {
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
}

.author-bio {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.author-description {
    font-size: 0.95rem;
    line-height: 1.8;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.testimonial {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1rem;
}

.testimonial-intro {
    margin-bottom: 0.8rem;
}

.testimonial-quote {
    font-style: italic;
    padding-left: 1rem;
    border-left: 3px solid var(--accent-color);
    margin-bottom: 0.8rem;
}

.testimonial-outro {
    margin-top: 0.8rem;
}

/* Final CTA */
.final-cta {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-light);
}

.cta-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-heading {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-subheading {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: var(--text-light);
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.copyright {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    
    .book-cover {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .author-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .main-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .download-form {
        flex-direction: column;
    }
    
    .download-form input[type="email"] {
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }
    
    .download-button {
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
    
    .achievements {
        flex-direction: column;
    }
    
    .cta-heading {
        font-size: 2rem;
    }
    
    .toc-container {
        padding: 1.5rem;
    }
    
    .toc-title {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .main-title {
        font-size: 1.8rem;
    }
    
    .content-grid, .reviews-grid {
        grid-template-columns: 1fr;
    }
    
    .price-content {
        flex-direction: column;
    }
    
    .arrow {
        transform: rotate(90deg);
    }
}

/* Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.download-button {
    animation: pulse 2s infinite;
}

.download-button:hover {
    animation: none;
}

/* 規約セクションのスタイル */
.terms-section {
    margin: 20px 0;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.terms-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.terms-content {
    max-height: 300px;
    min-height: 200px;
    overflow-y: scroll !important;
    overflow-x: hidden;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #ddd;
    position: relative;
    display: block;
    box-sizing: border-box;
}

.terms-text {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    height: auto;
    min-height: 400px;
    display: block;
}

.terms-text h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 20px 0 10px 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.terms-text p {
    margin: 10px 0;
    display: block;
}

/* Webkit browsers (Chrome, Safari, Edge) */
.terms-content::-webkit-scrollbar {
    width: 12px;
    display: block;
}

.terms-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

.terms-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 6px;
    border: 2px solid #f1f1f1;
}

.terms-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Firefox */
.terms-content {
    scrollbar-width: auto;
    scrollbar-color: #888 #f1f1f1;
}

.terms-agreement {
    text-align: center;
    margin-bottom: 15px;
    order: -1;
}

/* カスタムチェックボックス */
.checkbox-container {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    user-select: none;
    max-width: 100%;
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkmark {
    position: relative;
    height: 20px;
    width: 20px;
    background-color: white;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.checkbox-container:hover .checkmark {
    border-color: #007bff;
}

.checkbox-container input[type="checkbox"]:checked ~ .checkmark {
    background-color: #007bff;
    border-color: #007bff;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input[type="checkbox"]:checked ~ .checkmark:after {
    display: block;
}

.checkbox-text {
    color: #555;
    font-weight: 500;
}

/* ダウンロードボタンの無効状態 */
.download-button:disabled {
    background-color: #ccc !important;
    cursor: not-allowed !important;
    opacity: 0.5 !important;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
}

.download-button:disabled:hover {
    background-color: #ccc !important;
    transform: none !important;
    box-shadow: none !important;
}

.download-button:disabled:active {
    transform: none !important;
}

/* 無効状態でのアニメーション停止 */
.download-button:disabled * {
    animation: none !important;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .terms-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    .terms-content {
        max-height: 250px;
        min-height: 150px;
        padding: 10px;
    }
    
    .terms-text {
        min-height: 300px;
    }
    
    .terms-title {
        font-size: 16px;
    }
    
    .terms-text {
        font-size: 13px;
    }
    
    .checkbox-container {
        font-size: 13px;
        text-align: left;
    }
    
    .checkmark {
        height: 18px;
        width: 18px;
        margin-right: 8px;
    }
    
    .checkmark:after {
        left: 5px;
        top: 1px;
        width: 5px;
        height: 10px;
    }
    
    .download-button:disabled {
        opacity: 0.4 !important;
    }
    
    .terms-content::-webkit-scrollbar {
        width: 8px;
    }
}

/* フォーム内の注意書き */
.form-notice {
    font-size: 14px;
    color: #666;
    margin: 10px 0 15px 0;
    text-align: center;
    line-height: 1.5;
    font-weight: 500;
}

/* ダークな背景の場合の注意書き */
.final-cta .form-notice {
    color: rgba(255, 255, 255, 0.9);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .form-notice {
        font-size: 13px;
        margin: 8px 0 12px 0;
    }
}
