/* Install Page Styles */

/* Hero Section */
.install-hero {
    padding: 120px 0 60px;
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
}

.install-hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.install-hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.install-hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.install-hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.gitlab-link-top {
    margin-top: 1.5rem;
}

.gitlab-link-top a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.gitlab-link-top a:hover {
    color: var(--secondary-color);
}

.gitlab-link-top svg {
    width: 16px;
    height: 16px;
}

/* Quick Start Toggle */
.quick-start-toggle-section {
    padding: 1.5rem 0;
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
}

.quick-start-toggle {
    display: flex;
    justify-content: center;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 26px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 13px;
    transition: all 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--text-secondary);
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s;
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(24px);
    background: white;
}

.toggle-text {
    color: var(--text-primary);
    font-weight: 500;
}

/* Stepper Section */
.stepper-section {
    padding: 4rem 0;
    min-height: calc(100vh - 200px);
}

.stepper-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Progress Indicator */
.stepper-progress {
    margin-bottom: 3rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--surface);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 11.11%; /* 1/9 */
}

.progress-text {
    text-align: center;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Steps Container */
.steps-container {
    position: relative;
    min-height: 600px;
}

.step-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transform: translateX(50px);
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.step-panel.active {
    position: relative;
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.step-panel.quick-start {
    position: relative;
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
    margin-bottom: 3rem;
}

.step-panel.quick-start:not(.active) {
    opacity: 0.7;
}

.step-header {
    margin-bottom: 2rem;
}

.step-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.step-what h3,
.step-checklist h3,
.step-commands h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.step-what p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Checklist */
.checklist-items {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checklist-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checklist-item label {
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}

/* Terminal Blocks */
.terminal-block {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #0d0d0d;
    border-bottom: 1px solid #333;
}

.terminal-title {
    color: #888;
    font-size: 0.85rem;
    font-weight: 500;
}

.copy-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.copy-btn.copied {
    background: #10b981;
}

.terminal-content {
    padding: 1rem;
    color: #00ff00;
    font-size: 0.95rem;
    line-height: 1.6;
}

.terminal-content code {
    color: inherit;
    background: none;
    padding: 0;
    font-family: inherit;
}

.terminal-output {
    background: #0d0d0d;
}

.terminal-output .terminal-content {
    color: #00d4ff;
}

.output-line {
    display: block;
    margin-bottom: 0.5rem;
}

/* Env Config Block */
.env-config-block {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 1rem;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

.env-config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #0d0d0d;
    border-bottom: 1px solid #333;
    gap: 1rem;
    flex-wrap: wrap;
}

.env-config-title {
    color: #888;
    font-size: 0.85rem;
    font-weight: 500;
}

.help-btn {
    background: transparent;
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.help-btn:hover {
    background: var(--secondary-color);
    color: white;
}

.env-config-content {
    padding: 1rem;
    color: #00ff00;
    font-size: 0.9rem;
    line-height: 1.8;
}

.env-line {
    display: block;
    margin-bottom: 0.5rem;
}

.env-key {
    color: #00ff00;
}

.env-value {
    color: #ffaa00;
}

/* Scopes List */
.scopes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.scope-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.scope-item code {
    background: var(--surface);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    color: var(--primary-color);
    font-weight: 600;
}

.scope-item span {
    color: var(--text-secondary);
}

/* Steps List */
.steps-list {
    list-style: decimal;
    padding-left: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.steps-list li {
    margin-bottom: 0.75rem;
}

.steps-list a {
    color: var(--primary-color);
    text-decoration: none;
}

.steps-list a:hover {
    text-decoration: underline;
}

/* Token Input */
.token-input-block {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.token-input-block label {
    display: block;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.token-input-wrapper {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.token-input {
    flex: 1;
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.token-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.validate-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.validate-btn:hover {
    background: var(--primary-dark);
}

.token-validation-result {
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    display: none;
}

.token-validation-result.valid {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid #10b981;
}

.token-validation-result.invalid {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid #ef4444;
}

/* Command Test Block */
.command-test-block {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.command-test-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.command-test-item code {
    background: var(--surface);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    color: var(--primary-color);
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.command-test-item span {
    color: var(--text-secondary);
}

.bot-permissions-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(145, 71, 255, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    color: var(--text-secondary);
}

/* Deploy Tabs */
.deploy-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.deploy-tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.deploy-tab:hover {
    color: var(--text-primary);
}

.deploy-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.deploy-content {
    position: relative;
    min-height: 300px;
}

.deploy-panel {
    display: none;
}

.deploy-panel.active {
    display: block;
}

.deploy-note,
.deploy-warning {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
}

.deploy-warning {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

/* Troubleshoot Accordion */
.troubleshoot-toggle {
    width: 100%;
    padding: 1rem;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s;
}

.troubleshoot-toggle:hover {
    background: var(--surface);
    border-color: var(--primary-color);
}

.troubleshoot-toggle::after {
    content: ' ▼';
    float: right;
    transition: transform 0.3s;
}

.troubleshoot-toggle.active::after {
    transform: rotate(180deg);
}

.troubleshoot-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 0.5rem;
}

.troubleshoot-content.active {
    max-height: 1000px;
    padding: 1rem;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.troubleshoot-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.troubleshoot-content code {
    background: var(--surface);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    color: var(--primary-color);
    font-size: 0.9em;
}

.troubleshoot-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.troubleshoot-content a:hover {
    text-decoration: underline;
}

/* Diagnostics */
.diagnostics-btn {
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 1.5rem;
}

.diagnostics-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.diagnostics-results {
    padding: 1.5rem;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: none;
}

.diagnostics-results.active {
    display: block;
}

.diagnostics-results .diagnostic-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.diagnostics-results .diagnostic-item.pass {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.diagnostics-results .diagnostic-item.fail {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* GitLab Repo Box */
.gitlab-repo-box {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--surface-light);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
}

.gitlab-repo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.gitlab-repo-link:hover {
    color: var(--secondary-color);
}

.gitlab-repo-link svg {
    width: 24px;
    height: 24px;
}

/* Step Navigation */
.step-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.nav-btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.nav-btn-back {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.nav-btn-back:hover:not(:disabled) {
    background: var(--surface-light);
    border-color: var(--primary-color);
}

.nav-btn-back:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-btn-next {
    background: var(--gradient-1);
    color: white;
}

.nav-btn-next:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 2rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--surface-light);
    color: var(--text-primary);
}

.modal-content h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.env-help-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.env-help-item p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.env-help-item code {
    background: var(--surface-light);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: var(--primary-color);
}

.env-help-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.env-help-item a:hover {
    text-decoration: underline;
}

/* Nav Active State */
.nav-active {
    color: var(--primary-color) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .step-panel {
        padding: 1.5rem;
    }

    .step-title {
        font-size: 1.5rem;
    }

    .install-hero-cta {
        flex-direction: column;
    }

    .step-navigation {
        flex-direction: column;
    }

    .nav-btn {
        width: 100%;
    }

    .env-config-header {
        flex-direction: column;
        align-items: stretch;
    }

    .token-input-wrapper {
        flex-direction: column;
    }

    .deploy-tabs {
        flex-direction: column;
    }
}
