/* モダンなフォームの共通スタイル */
.contact-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-form-wrapper {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 50px;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    max-width: 600px;
    width: 100%;
    position: relative;
    z-index: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.contact-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.contact-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #111, #8b9534);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    position: relative;
}

.contact-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 4px;
    background: linear-gradient(135deg, #111, #8b9534);
    border-radius: 2px;
}

.form-group {
    margin-bottom: 30px;
    position: relative;
}

.form-group > label:not(.radio-option) {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
    border-color: #667eea;
    transform: translateY(-1px);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* ラジオボタンのスタイル */
.radio-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

.radio-option:hover {
    border-color: #222;
    transform: translateY(-1px);
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: inline-block;
}

.radio-option input[type="radio"]:checked ~ .radio-custom {
    border-color: #111;
    background: #111;
}

.radio-option input[type="radio"]:checked ~ .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.radio-option input[type="radio"]:checked ~ .radio-text {
    color: #222;
}

.radio-option:has(input[type="radio"]:checked) {
    border-color: #222;
    background: #e6e6e6;
}

/* アニメーション効果 */
.form-group {
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.6s ease forwards;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }
.form-group:nth-child(6) { animation-delay: 0.6s; }
.form-group:nth-child(7) { animation-delay: 0.7s; }
.form-group:nth-child(8) { animation-delay: 0.8s; }

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-title {
    opacity: 0;
    transform: translateY(-30px);
    animation: slideInDown 0.6s ease forwards;
}

@keyframes slideInDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .contact-form-wrapper {
        padding: 30px 20px;
        margin: 20px;
    }

    .contact-title h1 {
        font-size: 2rem;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 14px 16px;
    }

    .radio-option {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .radio-custom {
        width: 18px;
        height: 18px;
        margin-right: 10px;
    }

    .radio-option input[type="radio"]:checked + .radio-custom::after {
        width: 6px;
        height: 6px;
    }


    .submit-btn {
        padding: 16px 24px;
        font-size: 1rem;
    }
}

/* 成功メッセージのスタイル */
.success-message {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.success-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* ローディングアニメーション */
.loading {
    position: relative;
    color: transparent;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
