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

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.required {
    color: #e74c3c;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    height: 2.8rem;
    background-color: #fff;
}

select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 1.2rem;
    padding-right: 2.5rem;
}

select:invalid {
    color: #757575;
}

textarea {
    height: auto;
    min-height: 120px;
    resize: vertical;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 1rem;
}

button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    flex: 1;
    white-space: nowrap;
}

#privacy-modal-btn {
    background-color: #95a5a6;
    color: white;
}

#confirm-btn,
#submit-btn {
    background-color: #3498db;
    color: white;
}

#back-btn {
    background-color: #95a5a6;
    color: white;
}

button:hover {
    opacity: 0.9;
}

button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

/* モーダルスタイル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 8px;
    overflow-y: auto;
}

.modal-body {
    margin: 1.5rem 0;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ddd;
    flex-wrap: wrap;
    gap: 1rem;
}

/* 確認画面のスタイル */
.confirm-content {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.confirm-content p {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    word-break: break-word;
}

/* エラーメッセージのスタイル */
.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 0.3rem;
    display: none;
}

/* バリデーションエラー時のスタイル */
input:invalid:not(:placeholder-shown):not(:focus),
textarea:invalid:not(:placeholder-shown):not(:focus),
select:invalid:not(:placeholder-shown):not(:focus) {
    border-color: #e74c3c;
}

/* フォーカス時のスタイル */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* 通常時のスタイル */
input,
textarea,
select {
    border-color: #ddd;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    .container {
        margin: 0;
        padding: 1rem;
        border-radius: 0;
        min-height: 100vh;
    }

    h1 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .button-group {
        flex-direction: column;
    }

    button {
        width: 100%;
    }

    .modal-content {
        margin: 0;
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer label {
        width: 100%;
        margin-bottom: 1rem;
    }

    .modal-footer button {
        width: 100%;
    }
}

/* タッチデバイス向けの最適化 */
@media (hover: none) {
    button:hover {
        opacity: 1;
    }

    button:active {
        opacity: 0.9;
    }
} 