/**
 * 轻量级模态框样式
 */

/* 模态框基本样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    align-items: flex-start;
    justify-content: center;
}

/* 显示模态框 */
.modal.show {
    display: flex;
}

/* 模态框内容 */
.modal-content {
    position: relative;
    background-color: var(--color-white);
    border-radius: 6px;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
    margin: auto;
    width: 100%;
    max-width: 600px !important;
    animation: modal-in 0.3s ease;
}

/* 模态框头部 */
.modal-header {
    padding: 15px;
    border-bottom: 1px solid var(--color-border-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--color-text-primary);
}

/* 模态框主体 */
.modal-body {
    position: relative;
    padding: 15px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* 模态框底部 */
.modal-footer {
    padding: 15px;
    border-top: 1px solid var(--color-border-secondary);
    text-align: right;
}

/* 关闭按钮 */
.btn-close {
    padding: 0;
    cursor: pointer;
    background: transparent;
    border: 0;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-black);
    opacity: 0.5;
    line-height: 1;
}

.btn-close:hover {
    opacity: 1;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 6px 12px;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 4px;
    transition: all 0.15s ease-in-out;
    margin-left: 5px;
    cursor: pointer;
}

.btn-primary {
    color: var(--color-white);
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.btn-secondary {
    color: var(--color-white);
    background-color: var(--color-text-secondary);
    border-color: var(--color-text-secondary);
}

.btn-secondary:hover {
    background-color: var(--color-gray-700);
    border-color: var(--color-gray-700);
}

/* 动画效果 */
@keyframes modal-in {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 响应式调整 */
@media (max-width: 576px) {
    .modal-content {
        width: 95%;
    }
}

/* 会员套餐模态框特定样式 */
#membershipModal .modal-content {
    max-width: 800px;
}

#membershipPlans {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}

.plan-card {
    border: 1px solid var(--color-border-primary);
    border-radius: 8px;
    padding: 15px;
    width: 200px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--color-info-light);
}

.plan-card.selected {
    border-color: var(--color-info);
    background-color: var(--color-info-light);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.2);
}

.plan-name {
    font-size: 1.125rem;
    font-weight: bold;
    color: var(--color-info);
    margin-bottom: 10px;
}

.plan-duration {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 15px;
}

.plan-price {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.plan-original-price {
    font-size: 0.875rem;
    color: var(--color-error);
    text-decoration: line-through;
    margin-bottom: 5px;
}

.plan-monthly {
    font-size: 0.875rem;
    color: var(--color-success);
    margin-bottom: 10px;
}

.plan-credits {
    font-weight: bold;
    margin-bottom: 10px;
}

.plan-features {
    list-style-type: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.plan-features li {
    margin-bottom: 5px;
    padding-left: 20px;
    position: relative;
    font-size: 0.875rem;
}

.plan-features li:before {
    content: "✓";
    color: var(--color-success);
    position: absolute;
    left: 0;
}
