/* Advanced Playback Permission CSS - Separated from PHP file */

/* Playback Permission UI Styles */
.playback-permission-ui.advanced {
    background: #0f172a;
    border-radius: 12px;
    padding: 40px;
    margin: 20px 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid #334155;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    position: relative; /* 添加相对定位 */
    /* 确保内容不会超出容器 */
    overflow: hidden;
}

/* 确保advanced-permission-ui容器内的所有内容完整显示并按比例缩放 */
.advanced-permission-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-sizing: border-box;
    /* 添加缩放变换以确保内容适应容器 */
    transform-origin: center center;
}

.advanced-permission-ui .content-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    /* 添加缩放以适应容器 */
    transform-origin: center center;
}

.advanced-permission-ui .permission-content {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    box-sizing: border-box;
    /* 确保内容按比例缩放 */
    transform-origin: center center;
}

.permission-granted {
    color: #10b981;
    width: 100%;
    box-sizing: border-box;
}

.permission-denied {
    color: #f8fafc;
    width: 100%;
    box-sizing: border-box;
}

.permission-icon, .lock-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.permission-icon {
    color: #10b981;
}

.lock-icon {
    color: #ff6b9d;
}

.purchase-prompt {
    width: 100%;
    box-sizing: border-box;
}

.purchase-prompt h3 {
    margin-top: 0;
    color: #f8fafc;
    font-size: 28px;
    font-weight: 700;
}

.price {
    font-size: 32px;
    font-weight: bold;
    color: #ff6b9d;
    margin: 25px 0;
}

.permission-message {
    margin: 20px 0;
    color: #94a3b8;
    font-size: 18px;
}

.purchase-options {
    width: 100%;
    box-sizing: border-box;
}

.purchase-options h4 {
    margin: 30px 0 20px;
    color: #f8fafc;
    font-size: 24px;
}

.option-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #334155;
}

.tab-btn {
    background: none;
    color: #94a3b8;
    border: none;
    padding: 15px 30px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    position: relative;
    box-sizing: border-box;
}

.tab-btn.active {
    color: #ff6b9d;
    border-bottom-color: #ff6b9d;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.payment-options h5 {
    margin: 25px 0 20px;
    color: #f8fafc;
    font-size: 20px;
}

.payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin: 25px 0;
}

.payment-btn {
    background: #1e293b;
    color: #f8fafc;
    border: 1px solid #334155;
    padding: 15px 25px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    font-weight: 500;
    min-width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
}

.payment-btn:hover {
    background: #ff6b9d;
    border-color: #ff6b9d;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.4);
}

.payment-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.login-prompt {
    margin: 30px 0;
    width: 100%;
    box-sizing: border-box;
}

.login-btn {
    display: inline-block;
    background: #ff6b9d;
    color: white;
    padding: 15px 35px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    font-size: 16px;
    margin: 20px 0;
    min-width: 150px;
    box-sizing: border-box;
}

.login-btn:hover {
    background: #60a5fa;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(96, 165, 250, 0.3);
}

.watch-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s;
    margin-top: 25px;
    min-width: 150px;
    box-sizing: border-box;
}

.watch-btn:hover {
    background: #059669;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.upgrade-btn {
    display: inline-block;
    background: linear-gradient(135deg, #60a5fa, #ff6b9d);
    color: white;
    padding: 15px 35px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(96, 165, 250, 0.4);
    border: none;
    cursor: pointer;
    font-size: 18px;
    text-align: center;
    min-width: 200px;
    margin: 10px 0;
    box-sizing: border-box;
}

.upgrade-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(96, 165, 250, 0.5);
}

.no-payment-methods {
    color: #94a3b8;
    font-style: italic;
    margin: 25px 0;
}

.membership-options {
    text-align: left;
}

.membership-loading {
    text-align: center;
    color: #94a3b8;
    padding: 25px;
}

.membership-item {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.membership-item:hover {
    background: #334155;
    transform: translateY(-3px);
}

.membership-item.selected {
    border-color: #ff6b9d;
    background: #1e293b;
    box-shadow: 0 0 0 2px #ff6b9d;
}

.membership-item.selected::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #ff6b9d;
}

.membership-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.membership-name {
    font-size: 20px;
    font-weight: bold;
    color: #f8fafc;
}

.membership-price {
    font-size: 24px;
    font-weight: bold;
    color: #ff6b9d;
}

.membership-description {
    color: #94a3b8;
    font-size: 16px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.membership-duration {
    color: #60a5fa;
    font-size: 16px;
}

.membership-benefits {
    margin-top: 20px;
    padding-left: 25px;
}

.membership-benefits li {
    color: #cbd5e1;
    margin-bottom: 10px;
    position: relative;
}

.membership-benefits li::before {
    content: "✓";
    color: #10b981;
    font-weight: bold;
    position: absolute;
    left: -25px;
}

/* Membership Purchase Options Styles */
.membership-purchase-options {
    background: #0f172a;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid #334155;
    box-sizing: border-box;
}

.membership-purchase-options h3 {
    color: #f8fafc;
    margin-top: 0;
    font-size: 24px;
    font-weight: 700;
}

.membership-options-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.membership-option {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.membership-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.membership-option .membership-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #334155;
}

.membership-option .membership-header h4 {
    color: #f8fafc;
    margin: 0;
    font-size: 20px;
}

.membership-option .membership-price {
    font-size: 24px;
    font-weight: bold;
    color: #ff6b9d;
}

.membership-details p {
    color: #94a3b8;
    margin: 0 0 15px 0;
    line-height: 1.6;
}

.membership-details .membership-duration {
    color: #60a5fa;
    font-size: 14px;
    font-weight: 500;
}

.membership-payment-options h5 {
    margin: 20px 0 15px;
    color: #f8fafc;
    font-size: 18px;
}

.membership-payment-options .payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.membership-payment-options .payment-btn {
    background: #334155;
    color: #f8fafc;
    border: 1px solid #475569;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    box-sizing: border-box;
}

.membership-payment-options .payment-btn:hover {
    background: #ff6b9d;
    border-color: #ff6b9d;
}

.membership-payment-options .no-payment-methods {
    color: #94a3b8;
    font-style: italic;
    margin: 10px 0;
}

/* Purchase Buttons (Inline Styles Moved Here) */
.purchase-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.episode-purchase-btn {
    background: linear-gradient(135deg, #60a5fa, #ff6b9d);
    color: white;
    padding: 15px 35px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 6px 20px rgba(96, 165, 250, 0.4);
    transition: all 0.3s;
    min-width: 200px;
    box-sizing: border-box;
}

.membership-purchase-btn {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: white;
    padding: 15px 35px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
    transition: all 0.3s;
    min-width: 200px;
    box-sizing: border-box;
}

/* Upgrade Membership Section (Inline Styles Moved Here) */
.upgrade-membership-section {
    margin: 30px 0 20px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.upgrade-membership-section p {
    margin-top: 10px;
    color: #94a3b8;
    font-size: 14px;
}

/* 会员提示文本样式 */
.membership-prompt-text {
    margin-top: 10px;
    color: #94a3b8;
    font-size: 14px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.modal-content {
    background-color: #1e293b;
    border-radius: 10px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #334155;
}

.modal-header h3 {
    color: #f8fafc;
    margin: 0;
}

.close-modal {
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: #ff6b9d;
}

.modal-body {
    padding: 20px;
}

/* Loading Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

/* Alert Messages */
.alert-message {
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
    font-weight: 500;
    display: none;
    box-sizing: border-box;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Responsive Design for Playback Permission UI */
@media (max-width: 768px) {
    .playback-permission-ui.advanced {
        padding: 25px;
        box-sizing: border-box;
    }
    
    .payment-methods {
        flex-direction: column;
        align-items: center;
    }
    
    .payment-btn {
        width: 100%;
        max-width: 300px;
        box-sizing: border-box;
    }
    
    .option-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
        text-align: center;
    }
    
    .purchase-prompt h3 {
        font-size: 24px;
    }
    
    .price {
        font-size: 28px;
    }
    
    /* Mobile Membership Options */
    .membership-item {
        padding: 20px;
        box-sizing: border-box;
    }
    
    .membership-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .membership-price {
        align-self: flex-end;
    }
    
    .membership-benefits {
        padding-left: 20px;
    }
    
    /* Mobile Membership Purchase Options */
    .membership-options-container {
        grid-template-columns: 1fr;
    }
    
    .membership-option .membership-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .membership-option .membership-price {
        align-self: flex-end;
    }
    
    .membership-purchase-options {
        padding: 15px;
        box-sizing: border-box;
    }
    
    .membership-option {
        padding: 15px;
        box-sizing: border-box;
    }
}

/* Extra Small Screen Optimization */
@media (max-width: 480px) {
    .playback-permission-ui.advanced {
        padding: 20px;
        box-sizing: border-box;
    }
    
    .purchase-prompt h3 {
        font-size: 20px;
    }
    
    .price {
        font-size: 24px;
    }
    
    .permission-message {
        font-size: 16px;
    }
    
    .payment-btn {
        padding: 12px 20px;
        font-size: 14px;
        box-sizing: border-box;
    }
    
    .membership-header {
        gap: 12px;
    }
    
    .membership-name {
        font-size: 18px;
    }
    
    .membership-price {
        font-size: 20px;
    }
    
    .membership-description {
        font-size: 14px;
    }
    
    .membership-duration {
        font-size: 14px;
    }
}