/* リセットとベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
    color: #333;
}

/* コンテナ */
.container {
    max-width: 800px;
    margin: 0 auto;
}

/* ヘッダー */
.form-header {
    background: white;
    border-radius: 12px 12px 0 0;
    padding: 40px;
    text-align: center;
    border-bottom: 6px solid #667eea;
}

.form-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.form-header .subtitle {
    font-size: 14px;
    color: #666;
    font-weight: 300;
}

.header-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
    flex-wrap: wrap;
}

.config-link {
    display: inline-block;
    padding: 8px 16px;
    background: #f8f9ff;
    color: #667eea;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #667eea;
    transition: all 0.3s ease;
}

.config-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

/* フォームコンテンツ */
.form-content {
    background: white;
    border-radius: 0 0 12px 12px;
    padding: 40px;
}

/* セクション */
.form-section {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid #e0e0e0;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 24px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 600;
}

.time-badge {
    margin-left: auto;
    font-size: 12px;
    font-weight: 400;
    color: #666;
    background: #f5f5f5;
    padding: 4px 12px;
    border-radius: 12px;
}

.subtitle-small {
    margin-left: auto;
    font-size: 13px;
    font-weight: 400;
    color: #666;
}

/* フォームグループ */
.form-group {
    margin-bottom: 24px;
}

.form-group:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

label.required::after {
    content: " *";
    color: #e74c3c;
    font-weight: 600;
}

/* 入力フィールド */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    font-family: 'Noto Sans JP', sans-serif;
    transition: all 0.3s ease;
    background: #fafafa;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* ヘルプテキスト */
.help-text {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #666;
}

/* ラジオボタン */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-group.inline {
    flex-direction: row;
    gap: 24px;
}

.radio-option,
.radio-option-inline {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.radio-option-inline {
    padding: 10px 16px;
    flex: 0 0 auto;
}

.radio-option:hover,
.radio-option-inline:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.radio-option input[type="radio"],
.radio-option-inline input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.radio-option input[type="radio"]:checked ~ .radio-label,
.radio-option-inline input[type="radio"]:checked ~ .radio-label {
    font-weight: 600;
    color: #667eea;
}

.radio-option:has(input[type="radio"]:checked),
.radio-option-inline:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background: #f8f9ff;
}

.radio-label {
    flex: 1;
    font-size: 15px;
}

/* 条件付き入力 */
.conditional-input {
    margin-top: 12px;
    margin-left: 30px;
}

.conditional-input input {
    background: white;
}

/* チェックボックス */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.checkbox-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.checkbox-option input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.checkbox-option input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

.checkbox-option:has(input[type="checkbox"]:checked) {
    border-color: #667eea;
    background: #f8f9ff;
}

.checkbox-option:has(input[type="checkbox"]:disabled) {
    background: #f0f0f0;
    cursor: not-allowed;
}

.checkbox-label {
    flex: 1;
    font-size: 15px;
}

.checkbox-option input[type="checkbox"]:checked ~ .checkbox-label {
    font-weight: 600;
    color: #667eea;
}

/* バッジ */
.badge-default {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: white;
    background: #95a5a6;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
}

/* フォームアクション */
.form-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 40px;
}

/* ボタン */
.btn-submit,
.btn-reset,
.btn-new {
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans JP', sans-serif;
}

.btn-submit {
    background: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-submit:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-reset {
    background: white;
    color: #666;
    border: 2px solid #ddd;
}

.btn-reset:hover {
    border-color: #999;
    color: #333;
}

.btn-new {
    background: #667eea;
    color: white;
    margin-top: 20px;
}

.btn-new:hover {
    background: #5568d3;
}

/* 成功メッセージ */
.success-message {
    background: white;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
}

.success-content {
    max-width: 400px;
    margin: 0 auto;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #2ecc71;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 24px;
}

.success-message h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.success-message p {
    font-size: 15px;
    color: #666;
    line-height: 1.8;
}

/* レスポンシブ */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .form-header {
        padding: 30px 20px;
    }

    .form-header h1 {
        font-size: 22px;
    }

    .form-content {
        padding: 30px 20px;
    }

    .section-title {
        font-size: 18px;
        flex-wrap: wrap;
    }

    .time-badge,
    .subtitle-small {
        margin-left: 0;
        width: 100%;
        margin-top: 8px;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-submit,
    .btn-reset {
        width: 100%;
    }

    .radio-group.inline {
        flex-direction: column;
        gap: 12px;
    }

    .success-message {
        padding: 40px 20px;
    }
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section {
    animation: fadeIn 0.5s ease;
}
