/* ========================================
   アップグレードモーダル
   ======================================== */

.upgrade-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.upgrade-modal.show {
    display: flex;
    opacity: 1;
}

.upgrade-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.upgrade-modal-content {
    position: relative;
    margin: auto;
    background: white;
    border-radius: 15px;
    max-width: 1000px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.4s ease-out;
}

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

.upgrade-header {
    padding: 25px 30px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px 15px 0 0;
    color: white;
}

.upgrade-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 32px;
    font-weight: 300;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.upgrade-body {
    padding: 30px;
}

.upgrade-message {
    text-align: center;
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.plan-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.plan-box {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.plan-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.plan-box.current {
    border-color: #ffc107;
    background: #fff8e1;
}

.plan-box.recommended {
    border-color: #667eea;
    background: linear-gradient(135deg, #f5f7ff 0%, #f9f6ff 100%);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
}

.plan-box.premium {
    border-color: #9b59b6;
    background: linear-gradient(135deg, #f9f6ff 0%, #fff5f5 100%);
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.plan-header {
    text-align: center;
    margin-bottom: 20px;
}

.plan-header h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #333;
}

.plan-price {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.plan-price .original-price {
    font-size: 24px;
    color: #999;
    text-decoration: line-through;
}

.founder-price {
    font-size: 14px;
    color: #2ecc71;
    font-weight: 600;
    margin-top: 5px;
}

.founder-price strong {
    font-size: 18px;
    color: #2ecc71;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    min-height: 180px;
    flex-grow: 1;
}

.plan-features li {
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-features li::before {
    content: '✅';
    font-size: 16px;
    flex-shrink: 0;
}

/* Freeプランの機能リストは異なるアイコン */
.plan-box:not(.recommended):not(.premium) .plan-features li::before {
    content: '📋';
    font-size: 16px;
}

.plan-limitations {
    margin-top: 15px;
    flex-grow: 1;
}

.limitation {
    padding: 8px 0;
    font-size: 13px;
    color: #e74c3c;
}

.more-features {
    color: #667eea;
    font-weight: 600;
    font-style: normal;
}

.more-features::before {
    content: '' !important;
    display: none;
}

.btn-upgrade {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-upgrade:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-upgrade.premium {
    background: linear-gradient(135deg, #9b59b6 0%, #e91e63 100%);
}

.btn-upgrade.premium:hover {
    box-shadow: 0 5px 20px rgba(155, 89, 182, 0.4);
}

.upgrade-footer {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 0 0 15px 15px;
    text-align: center;
}

.upgrade-note {
    font-size: 14px;
    color: #666;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.upgrade-note i {
    color: #667eea;
    font-size: 16px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .upgrade-modal-content {
        width: 98%;
        max-height: 95vh;
    }
    
    .upgrade-header {
        padding: 20px;
    }
    
    .upgrade-header h2 {
        font-size: 22px;
    }
    
    .upgrade-body {
        padding: 20px;
    }
    
    .plan-comparison {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .plan-box {
        padding: 20px;
    }
    
    .plan-header h3 {
        font-size: 20px;
    }
    
    .plan-price {
        font-size: 28px;
    }
    
    .plan-features {
        min-height: auto;
    }
    
    .upgrade-note {
        flex-direction: column;
        gap: 10px;
    }
}
