/* ===================================
   Contact Form - 円形トランジション効果
   =================================== */

/* 円形トランジション */
.circle-transition {
    position: fixed;
    background: #4ecdc4;
    border-radius: 50%;
    transform-origin: center;
    z-index: 9998;
    display: none;
    pointer-events: none;
}

/* モーダル背景 */
.contact-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 2rem;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* モーダルがアクティブな時のスタイル */
.contact-modal.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

/* フォームコンテナ */
.contact-form-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: 90vh; /* 画面の90%まで */
    margin: 5vh auto; /* 上下に5%の余白 */
    background: #1a1a1a;
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

/* 背景アニメーション */
.contact-form-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(78, 205, 196, 0.1) 0%, transparent 70%);
    animation: rotateGradient 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes rotateGradient {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 閉じるボタン */
.contact-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    color: #fff;
    font-size: 1.5rem;
}

.contact-close:hover {
    background: rgba(78, 205, 196, 0.2);
    border-color: #4ecdc4;
    transform: rotate(90deg);
}

/* フォームヘッダー */
.contact-form-header {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a3aa 100%);
    padding: 3rem 2rem 2rem;
    text-align: center;
    color: #fff;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* ヘッダーの動く背景 */
.contact-form-header::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 70%);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.contact-form-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.contact-form-subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

/* フォームコンテンツ */
.contact-form-content {
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(90vh - 200px); /* ヘッダー分を引いた高さ */
    position: relative;
    z-index: 1;
}

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

.form-label {
    display: block;
    font-size: 0.9rem;
    color: #4ecdc4;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-label .required {
    color: #e74c3c;
    margin-left: 0.25rem;
}

/* 入力フィールド共通 */
.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #4ecdc4;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

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

/* セレクトボックス */
.form-select {
    cursor: pointer;
}

.form-select option {
    background: #1a1a1a;
    color: #fff;
}

/* ラジオボタン・チェックボックス */
.form-radio-group,
.form-checkbox-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.form-radio-label,
.form-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.form-radio-label:hover,
.form-checkbox-label:hover {
    color: #4ecdc4;
}

.form-radio,
.form-checkbox {
    width: 20px;
    height: 20px;
    accent-color: #4ecdc4;
}

/* 送信ボタン */
.form-submit {
    width: 100%;
    padding: 1.2rem 2rem;
    background: linear-gradient(135deg, #4ecdc4 0%, #44a3aa 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* ボタンの波紋エフェクト */
.form-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.form-submit:hover::before {
    width: 300px;
    height: 300px;
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.3);
}

/* ボタンのパルスアニメーション */
.form-submit::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #4ecdc4 0%, #44a3aa 100%);
    border-radius: 50px;
    opacity: 0;
    z-index: -1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }
    50% {
        transform: scale(1);
        opacity: 0.3;
    }
    100% {
        transform: scale(1.05);
        opacity: 0;
    }
}

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

.form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 成功メッセージ */
.success-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 3rem;
    background: rgba(26, 26, 26, 0.95);
    border-radius: 20px;
    z-index: 20;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4ecdc4 0%, #44a3aa 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 3rem;
    color: #fff;
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.3);
}

.success-message h3 {
    font-size: 1.8rem;
    color: #4ecdc4;
    margin-bottom: 1rem;
}

.success-message p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .contact-modal {
        padding: 1rem;
    }
    
    .contact-form-container {
        max-width: 100%;
        border-radius: 15px;
    }
    
    .contact-form-header {
        padding: 2.5rem 1.5rem 1.5rem;
    }
    
    .contact-form-title {
        font-size: 1.5rem;
    }
    
    .contact-form-content {
        padding: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1.2rem;
    }
    
    .form-input,
    .form-textarea,
    .form-select {
        padding: 0.8rem;
        font-size: 16px; /* iOSのズーム防止 */
    }
    
    .form-radio-group,
    .form-checkbox-group {
        gap: 1rem;
    }
    
    .form-submit {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}