/* 基本スタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
    margin-bottom: 30px;
    color: #333;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
}

h2 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #555;
}

/* フォーム説明文 */
.form-description {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    color: #555;
    line-height: 1.7;
}

.form-description p {
    margin: 0;
    margin-bottom: 10px;
}

.form-description p:last-child {
    margin-bottom: 0;
}

/* セクションスタイル */
.account-section {
    background-color: #fafafa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 25px;
    border-left: 2px solid #e0e0e0;
}

.account-section h2 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    border-bottom: none;
    padding-bottom: 0;
}

.account-section .form-group {
    margin-bottom: 0;
}

.account-section label {
    font-size: 13px;
    color: #777;
}

.status-section {
    background-color: #fafafa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 25px;
    border-left: 2px solid #e0e0e0;
}

.status-section h2 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    border-bottom: none;
    padding-bottom: 0;
}

.readonly-info-section {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 25px;
}

.readonly-info-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
}

.readonly-info-section .form-group {
    margin-bottom: 20px;
}

.readonly-info-section .form-group:last-child {
    margin-bottom: 0;
}

.readonly-info-section label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

/* 回答済みステータス */
.completion-status {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.completed {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.submitted-date {
    margin-left: 8px;
    font-size: 12px;
    color: #666;
}

/* サンクスページの回答内容表示 */
.submitted-data-section {
    margin-top: 30px;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.submitted-data-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
}

.submitted-data {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.data-row {
    display: flex;
    flex-wrap: wrap;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.data-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.data-label {
    font-weight: 600;
    color: #555;
    min-width: 200px;
    margin-bottom: 5px;
}

.data-value {
    color: #333;
    flex: 1;
    word-break: break-word;
}

/* サンクスページのアクション */
.thanks-actions {
    margin-top: 30px;
    text-align: center;
}

.form-section {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.form-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
}

/* フォームスタイル */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.required {
    color: #e74c3c;
}

input[type="text"],
input[type="email"],
input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

input[type="text"]:read-only,
input[type="email"]:read-only {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

input[type="text"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

/* ラジオボタンスタイル */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fafafa;
}

.radio-group.error-group {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
    background-color: #fff5f5;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0;
}

.radio-label input[type="radio"] {
    width: auto;
    margin: 0;
    margin-right: 8px;
    cursor: pointer;
    padding: 0;
}

.radio-label span {
    user-select: none;
}

/* エラー状態の入力フィールド（フォーカスなし） */
input[type="text"].error-field,
input[type="email"].error-field {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2) !important;
    background-color: #fff5f5;
}

/* エラー状態の入力フィールド（フォーカス時） */
input[type="text"].error-field:focus,
input[type="email"].error-field:focus {
    outline: none;
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.3) !important;
    background-color: #fff5f5;
}

.error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.form-hint {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}

.form-hint-section {
    margin-bottom: 20px;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-left: 3px solid #4CAF50;
    border-radius: 4px;
}

.form-hint-section .form-hint {
    margin-top: 0;
    font-style: normal;
    color: #555;
}

/* ボタンスタイル */
.form-actions {
    margin-top: 30px;
    text-align: center;
}

button,
a.button {
    background-color: #4CAF50;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

button:hover,
a.button:hover {
    background-color: #45a049;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.reset-button {
    background-color: #6c757d;
    margin-right: 10px;
}

.reset-button:hover {
    background-color: #5a6268;
}

/* ログアウトボタン */
.logout-section {
    margin-top: 12px;
    text-align: left;
}

.logout-button {
    display: inline-block;
    background-color: #6c757d;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.logout-button:hover {
    background-color: #5a6268;
}

/* メッセージスタイル */
.message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 情報表示 */
.info {
    background-color: #e7f3ff;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #2196F3;
}

.info pre {
    background-color: white;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    overflow-x: auto;
}

/* テーブルスタイル */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

table tr:hover {
    background-color: #f5f5f5;
}

table a {
    color: #2196F3;
    text-decoration: none;
    word-break: break-all;
}

table a:hover {
    text-decoration: underline;
}

/* エラーリスト */
.error-list {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
}

.error-list ul {
    margin-left: 20px;
    margin-top: 10px;
}

.error-list li {
    margin-bottom: 5px;
    color: #856404;
}

/* フォームURL一覧 */
.form-urls {
    margin-top: 30px;
}

/* 情報セクション（ホームページ用） */
.info-section {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 25px;
}

.info-section h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
}

.info-content {
    color: #555;
    line-height: 1.7;
}

.info-content p {
    margin-bottom: 10px;
}

.info-content p:last-child {
    margin-bottom: 0;
}

.info-content ul {
    margin-top: 10px;
    margin-bottom: 10px;
}

.info-content li {
    margin-bottom: 8px;
}

/* レスポンシブデザイン */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    table {
        font-size: 12px;
    }
    
    table th,
    table td {
        padding: 8px;
    }
}

