.resource-buttons {
    margin-top: 30px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 5px;
}

.resource-buttons h3 {
    margin-top: 0;
    color: #333;
}

.btn-download,
.btn-demo {
    display: inline-block;
    padding: 10px 20px;
    margin-right: 10px;
    margin-bottom: 10px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}

.btn-demo {
    background: #28a745;
}

.btn-download:hover,
.btn-demo:hover {
    opacity: 0.9;
}

/* Responsive layout: desktop single row, mobile wrap into two rows */
.resource-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.resource-row .btn-download{flex:0 0 auto}
@media (max-width:600px){
    .resource-row .btn-download{flex:1 1 48%;}
    .resource-row .btn-demo{flex:1 1 100%;}
}

/* 模态框样式 - 现代化设计 */
.ziyuanxiazai-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

.ziyuanxiazai-modal-content {
    background: white;
    border-radius: 12px;
    width: 420px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 6px 10px rgba(0, 0, 0, 0.06);
    transform: translateY(0);
    animation: slideIn 0.3s ease-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.ziyuanxiazai-modal-header {
    padding: 24px 24px 0;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ziyuanxiazai-modal-header h3 {
    margin: 0;
    color: #1a202c;
    font-size: 1.25rem;
    font-weight: 600;
}

#ziyuanxiazai-modal-close {
    cursor: pointer;
    background: none;
    border: none;
    font-size: 24px;
    color: #718096;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

#ziyuanxiazai-modal-close:hover {
    background-color: #f7fafc;
    color: #2d3748;
}

/* 加载指示器样式 */
#ziyuanxiazai-loading {
    display: none;
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    min-width: 200px;
    text-align: center;
}

#ziyuanxiazai-loading div {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #4299e1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

/* 模态框动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-20px); 
    }
    to { 
        opacity: 1;
        transform: translateY(0); 
    }
}

/* 按钮样式现代化 */
.button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.button:active {
    transform: translateY(0);
}

/* 表单样式现代化 */
.ziyuanxiazai-dialog {
    padding: 0 24px 24px;
}

.ziyuanxiazai-modal-body {
    color: #4a5568;
}

.ziyuanxiazai-modal-body p {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #4a5568;
}

.ziyuanxiazai-modal-body label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #2d3748;
    font-size: 14px;
}

.ziyuanxiazai-modal-body .text {
    width: 100%;
    padding: 12px 16px;
}

/* iframe预览容器样式 */
.ziyuanxiazai-iframe-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* iframe头部样式 */
.ziyuanxiazai-iframe-header {
    background: #fff;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 10;
    min-height: 60px;
}

.ziyuanxiazai-iframe-back-btn {
    background: #4299e1;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.ziyuanxiazai-iframe-back-btn:hover {
    background: #3182ce;
}

.ziyuanxiazai-iframe-title {
    margin: 0;
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
}

.ziyuanxiazai-iframe-controls {
    display: flex;
    gap: 8px;
}

.ziyuanxiazai-iframe-fullscreen-btn,
.ziyuanxiazai-iframe-close-btn {
    background: #e2e8f0;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.ziyuanxiazai-iframe-fullscreen-btn:hover,
.ziyuanxiazai-iframe-close-btn:hover {
    background: #cbd5e0;
}

.ziyuanxiazai-iframe-close-btn {
    background: #fed7d7;
    color: #c53030;
}

.ziyuanxiazai-iframe-close-btn:hover {
    background: #feb2b2;
}

/* iframe容器样式 */
.ziyuanxiazai-iframe-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.ziyuanxiazai-preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ziyuanxiazai-iframe-header {
        padding: 8px 12px;
        min-height: 50px;
    }
    
    .ziyuanxiazai-iframe-back-btn,
    .ziyuanxiazai-iframe-fullscreen-btn,
    .ziyuanxiazai-iframe-close-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .ziyuanxiazai-iframe-title {
        font-size: 16px;
        flex: 1;
    }
    
    .ziyuanxiazai-iframe-controls {
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .ziyuanxiazai-iframe-header {
        padding: 6px 10px;
    }
    
    .ziyuanxiazai-iframe-back-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .ziyuanxiazai-iframe-title {
        font-size: 14px;
    }
    
    .ziyuanxiazai-iframe-fullscreen-btn,
    .ziyuanxiazai-iframe-close-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    /* 移动端优化：控制按钮更加紧凑 */
    .ziyuanxiazai-iframe-controls {
        gap: 4px;
    }
}

.ziyuanxiazai-modal-body .text {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background-color: white;
    box-sizing: border-box;
}

.ziyuanxiazai-modal-body .text:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.ziyuanxiazai-modal-body .text::placeholder {
    color: #a0aec0;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .ziyuanxiazai-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .ziyuanxiazai-modal-header,
    .ziyuanxiazai-dialog {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .button {
        padding: 12px 16px;
        font-size: 14px;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 下载按钮容器样式 - 现代UI设计 */
.ziyuanxiazai-container {
    margin: 30px 0;
    padding: 24px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05), 0 6px 10px rgba(0, 0, 0, 0.03);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    animation: fadeIn 0.3s ease-out;
}

.ziyuanxiazai-container .ziyuanxiazai-title {
    margin: 0 0 20px 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    border-bottom: 2px solid #4299e1;
    padding-bottom: 12px;
    display: inline-block;
}

/* 主内容区域布局 */
.ziyuanxiazai-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* 左侧按钮组区域 */
.ziyuanxiazai-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1;
  margin-right: 15px;
}

/* 右侧演示按钮区域 */
.ziyuanxiazai-demo-link {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.ziyuanxiazai-demo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.ziyuanxiazai-demo-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(40, 167, 69, 0.3);
}

.ziyuanxiazai-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.ziyuanxiazai-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(66, 153, 225, 0.2);
    outline: none;
}

.ziyuanxiazai-download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(66, 153, 225, 0.3);
}

.ziyuanxiazai-download-btn:active {
    transform: translateY(0);
}

.ziyuanxiazai-external-btn {
    background: linear-gradient(135deg, #6f42c1 0%, #5a32a3 100%);
    box-shadow: 0 2px 4px rgba(111, 66, 193, 0.2);
}

.ziyuanxiazai-external-btn:hover {
    box-shadow: 0 4px 6px rgba(111, 66, 193, 0.3);
}

.ziyuanxiazai-code {
    margin-left: 16px;
    padding: 10px 16px;
    background: #f7fafc;
    border-radius: 8px;
    font-size: 14px;
    color: #4a5568;
    border: 1px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ziyuanxiazai-code strong {
    color: #f56565;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
}

.ziyuanxiazai-code strong:hover {
    color: #e53e3e;
}

.ziyuanxiazai-empty {
    color: #a0aec0;
    font-size: 14px;
    padding: 20px 0;
    text-align: center;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px dashed #e2e8f0;
}

.ziyuanxiazai-info {
    font-size: 14px;
    color: #718096;
    margin-top: 16px;
    line-height: 1.6;
    padding: 12px 16px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #4299e1;
}

/* 移动设备响应式调整 */
@media (max-width: 768px) {
  .ziyuanxiazai-container {
    margin: 20px 0;
    padding: 16px;
    box-sizing: border-box;
  }
  
  .ziyuanxiazai-content {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
  }
  
  /* 在移动设备上，演示按钮优先排在第一位 */
  .ziyuanxiazai-demo-link {
    order: 1;
    align-self: stretch;
    margin-bottom: 12px;
    width: 100%;
    box-sizing: border-box;
  }
  
  .ziyuanxiazai-buttons {
    order: 2;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-right: 0;
    width: 100%;
    box-sizing: border-box;
  }
  
  /* 确保所有按钮完全适应容器宽度 */
  .ziyuanxiazai-download-btn,
  .ziyuanxiazai-external-btn,
  .ziyuanxiazai-demo-btn {
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  /* 确保提取码按钮完全适应容器宽度 */
  .ziyuanxiazai-code {
    margin-left: 0;
    margin-top: 12px;
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 12px 16px;
    font-size: 14px;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* 平板设备响应式调整 */
@media (min-width: 769px) and (max-width: 1024px) {
  .ziyuanxiazai-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .ziyuanxiazai-buttons {
    flex-wrap: wrap;
    gap: 12px;
    margin-right: 0;
    margin-bottom: 15px;
  }
  
  .ziyuanxiazai-demo-link {
    align-self: stretch;
    margin-bottom: 10px;
  }
  
  .ziyuanxiazai-download-btn,
  .ziyuanxiazai-external-btn,
  .ziyuanxiazai-demo-btn {
    padding: 10px 20px;
  }
}