/* static/css/modal.css - 不要部分削除版 */

/* モーダル背景オーバーレイ */
#entry-modal {
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
    z-index: 9999;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* モーダルコンテンツ */
#modal-content {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background-color: #ffffff;
    color: #333333;
}

@keyframes slideUp {
    from {
        transform: translateY(50px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* モーダルヘッダー */
.modal-header {
    background: linear-gradient(135deg, #ef4444, #f97316, #eab308);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 閉じるボタン */
.modal-close {
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* 緊急告知バッジ */
.emergency-badge {
    animation: urgentPulse 2s infinite;
}

@keyframes urgentPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
}

/* 特典ボックス */
.benefits-box {
    position: relative;
    overflow: hidden;
    background-color: #fffbf0;
    color: #333333;
}

/* ランキングボタンは色を強制しない */
.benefits-box .ranking-btn {
    color: white !important;
    background: linear-gradient(to right, #fb923c, #f97316) !important;
}

.benefits-box .ranking-btn:hover {
    background: linear-gradient(to right, #f97316, #ea580c) !important;
}

.benefits-box .ranking-btn svg {
    color: white !important;
}

.benefits-box .ranking-btn span {
    color: white !important;
}

.benefits-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #fbbf24, #f59e0b, #d97706, #fbbf24);
    background-size: 400% 400%;
    animation: gradientBorder 3s ease infinite;
    border-radius: inherit;
    z-index: -1;
}

@keyframes gradientBorder {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* カード表示エリア */
.featured-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f8ff, #e6f3ff);
    color: #333333;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.6s;
}

.featured-card:hover::before {
    left: 100%;
}

.featured-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

/* 緊急性エリア */
.urgency-box {
    position: relative;
    overflow: hidden;
    background-color: #fef2f2;
    color: #333333;
}

.urgency-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.1), transparent);
    animation: urgentSweep 2s infinite;
}

@keyframes urgentSweep {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* CTAボタン */
.modal-cta {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.6s;
}

.modal-cta:hover::before {
    left: 100%;
}

.modal-cta:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(239, 68, 68, 0.4);
}

/* スマートフォン対応 */
@media (max-width: 640px) {
    #modal-content {
        margin: 0.5rem;
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-close {
        width: 28px;
        height: 28px;
    }
}

/* フィーチャーカード（特徴ポイント） */
.feature-card {
    transition: all 0.3s ease;
    position: relative;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.feature-card:hover::before {
    opacity: 1;
}

/* CTAボタンコンテナ - メイン申し込みボタン */
.cta-button-container {
    position: relative;
    z-index: 10;
}

.cta-button-container * {
    color: inherit !important;
}

/* ランキングボタンコンテナ - 色の強制を回避 */
.ranking-button-container {
    position: relative;
    z-index: 10;
}

.ranking-button-container * {
    color: inherit !important;
}

/* メインCTAボタン - 赤いグラデーション */
.modal-cta {
    position: relative;
    overflow: hidden;
    background: linear-gradient(to right, #ef4444, #dc2626) !important;
    color: white !important;
    text-decoration: none;
}

.modal-cta * {
    color: white !important;
}

.modal-cta:hover {
    background: linear-gradient(to right, #dc2626, #b91c1c) !important;
    text-decoration: none;
}

.modal-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.6s;
}

.modal-cta:hover::before {
    left: 100%;
}

.modal-cta:active {
    transform: scale(0.98);
}

/* ランキングボタン - オレンジグラデーション */
.ranking-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(to right, #fb923c, #f97316) !important;
    color: white !important;
}

.ranking-btn * {
    color: white !important;
}

.ranking-btn:hover {
    background: linear-gradient(to right, #f97316, #ea580c) !important;
}

.ranking-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: all 0.6s;
}

.ranking-btn:hover::before {
    left: 100%;
}

.ranking-btn:active {
    transform: scale(0.98);
}

/* アクセシビリティ対応 */
@media (prefers-reduced-motion: reduce) {
    #entry-modal,
    #modal-content,
    .emergency-badge,
    .modal-cta,
    .feature-card,
    .ranking-btn {
        animation: none;
        transform: none !important;
    }
    
    .modal-cta::before,
    .featured-card::before,
    .urgency-box::before,
    .feature-card::before,
    .ranking-btn::before {
        display: none;
    }
}