/* 晴玖极简发卡系统 - 安装向导样式 */

:root {
    --primary-color: #4776E6;
    --primary-hover: #3a67d2;
    --secondary-color: #58a6ff;
    --text-color: #333;
    --light-text: #6c757d;
    --border-color: #e0e0e0;
    --bg-color: #f8f9fa;
    --card-bg: #fff;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* 基础样式 */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* 安装向导容器 */
.install-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 安装标题样式 */
.install-header {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: fadeIn 0.8s ease;
}

.install-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

.install-subtitle {
    color: var(--light-text);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* 步骤指示器 */
.step-indicator {
    margin-bottom: 2rem;
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.nav-tabs {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: none;
}

.nav-item {
    flex: 1;
    text-align: center;
}

.nav-link {
    display: block;
    padding: 1rem 0.5rem;
    color: var(--light-text);
    position: relative;
    border: none;
    border-radius: 0;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.nav-link:hover {
    background-color: rgba(71, 118, 230, 0.05);
    text-decoration: none;
}

.nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 3px solid var(--primary-color);
    background-color: rgba(71, 118, 230, 0.1);
}

.nav-link.complete {
    color: var(--success-color);
    border-bottom: 3px solid var(--success-color);
}

/* 卡片样式 */
.card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: none;
    margin-bottom: 2rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    border-bottom: none;
}

.card-header h5 {
    margin: 0;
    font-size: 1.25rem;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
}

/* 表单元素样式 */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.form-control, .form-select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(71, 118, 230, 0.25);
}

.form-text {
    color: var(--light-text);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.form-check {
    margin-bottom: 0.75rem;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 按钮样式 */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-outline-secondary {
    color: #6c757d;
    border: 1px solid #6c757d;
    background-color: transparent;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
}

.btn.disabled, .btn:disabled {
    opacity: 0.65;
    pointer-events: none;
}

/* 步骤按钮区域 */
.step-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding: 15px;
}

/* 警告框样式 */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.15);
    color: var(--danger-color);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.alert-info {
    background-color: rgba(23, 162, 184, 0.15);
    color: var(--info-color);
    border: 1px solid rgba(23, 162, 184, 0.2);
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.15);
    color: #856404;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

/* 环境检测模块 */
.check-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.check-item:last-child {
    border-bottom: none;
}

.check-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.check-label {
    font-weight: 500;
}

.check-value {
    display: flex;
    align-items: center;
}

.check-value .badge {
    padding: 0.5em 0.8em;
    border-radius: 50rem;
    font-weight: 500;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
}

.badge-danger {
    background-color: var(--danger-color);
    color: white;
}

.badge-warning {
    background-color: var(--warning-color);
    color: white;
}

/* 协议框样式 */
.agreement-box {
    max-height: 400px;
    overflow-y: auto;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #f9f9f9;
    margin: 1.5rem 0;
}

.agreement-box h4 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.agreement-box h5 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: #444;
}

/* 数据库配置表单 */
#test-result {
    transition: var(--transition);
    margin: 1rem 0;
}

/* 用户密钥验证区域 */
.weixin-auth-section {
    background-color: rgba(71, 118, 230, 0.05);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(71, 118, 230, 0.1);
}

.weixin-auth-section.verified {
    background-color: rgba(40, 167, 69, 0.05);
    border: 1px solid rgba(40, 167, 69, 0.1);
}

.key-input-group {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: none;
    border: none;
    color: var(--light-text);
    cursor: pointer;
}

.verification-result {
    margin-top: 1rem;
    display: none;
    animation: fadeIn 0.3s ease;
}

/* 密钥获取教程 */
.tutorial-card {
    margin-top: 1.5rem;
    border-radius: 10px;
}

.tutorial-step {
    padding: 1.5rem;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.02);
    height: 100%;
    transition: var(--transition);
}

.tutorial-step:hover {
    background-color: rgba(71, 118, 230, 0.05);
    transform: translateY(-3px);
}

.tutorial-step i {
    color: var(--primary-color);
}

/* 安装完成页面 */
.install-complete {
    text-align: center;
    padding: 2rem 0;
}

.install-complete-icon {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 1.5rem;
}

.install-complete h4 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.install-complete p {
    margin-bottom: 2rem;
    color: var(--light-text);
}

/* 底部版权信息 */
footer {
    text-align: center;
    color: var(--light-text);
    margin-top: 3rem;
    font-size: 0.9rem;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 0.2rem solid rgba(71, 118, 230, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-right: 0.5rem;
}

/* 响应式调整 */
@media (max-width: 576px) {
    .install-title {
        font-size: 2rem;
    }

    .install-subtitle {
        font-size: 1rem;
    }

    .step-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .step-buttons > div {
        width: 100%;
    }

    .step-buttons .btn {
        width: 100%;
        display: block;
    }

    .nav-link {
        padding: 0.75rem 0.25rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .card-body {
        padding: 1.25rem;
    }
}

/* 高级交互元素样式 */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group .form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: #e9ecef;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.input-group > .form-control:not(:last-child),
.input-group > .input-group-text:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group > .form-control:not(:first-child),
.input-group > .input-group-text:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* 添加反馈和过渡动画 */
.form-control:focus,
.form-select:focus,
.btn:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(71, 118, 230, 0.25);
}

.btn:active {
    transform: scale(0.98);
}

/* 站长工具卡片图标 */
.icon {
    vertical-align: middle;
    margin-right: 0.5rem;
}

/* Responsive Styles */
@media (max-width: 767.98px) { /* Medium devices (tablets, less than 768px) */
    .install-container {
        max-width: none; /* Remove max-width for smaller screens */
        padding: 0 10px; /* Reduce padding */
    }

    .install-header {
        margin-bottom: 1.5rem; /* Reduce margin bottom for header */
    }

    .install-title {
        font-size: 1.8rem; /* Decrease title size */
    }

    .install-subtitle {
        font-size: 1rem; /* Decrease subtitle size */
    }

    /* Style the mobile step title */
    .mobile-step-title {
        background-color: rgba(71, 118, 230, 0.1); /* Light primary background */
        padding: 0.75rem 1rem;
        border-radius: 8px;
        margin-bottom: 1.5rem !important; /* Override Bootstrap mb-3 if needed */
    }
    .mobile-step-title h5 {
       font-size: 1.1rem; /* Adjust font size */
       font-weight: 600; /* Make it slightly bolder */
    }

    .card-body {
        padding: 1rem; /* Reduce card padding */
    }

    .step-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 0.5rem; /* Add gap between stacked buttons */
    }

    .step-buttons > div {
        width: 100%; /* Make buttons full width */
    }

    .step-buttons .btn {
        width: 100%; /* Ensure button takes full width */
        text-align: center;
    }

    /* Adjust table font size for readability */
    .table {
        font-size: 0.9rem;
    }

    .table th,
    .table td {
        padding: 0.5rem 0.4rem; /* Reduce table cell padding */
        white-space: normal; /* Allow text wrapping in table cells */
    }

    /* Improve form layout */
    .form-label {
        font-size: 0.95rem;
    }
    .form-control,
    .form-select,
    .btn {
        font-size: 0.95rem; /* Slightly smaller font for form elements */
        padding: 0.6rem 1rem;
    }

    /* Ensure preformatted text wraps */
    pre {
        white-space: pre-wrap;       /* Since CSS 2.1 */
        white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
        white-space: -pre-wrap;      /* Opera 4-6 */
        white-space: -o-pre-wrap;    /* Opera 7 */
        word-wrap: break-word;       /* Internet Explorer 5.5+ */
        font-size: 0.85rem; /* Slightly smaller font for code blocks */
    }
}

@media (max-width: 575.98px) { /* Small devices (landscape phones, less than 576px) */
    body {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
     .install-header {
        margin-bottom: 1rem; /* Further reduce margin bottom */
    }
    .install-title {
        font-size: 1.6rem;
    }
    .install-subtitle {
        font-size: 0.9rem;
    }
    /* Further style mobile step title if needed */
     .mobile-step-title {
        padding: 0.6rem 0.8rem;
        margin-bottom: 1rem !important;
    }
     .mobile-step-title h5 {
       font-size: 1rem;
    }

    .card-header {
        padding: 1rem 1.25rem;
    }
    .card-header h5 {
        font-size: 1.1rem;
    }
    .card-body {
        padding: 1rem 0.8rem;
    }
    /* Further reduce table font size if needed */
    .table {
        font-size: 0.85rem;
    }
    .table th,
    .table td {
        padding: 0.4rem 0.3rem;
    }
    /* Ensure step buttons have some margin when stacked */
    .step-buttons {
        margin-top: 1rem;
    }
}

/* General Adjustments (can be outside media queries if needed) */
.table-responsive {
    margin-top: 1rem; /* Add some top margin to responsive tables */
}

/* Ensure icons have consistent vertical alignment */
.bi {
    vertical-align: middle;
    display: inline-block; /* Ensure vertical-align works */
}

/* Add specific styling for step buttons if not covered by general button styles */
.step-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding: 10px; /* Add padding if step file doesn't have it */
    align-items: center; /* Vertically align items */
}

/* Style for the agreement box scroll */
.agreement-box {
    max-height: 400px; /* Limit height */
    overflow-y: auto; /* Add scrollbar */
    border: 1px solid var(--border-color);
    padding: 1rem;
    margin-bottom: 1rem; /* Add space below */
    border-radius: 8px;
    background-color: #fdfdfd; /* Slightly different background */
    font-size: 0.9rem; /* Slightly smaller font for agreement text */
}

/* Style code blocks */
pre {
    background-color: #212529; /* Dark background */
    color: #f8f9fa; /* Light text */
    padding: 1rem;
    border-radius: 5px;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    overflow-x: auto; /* Add horizontal scroll if needed */
    white-space: pre-wrap; /* Wrap text */
    word-wrap: break-word;
}

/* Ensure input groups look good */
.input-group .btn {
    border-radius: 0 8px 8px 0; /* Match form control radius on right */
}

.input-group .input-group-text {
    border-radius: 8px 0 0 8px; /* Match form control radius on left */
    background-color: #e9ecef;
    border: 1px solid var(--border-color);
}

/* Accordion Adjustments */
.accordion-button {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
}
.accordion-button:not(.collapsed) {
    background-color: rgba(71, 118, 230, 0.1); /* Lighter background when open */
    color: var(--primary-color);
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.125);
}
.accordion-button:focus {
     box-shadow: 0 0 0 0.2rem rgba(71, 118, 230, 0.25); /* Keep focus style */
}
.accordion-item {
    border: 1px solid var(--border-color); /* Add border to item */
    border-radius: 8px; /* Match card radius */
    overflow: hidden; /* Ensure content respects radius */
    margin-bottom: 0.5rem; /* Add slight margin between items if multiple */
}
.accordion-item:first-of-type .accordion-button {
    border-top-left-radius: 7px; /* Adjust for outer radius */
    border-top-right-radius: 7px;
}
.accordion-item:last-of-type .accordion-button.collapsed {
     border-bottom-left-radius: 7px;
    border-bottom-right-radius: 7px;
}

.accordion-body {
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    background-color: #fdfdfd; /* Slightly different bg for body */
}

/* Style the list group inside accordion */
.accordion-body .list-group-item {
    background: none; /* Transparent background */
    padding-left: 0 !important; /* Override default padding */
    padding-right: 0;
    margin-bottom: 0.5rem;
}
.accordion-body .list-group-numbered > li::before {
    font-weight: bold;
    color: var(--primary-color);
}
.accordion-body code {
    font-size: 0.85em;
    color: #d63384; /* Bootstrap's pink for code */
    word-wrap: break-word;
}

/* Style the inline SVG icon */
.accordion-body .icon {
    width: 18px; /* Slightly smaller */
    height: 18px;
    vertical-align: -3px; /* Adjust vertical alignment */
    fill: var(--primary-color);
}

/* Center success icon in step 5 */
.install-success .success-icon svg {
    display: block;
    margin-left: auto;
    margin-right: auto;
} 