/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* スクロールトップボタン */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* 基本スタイル */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    min-height: 100vh;
}

/* ヘッダー */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 28px;
    font-weight: bold;
}

/* コンテンツエリア */
.content {
    padding: 30px 20px;
}

/* ステップインジケーター */
.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 150px;
    padding: 10px;
    text-align: center;
    background-color: #e0e0e0;
    color: #666;
    position: relative;
    margin: 5px;
    border-radius: 5px;
}

.step.active {
    background-color: #667eea;
    color: white;
    font-weight: bold;
}

.step.completed {
    background-color: #48bb78;
    color: white;
}

/* 説明文 */
.instruction {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 30px;
}

.instruction p {
    margin-bottom: 10px;
}

.instruction p:last-child {
    margin-bottom: 0;
}

/* 質問テーブル */
.question-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.question-table thead {
    background-color: #667eea;
    color: white;
}

.question-table th,
.question-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
}

.question-table tr.odd {
    background-color: #f9f9f9;
}

.question-table tr.even {
    background-color: #fff;
}

.question-table td.center {
    text-align: center;
}

.question-table label {
    display: inline-block;
    margin: 0 10px;
    cursor: pointer;
}

.question-table input[type="radio"] {
    margin-right: 5px;
    cursor: pointer;
}

/* フォームテーブル */
.form-section {
    margin-bottom: 40px;
}

.form-section h2 {
    font-size: 20px;
    color: #667eea;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.form-table {
    width: 100%;
    border-collapse: collapse;
}

.form-table th,
.form-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.form-table th {
    width: 30%;
    background-color: #f5f5f5;
    font-weight: normal;
}

.form-table input[type="text"],
.form-table input[type="email"],
.form-table input[type="tel"],
.form-table input[type="number"] {
    width: 100%;
    max-width: 400px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-table input[type="radio"] {
    margin-right: 5px;
}

.form-table label {
    display: inline-block;
    margin-right: 15px;
    cursor: pointer;
}

/* 個人情報取り扱い */
.privacy-notice {
    background-color: #f0f8ff;
    border: 1px solid #4a90e2;
    border-radius: 5px;
    padding: 20px;
    margin: 30px 0;
}

.privacy-notice h3 {
    font-size: 16px;
    color: #4a90e2;
    margin-bottom: 10px;
}

.privacy-notice p {
    margin-bottom: 8px;
    font-size: 13px;
}

/* 確認テーブル */
.confirm-section {
    margin-bottom: 30px;
}

.confirm-section h3 {
    font-size: 18px;
    color: #667eea;
    margin-bottom: 15px;
}

.confirm-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.confirm-table th,
.confirm-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.confirm-table th {
    width: 30%;
    background-color: #f5f5f5;
    font-weight: normal;
}

/* 書籍PR */
.book-promotion {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

.book-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.book-image {
    flex-shrink: 0;
}

.book-cover {
    width: 120px;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.book-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
}

.book-text p {
    margin: 8px 0;
}

.book-text a {
    color: #007bff;
    font-weight: bold;
    text-decoration: none;
}

.book-text a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .book-content {
        flex-direction: column;
        text-align: center;
    }
    
    .book-cover {
        width: 100px;
    }
}

/* 診断後フィードバック */
.feedback-section {
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.feedback-section h3 {
    margin-bottom: 15px;
    color: #495057;
    font-size: 18px;
}

.feedback-input {
    margin-bottom: 15px;
}

.feedback-input textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
}

.feedback-buttons {
    text-align: center;
}

.feedback-buttons .btn {
    min-width: 180px;
}

/* ボタン */
.button-container {
    text-align: center;
    margin-top: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    margin: 0 10px;
    font-size: 16px;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-primary:hover {
    background-color: #5a67d8;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-success {
    background-color: #48bb78;
    color: white;
}

.btn-success:hover {
    background-color: #38a169;
}

/* 完了メッセージ */
.complete-message {
    text-align: center;
    padding: 40px 20px;
}

.complete-message h2 {
    font-size: 24px;
    color: #48bb78;
    margin-bottom: 20px;
}

.complete-message p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.result-preview {
    background-color: #f0f8ff;
    border: 2px solid #667eea;
    border-radius: 10px;
    padding: 30px;
    margin: 30px auto;
    max-width: 600px;
}

.result-preview h3 {
    font-size: 20px;
    color: #667eea;
    margin-bottom: 20px;
}

/* 必須マーク */
.required {
    color: #dc3545;
    font-weight: bold;
}

.note {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    header h1 {
        font-size: 20px;
    }
    
    .step-indicator {
        flex-direction: column;
    }
    
    .step {
        min-width: 100%;
        margin: 5px 0;
    }
    
    .question-table {
        font-size: 12px;
    }
    
    .question-table th,
    .question-table td {
        padding: 8px 5px;
    }
    
    .question-table label {
        display: block;
        margin: 5px 0;
    }
    
    .form-table th,
    .form-table td {
        display: block;
        width: 100%;
        padding: 10px;
    }
    
    .form-table th {
        background-color: transparent;
        border-bottom: none;
        padding-bottom: 5px;
    }
    
    .form-table td {
        padding-top: 0;
        margin-bottom: 15px;
    }
    
    .confirm-table th,
    .confirm-table td {
        display: block;
        width: 100%;
        padding: 10px;
    }
    
    .confirm-table th {
        background-color: transparent;
        border-bottom: none;
        font-weight: bold;
    }
    
    .confirm-table td {
        padding-top: 0;
        margin-bottom: 15px;
    }
    
    .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 20px 10px;
    }
    
    .question-table {
        font-size: 11px;
    }
    
    .question-table thead {
        display: none;
    }
    
    .question-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 5px;
        padding: 10px;
    }
    
    .question-table td {
        display: block;
        border: none;
        padding: 5px 0;
    }
    
    .question-table td:before {
        content: attr(data-label);
        font-weight: bold;
        display: block;
        margin-bottom: 5px;
    }
}