/*
 * 智能预警系统 - 面板安装页面样式
 * 文件路径: frontend/resources/css/panel-install.css
 * 设计风格: 参考 1Panel 快速安装页面
 */

/* ========================================
   页面容器
   ======================================== */
.panel-install-wrapper {
    min-height: 100vh;
    background: #f5f7fa;
    overflow-x: hidden;
}

/* ========================================
   Hero 区域 - 页面顶部介绍
   ======================================== */
.pi-hero {
    background: linear-gradient(135deg, #1a2332 0%, #243447 50%, #0d4a7a 100%);
    color: #ffffff;
    padding: 80px 0 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pi-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(0, 102, 204, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 102, 204, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.pi-hero .container {
    position: relative;
    z-index: 1;
}

.pi-hero-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.pi-hero-subtitle {
    font-size: 18px;
    opacity: 0.85;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========================================
   安装步骤区域
   ======================================== */
.pi-steps-section {
    padding: 60px 0 40px;
    background: #ffffff;
}

.pi-section-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1f36;
    text-align: center;
    margin-bottom: 8px;
}

.pi-section-subtitle {
    font-size: 15px;
    color: #5a6178;
    text-align: center;
    margin-bottom: 50px;
}

/* 单个步骤 */
.pi-step {
    margin-bottom: 48px;
    display: flex;
    align-items: flex-start;
}

.pi-step:last-child {
    margin-bottom: 0;
}

.pi-step-number {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066cc 0%, #0088ff 100%);
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    margin-top: 2px;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.pi-step-content {
    flex: 1;
    min-width: 0;
}

.pi-step-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1f36;
    margin-bottom: 8px;
}

.pi-step-desc {
    font-size: 14px;
    color: #5a6178;
    line-height: 1.6;
    margin-bottom: 16px;
}

.pi-step-desc a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.pi-step-desc a:hover {
    text-decoration: underline;
}

/* 系统要求标签 */
.pi-requirements {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.pi-req-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: #f0f5ff;
    color: #0066cc;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #d6e4ff;
}

.pi-req-tag i {
    margin-right: 5px;
    font-size: 11px;
}

/* ========================================
   终端代码块样式
   ======================================== */
.pi-terminal {
    background: #1e1e2e;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.pi-terminal-header {
    background: #2d2d3f;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pi-terminal-dots {
    display: flex;
    gap: 7px;
}

.pi-terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.pi-terminal-dot.red { background: #ff5f57; }
.pi-terminal-dot.yellow { background: #febc2e; }
.pi-terminal-dot.green { background: #28c840; }

.pi-terminal-title {
    color: #8892a6;
    font-size: 12px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.pi-terminal-actions {
    display: flex;
    gap: 8px;
}

.pi-copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #a0a8b8;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pi-copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.pi-copy-btn.copied {
    background: rgba(40, 200, 64, 0.2);
    color: #28c840;
    border-color: rgba(40, 200, 64, 0.3);
}

.pi-terminal-body {
    padding: 20px;
    overflow-x: auto;
}

.pi-terminal-body pre {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    color: #50fa7b;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-all;
}

.pi-terminal-body .pi-prompt {
    color: #bd93f9;
    user-select: none;
}

.pi-terminal-body .pi-comment {
    color: #6272a4;
}

.pi-terminal-body .pi-command {
    color: #50fa7b;
}

.pi-terminal-body .pi-url {
    color: #8be9fd;
}

/* ========================================
   环境信息卡片
   ======================================== */
.pi-env-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
}

.pi-env-card {
    flex: 1;
    min-width: 200px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.25s ease;
}

.pi-env-card:hover {
    border-color: #0066cc;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.1);
}

.pi-env-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 10px;
}

.pi-env-card-icon.php { background: #e8e1f5; color: #7b61c4; }
.pi-env-card-icon.mysql { background: #e1f0f5; color: #00758f; }
.pi-env-card-icon.redis { background: #fce4e4; color: #dc382d; }
.pi-env-card-icon.nginx { background: #e1f5e8; color: #009639; }

.pi-env-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1f36;
    margin-bottom: 4px;
}

.pi-env-card-desc {
    font-size: 12px;
    color: #5a6178;
    margin: 0;
}

/* ========================================
   面板访问信息
   ======================================== */
.pi-access-info {
    margin-top: 16px;
    background: #f0f9ff;
    border: 1px solid #bae0ff;
    border-radius: 8px;
    padding: 20px;
}

.pi-access-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #d6e4ff;
}

.pi-access-row:last-child {
    border-bottom: none;
}

.pi-access-label {
    flex-shrink: 0;
    width: 120px;
    font-size: 14px;
    font-weight: 600;
    color: #1a1f36;
}

.pi-access-value {
    flex: 1;
    font-size: 14px;
    color: #0066cc;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* ========================================
   帮助支持区域
   ======================================== */
.pi-help-section {
    padding: 50px 0;
    background: #f5f7fa;
    text-align: center;
}

.pi-help-title {
    font-size: 22px;
    font-weight: 600;
    color: #1a1f36;
    margin-bottom: 8px;
}

.pi-help-subtitle {
    font-size: 14px;
    color: #5a6178;
    margin-bottom: 30px;
}

.pi-help-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.pi-help-card {
    display: flex;
    align-items: center;
    padding: 16px 28px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: #1a1f36;
    transition: all 0.25s ease;
    min-width: 180px;
    justify-content: center;
}

.pi-help-card:hover {
    border-color: #0066cc;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.12);
    color: #0066cc;
    text-decoration: none;
    transform: translateY(-2px);
}

.pi-help-card i {
    font-size: 18px;
    margin-right: 10px;
    color: #0066cc;
}

.pi-help-card span {
    font-size: 14px;
    font-weight: 500;
}

/* ========================================
   注意事项区域
   ======================================== */
.pi-notes-section {
    padding: 50px 0;
    background: #ffffff;
}

.pi-notes-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.pi-note-card {
    flex: 1;
    min-width: 260px;
    padding: 24px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.25s ease;
}

.pi-note-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.pi-note-card.warning {
    border-left: 4px solid #ff8c00;
}

.pi-note-card.info {
    border-left: 4px solid #0066cc;
}

.pi-note-card.success {
    border-left: 4px solid #00875a;
}

.pi-note-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 12px;
}

.pi-note-card.warning .pi-note-icon {
    background: #fff7e6;
    color: #ff8c00;
}

.pi-note-card.info .pi-note-icon {
    background: #e6f2ff;
    color: #0066cc;
}

.pi-note-card.success .pi-note-icon {
    background: #e6f5f0;
    color: #00875a;
}

.pi-note-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1f36;
    margin-bottom: 8px;
}

.pi-note-desc {
    font-size: 13px;
    color: #5a6178;
    line-height: 1.6;
    margin: 0;
}

.pi-note-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.pi-note-list li {
    font-size: 13px;
    color: #5a6178;
    padding: 3px 0;
    padding-left: 16px;
    position: relative;
}

.pi-note-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #0066cc;
    font-weight: bold;
}

/* ========================================
   CTA 区域（底部号召行动）
   ======================================== */
.pi-cta-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #1a2332 0%, #243447 50%, #0d4a7a 100%);
    color: #ffffff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pi-cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(0, 102, 204, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 102, 204, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.pi-cta-section .container {
    position: relative;
    z-index: 1;
}

.pi-cta-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 12px;
}

.pi-cta-desc {
    font-size: 15px;
    opacity: 0.85;
    margin-bottom: 28px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.pi-cta-btn {
    display: inline-block;
    padding: 12px 36px;
    background: #0066cc;
    color: #ffffff;
    border: 2px solid #0066cc;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    margin: 0 8px;
}

.pi-cta-btn:hover {
    background: #004d99;
    border-color: #004d99;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.pi-cta-btn.outline {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
}

.pi-cta-btn.outline:hover {
    background: #ffffff;
    color: #1a2332;
    border-color: #ffffff;
}

/* ========================================
   响应式设计
   ======================================== */

/* 平板端 */
@media (max-width: 1199px) {
    .pi-hero-title {
        font-size: 30px;
    }
    .pi-section-title {
        font-size: 24px;
    }
}

/* 移动端 */
@media (max-width: 767px) {
    .pi-hero {
        padding: 60px 0 40px;
    }
    .pi-hero-title {
        font-size: 24px;
    }
    .pi-hero-subtitle {
        font-size: 15px;
    }
    .pi-steps-section {
        padding: 40px 0 30px;
    }
    .pi-section-title {
        font-size: 22px;
    }
    .pi-step {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 36px;
    }
    .pi-step-number {
        margin-right: 0;
        margin-bottom: 12px;
    }
    .pi-terminal-body pre {
        font-size: 12px;
    }
    .pi-env-cards {
        flex-direction: column;
    }
    .pi-env-card {
        min-width: auto;
    }
    .pi-help-cards {
        flex-direction: column;
        align-items: center;
    }
    .pi-help-card {
        width: 100%;
        max-width: 300px;
    }
    .pi-notes-grid {
        flex-direction: column;
    }
    .pi-note-card {
        min-width: auto;
    }
    .pi-cta-title {
        font-size: 22px;
    }
    .pi-cta-btn {
        display: block;
        margin: 8px auto;
        max-width: 280px;
    }
    .pi-access-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .pi-access-label {
        margin-bottom: 4px;
    }
}

/* 小屏幕手机 */
@media (max-width: 479px) {
    .pi-hero-title {
        font-size: 22px;
    }
    .pi-section-title {
        font-size: 20px;
    }
    .pi-terminal-body {
        padding: 14px;
    }
    .pi-terminal-body pre {
        font-size: 11px;
    }
}
