/* 产品授权下载页面样式 */

/* ==================== 页面布局 ==================== */
.xl-license-page {
    min-height: calc(100vh - 425px);
    padding: 4rem 24px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: var(--body-bg);
}

.xl-license-container {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    width: 100%;
    max-width: 720px;
}

/* ==================== 主卡片 ==================== */
.xl-license-card {
    flex: 1;
    min-width: 0;
    background: var(--card-bg);
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.xl-license-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 24px;
}

/* 信息区域 */
.xl-license-info {
    background: var(--muted-border-color, #f0f3f5);
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 24px;
    font-size: 0.88rem;
    line-height: 1.8;
    color: var(--text-color);
}

.xl-info-item a {
    color: var(--theme-color, #007bff);
    text-decoration: none;
}

.xl-info-item a:hover {
    text-decoration: underline;
}

/* ==================== 未登录 ==================== */
.xl-login-notice {
    text-align: center;
    padding: 2em 0;
}

.xl-notice-icon {
    color: var(--muted-color, #999);
    margin-bottom: 12px;
}

.xl-notice-text {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 20px;
    font-weight: 500;
}

.xl-login-box {
    max-width: 320px;
    margin: 0 auto;
}

/* ==================== 授权码输入区 ==================== */
.xl-auth-section {
    margin-top: 4px;
}

.xl-auth-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.xl-auth-input {
    flex: 1;
    height: 48px;
    box-sizing: border-box;
    padding: 0 16px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 46px;
    font-family: monospace;
    letter-spacing: 1px;
    outline: none;
    transition: border-color 0.2s;
}

.xl-auth-input:focus {
    border-color: var(--theme-color, #007bff);
}

.xl-auth-input::placeholder {
    letter-spacing: 0;
    font-family: inherit;
}

/* 验证并下载按钮 */
.xl-btn-download {
    flex-shrink: 0;
    height: 48px;
    box-sizing: border-box;
    padding: 0 24px;
    border: none;
    border-radius: 6px;
    background: var(--theme-color, #007bff);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s, transform 0.1s;
}

.xl-btn-download:hover {
    opacity: 0.9;
}

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

.xl-btn-download:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.xl-btn-download.xl-btn-loading {
    pointer-events: none;
}

/* 购买链接 */
.xl-buy-link {
    margin-top: 16px;
    font-size: 0.88rem;
    color: var(--text-color-secondary, #666);
}

.xl-buy-link a {
    color: var(--theme-color, #007bff);
    text-decoration: none;
    font-weight: 500;
}

.xl-buy-link a:hover {
    text-decoration: underline;
}

/* ==================== 说明卡片 ==================== */
.xl-license-aside {
    width: 220px;
    flex-shrink: 0;
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    align-self: flex-start;
    position: sticky;
    top: 80px;
}

.xl-license-aside h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 12px;
}

.xl-license-aside ul {
    list-style: disc;
    padding-left: 16px;
    color: var(--text-color-secondary);
    font-size: 0.85rem;
    line-height: 1.7;
}

.xl-license-aside li {
    margin-bottom: 6px;
}

/* ==================== 模态框 ==================== */
.xl-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.xl-modal-overlay.xl-modal-show {
    opacity: 1;
    visibility: visible;
}

.xl-modal-dialog {
    background: var(--card-bg, #fff);
    border-radius: 10px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.25s;
}

.xl-modal-overlay.xl-modal-show .xl-modal-dialog {
    transform: translateY(0);
}

.xl-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color, #eee);
    background: var(--theme-color, #007bff);
    color: #fff;
}

.xl-modal-title {
    font-size: 1rem;
    font-weight: 600;
}

.xl-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    opacity: 0.8;
}

.xl-modal-close:hover {
    opacity: 1;
}

.xl-modal-body {
    padding: 24px 20px;
    text-align: center;
}

.xl-modal-buttons {
    display: flex;
    gap: 0;
    border-top: 1px solid var(--border-color, #eee);
}

.xl-modal-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    background: none;
    font-size: 0.93rem;
    cursor: pointer;
    transition: background 0.15s;
    font-weight: 500;
}

.xl-modal-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}

.xl-modal-btn-copy {
    color: var(--theme-color, #007bff);
    border-right: 1px solid var(--border-color, #eee);
}

.xl-modal-btn-download {
    color: #e53e3e;
}

/* ==================== 进度条 ==================== */
.xl-progress-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
}

.xl-progress-track {
    height: 8px;
    background: var(--muted-border-color, #e0e0e0);
    border-radius: 4px;
    overflow: hidden;
}

.xl-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--theme-color, #007bff);
    border-radius: 4px;
    transition: width 0.25s ease;
}

/* ==================== 密码展示 ==================== */
.xl-pwd-label {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 12px;
}

.xl-pwd-code {
    display: inline-block;
    font-size: 1.15rem;
    letter-spacing: 1px;
    padding: 8px 18px;
    background: var(--muted-border-color, #f0f3f5);
    border-radius: 4px;
    user-select: all;
    font-family: monospace;
    margin-bottom: 12px;
}

.xl-pwd-tip {
    font-size: 0.85rem;
    color: var(--text-color-secondary, #999);
}

/* ==================== Toast 通知 ==================== */
.xl-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    padding: 12px 28px;
    border-radius: 6px;
    color: #fff;
    font-size: 0.9rem;
    z-index: 999999;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
}

.xl-toast-show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.xl-toast-success {
    background: #10b981;
}

.xl-toast-danger {
    background: #ef4444;
}

.xl-toast-warning {
    background: #f59e0b;
}

/* ==================== 响应式 ==================== */
@media (max-width: 640px) {
    .xl-license-container {
        flex-direction: column;
    }

    .xl-license-aside {
        width: 100%;
        position: static;
    }

    .xl-license-card {
        padding: 20px;
    }

    .xl-auth-row {
        flex-direction: column;
    }

    .xl-btn-download {
        width: 100%;
        text-align: center;
    }

    .xl-license-page {
        padding: 2rem 16px;
    }
}
