/*
PROPRIETARY AND CONFIDENTIAL INFORMATION - TRADE SECRET

Copyright (c) 2026 Spaceflux Ltd. All rights reserved.

NOTICE:

This software and the algorithms contained herein are the confidential and
proprietary trade secrets of Spaceflux Ltd.

Unauthorized copying, modification, distribution, or reverse engineering of
this software, or any portion thereof, is strictly prohibited without the
express written consent of Spaceflux Ltd.
*/

/* ---------------------------------------------------------------------------
   Design tokens mapped to the Spaceflux Design System (design-system-2).
   Dark theme is the default/canonical brand appearance.
   Source: resources/design-system-2/styles/variables.css
--------------------------------------------------------------------------- */
:root {
    --spaceflux-bg: #100919;              /* surface-dark */
    --spaceflux-surface: #1D1825;         /* on-surface-dark-subtle */
    --spaceflux-surface-hover: #312A39;   /* surface-dark-progress */
    --spaceflux-border: #36274A;          /* border-on-dark-contrast */
    --spaceflux-primary: #6B29AE;         /* brand-deep-purple */
    --spaceflux-primary-hover: #924AE4;   /* primary-400 */
    --spaceflux-accent: #CF8BFF;          /* brand-medium-orchid */
    --spaceflux-text: #EEEEEE;            /* on-surface-dark */
    --spaceflux-text-secondary: #BDBCC0;  /* grey-200 */
    --spaceflux-text-muted: #97959C;      /* grey-300 */
    --spaceflux-success: #00B55F;         /* surface-success-dark */
    --spaceflux-warning: #DCAA00;         /* surface-warning-dark */
    --spaceflux-error: #CF0019;           /* surface-error-dark */
    --spaceflux-card-bg: #292134;         /* surface-dark-contrast */
    --spaceflux-card-border: #36274A;     /* border-on-dark-contrast */
}

/* Light theme variables */
:root.light-theme {
    --spaceflux-bg: #FFFFFF;              /* surface-light */
    --spaceflux-surface: #F8F8F8;         /* applied-on-primary */
    --spaceflux-surface-hover: #F1EEF7;   /* tinted brand surface */
    --spaceflux-border: #E5E4E6;          /* grey-100 */
    --spaceflux-primary: #6B29AE;         /* brand-deep-purple */
    --spaceflux-primary-hover: #924AE4;   /* primary-400 */
    --spaceflux-accent: #924AE4;          /* primary-400 (accent on light) */
    --spaceflux-text: #222222;            /* on-surface-light */
    --spaceflux-text-secondary: #504E55;  /* grey-500 */
    --spaceflux-text-muted: #737079;      /* grey-400 */
    --spaceflux-success: #008338;         /* quinary-400 */
    --spaceflux-warning: #9F6F00;         /* accessible warning on light */
    --spaceflux-error: #CE1628;           /* tertiary-400 */
    --spaceflux-card-bg: #FFFFFF;
    --spaceflux-card-border: #E5E4E6;
}

/* Print styles - Always use light mode for printing */
@media print {
    :root {
        --spaceflux-bg: #ffffff !important;
        --spaceflux-surface: #f8f8f8 !important;
        --spaceflux-surface-hover: #f1eef7 !important;
        --spaceflux-border: #e5e4e6 !important;
        --spaceflux-primary: #6B29AE !important;
        --spaceflux-primary-hover: #924AE4 !important;
        --spaceflux-accent: #924AE4 !important;
        --spaceflux-text: #222222 !important;
        --spaceflux-text-secondary: #504E55 !important;
        --spaceflux-text-muted: #737079 !important;
        --spaceflux-success: #008338 !important;
        --spaceflux-warning: #9F6F00 !important;
        --spaceflux-error: #CE1628 !important;
        --spaceflux-card-bg: #ffffff !important;
        --spaceflux-card-border: #e5e4e6 !important;
    }
    
    /* Additional print optimizations */
    body {
        background: white !important;
        color: black !important;
        font-size: 12px !important;
        line-height: 1.3 !important;
    }
    
    .header,
    .sidebar,
    .footer,
    .btn,
    .btn-theme-toggle {
        display: none !important;
    }
    
    /* Hide breadcrumb navigation when printing */
    .breadcrumb {
        display: none !important;
    }
    
    .main-content {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }
    
    .content-area {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Reduce font sizes for print */
    h1 {
        font-size: 20px !important;
        margin-bottom: 12px !important;
    }
    
    h2 {
        font-size: 16px !important;
        margin-bottom: 10px !important;
    }
    
    h3 {
        font-size: 14px !important;
        margin-bottom: 8px !important;
    }
    
    h4, h5, h6 {
        font-size: 13px !important;
        margin-bottom: 6px !important;
    }
    
    p, li {
        font-size: 11px !important;
        margin-bottom: 6px !important;
        color: #333 !important;
    }
    
    /* Reduce image sizes for print */
    .logo-image {
        width: 100px !important;
        height: auto !important;
    }
    
    .screenshot-image {
        max-width: 50% !important;
        height: auto !important;
        border: 1px solid #ccc !important;
    }
    
    /* Simplified print layout - remove unnecessary styling */
    .category-header,
    .journey-card,
    .step-item,
    .step-header,
    .step-content,
    .journey-header,
    .journey-meta,
    .journey-steps {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 0 8px 0 !important;
        page-break-inside: avoid;
    }
    
    .journey-actions {
        display: none !important;
    }
    
    /* Hide related journeys section when printing */
    .related-journeys {
        display: none !important;
    }
    
    /* Simplify journey header for print */
    .journey-detail-header {
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 0 1rem 0 !important;
        text-align: left !important;
    }
    
    .journey-detail-header h1 {
        background: none !important;
        -webkit-background-clip: unset !important;
        -webkit-text-fill-color: unset !important;
        background-clip: unset !important;
        color: black !important;
        font-size: 18px !important;
        margin-bottom: 8px !important;
    }
    
    .journey-detail-description {
        font-size: 12px !important;
        color: #333 !important;
        margin-bottom: 8px !important;
    }
    
    .journey-detail-meta {
        margin-bottom: 8px !important;
    }
    
    .meta-tag {
        background: #f0f0f0 !important;
        color: #333 !important;
        border: 1px solid #ccc !important;
        padding: 2px 6px !important;
        font-size: 10px !important;
    }
    
    /* Clean step layout for print */
    .step-item {
        margin-bottom: 12px !important;
        page-break-inside: avoid;
    }
    
    .step-header {
        margin-bottom: 6px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
    }
    
    .step-content {
        margin-left: 0 !important;
    }
    
    /* Simplified step numbers - left aligned on own line */
    .step-number-large,
    .step-number {
        background: transparent !important;
        border: none !important;
        color: black !important;
        font-weight: bold !important;
        width: auto !important;
        height: auto !important;
        margin: 0 0 4px 0 !important;
        order: 1 !important;
        align-self: flex-start !important;
    }
    
    .step-number-large {
        font-size: 14px !important;
    }
    
    .step-number {
        font-size: 10px !important;
    }
    
    /* Step title container for print */
    .step-title-container {
        order: 2 !important;
        width: 100% !important;
    }
    
    /* Clean journey layout */
    .journey-card {
        margin-bottom: 16px !important;
        page-break-inside: avoid;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
    }
    
    .journey-title {
        font-size: 13px !important;
        margin-bottom: 4px !important;
        font-weight: bold !important;
    }
    
    .journey-description {
        font-size: 11px !important;
        margin-bottom: 6px !important;
    }
    
    .journey-meta {
        margin-bottom: 6px !important;
    }
    
    .meta-tag {
        background: transparent !important;
        border: none !important;
        color: #666 !important;
        padding: 0 !important;
        font-size: 10px !important;
    }
    
    /* Clean step lists */
    .step-list {
        list-style: none !important;
        padding-left: 0 !important;
        margin: 0 !important;
    }
    
    .step-list li {
        font-size: 10px !important;
        margin-bottom: 3px !important;
        padding-left: 0 !important;
    }
    
    /* Remove grid layouts for print */
    .journeys-grid,
    .related-grid {
        display: block !important;
        grid-template-columns: none !important;
        gap: 0 !important;
    }
    
    /* Clean category sections */
    .category-section {
        margin-bottom: 20px !important;
        page-break-inside: avoid;
    }
    
    .category-title {
        font-size: 16px !important;
        margin-bottom: 8px !important;
        border-bottom: 1px solid #ccc !important;
        padding-bottom: 4px !important;
    }
    
    /* Breadcrumb cleanup */
    .breadcrumb {
        margin-bottom: 12px !important;
        padding-bottom: 4px !important;
        border-bottom: 1px solid #ccc !important;
    }
    
    /* Remove any remaining decorative elements */
    .welcome-section,
    .page-header {
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        margin-bottom: 16px !important;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background-color: var(--spaceflux-bg);
    color-scheme: dark;
}

html.light-theme {
    color-scheme: light;
}

body {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--spaceflux-bg);
    color: var(--spaceflux-text);
    line-height: 1.6;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--spaceflux-surface) 0%, var(--spaceflux-card-bg) 100%);
    border-bottom: 1px solid var(--spaceflux-border);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 60px;
    margin-left: 24px;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.logo-link:hover {
    transform: scale(1.02);
}

.logo-image {
    width: 200px;
    height: auto;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logo-image:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}



.logo-text p {
    color: var(--spaceflux-text-secondary);
    font-size: 1rem;
    margin: 0;
    text-align: left;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--spaceflux-primary), var(--spaceflux-accent));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(146, 74, 228, 0.3);
}

.btn-secondary {
    background: var(--spaceflux-surface);
    color: var(--spaceflux-text);
    border: 1px solid var(--spaceflux-border);
}

.btn-secondary:hover {
    background: var(--spaceflux-surface-hover);
    border-color: var(--spaceflux-primary);
}

.btn-swagger {
    background: linear-gradient(135deg, #49cc28, #85ea2d);
    color: white;
    border: none;
}

.btn-swagger:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(73, 204, 40, 0.3);
    background: linear-gradient(135deg, #3da622, #7dd129);
}

.btn-theme-toggle {
    background: var(--spaceflux-surface);
    color: var(--spaceflux-text);
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--spaceflux-border);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
}

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

.btn-feedback {
    background: var(--spaceflux-surface);
    border: 1px solid var(--spaceflux-border);
    color: var(--spaceflux-text);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    min-width: auto;
    height: 48px;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-feedback:hover {
    background: var(--spaceflux-primary);
    border-color: var(--spaceflux-primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(146, 74, 228, 0.2);
}

.btn-feedback svg {
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.theme-icon {
    width: 20px;
    height: 20px;
}

.sun-icon {
    display: block;
}

.moon-icon {
    display: none;
}

.light-theme .sun-icon {
    display: none;
}

.light-theme .moon-icon {
    display: block;
}

/* Language Picker Styles */
.language-picker {
    position: relative;
    display: inline-block;
}

.btn-language-toggle {
    background: var(--spaceflux-surface);
    color: var(--spaceflux-text);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--spaceflux-border);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: auto;
    height: 48px;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

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

.language-text {
    white-space: nowrap;
    min-width: 60px;
    text-align: center;
}

.language-arrow {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.language-picker.open .language-arrow {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--spaceflux-surface);
    border: 1px solid var(--spaceflux-border);
    border-radius: 8px;
    margin-top: 0.5rem;
    min-width: 120px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.language-picker.open .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--spaceflux-text);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--spaceflux-border);
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: var(--spaceflux-surface-hover);
    color: var(--spaceflux-primary);
}

.language-option.active {
    background: var(--spaceflux-primary);
    color: white;
    font-weight: 500;
}

.language-option.active:hover {
    background: var(--spaceflux-primary-hover);
    color: white;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: minmax(280px, 320px) 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: start;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.sidebar-section {
    background: var(--spaceflux-surface);
    border: 1px solid var(--spaceflux-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-section ul,
.sidebar-section ol {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
}

.sidebar-section li {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.sidebar-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--spaceflux-text);
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav ul,
.sidebar-section ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
}

.sidebar-nav li,
.sidebar-section li {
    margin-bottom: 0.5rem;
    list-style: none !important;
    text-align: left;
}

.sidebar-nav a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--spaceflux-text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    text-align: left;
}

/* Special styling for the Links section */
.sidebar-section:last-child .sidebar-nav {
    text-align: center;
}

.sidebar-section:last-child .sidebar-nav li {
    margin-bottom: 0.75rem;
}

.sidebar-nav a:hover {
    background: var(--spaceflux-surface-hover);
    color: var(--spaceflux-text);
}

.sidebar-nav a.active {
    background: var(--spaceflux-primary);
    color: white;
}

/* Search functionality */
.search-container {
    position: relative;
}

/* Mobile Search Box - Hidden on desktop, visible on mobile */
.mobile-search-container {
    display: none;
    margin-bottom: 2rem;
}

.mobile-search-wrapper {
    position: relative;
    background: var(--spaceflux-surface);
    border: 1px solid var(--spaceflux-border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-search-input {
    font-size: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    border: 2px solid var(--spaceflux-border);
    background: var(--spaceflux-bg);
}

.mobile-search-input:focus {
    border-color: var(--spaceflux-primary);
    box-shadow: 0 0 0 3px rgba(146, 74, 228, 0.1);
}

.mobile-search-results {
    margin-top: 1rem;
    border-radius: 10px;
    max-height: 60vh;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile search styling improvements */
.mobile-search-wrapper h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--spaceflux-text);
}

/* Search icon removed for cleaner appearance */

/* Highlight matching text in mobile search results */
.mobile-search-results mark {
    background: rgba(146, 74, 228, 0.2);
    color: var(--spaceflux-primary);
    padding: 1px 3px;
    border-radius: 3px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 2.5rem;
    border: 1px solid var(--spaceflux-border);
    border-radius: 8px;
    background: var(--spaceflux-surface);
    color: var(--spaceflux-text);
    font-size: 0.875rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.clear-search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--spaceflux-text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: none;
}

.clear-search-btn:hover {
    color: var(--spaceflux-text);
    background: var(--spaceflux-surface-hover);
}

.clear-search-btn.show {
    display: block;
}

.search-input:focus {
    outline: none;
    border-color: var(--spaceflux-primary);
    background: var(--spaceflux-surface-hover);
}

.search-input::placeholder {
    color: var(--spaceflux-text-muted);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--spaceflux-surface);
    border: 1px solid var(--spaceflux-border);
    border-radius: 8px;
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.search-results.show {
    display: block;
}

.search-result-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--spaceflux-border);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--spaceflux-surface-hover);
}

.search-result-item .result-title {
    font-weight: 500;
    color: var(--spaceflux-text);
    margin-bottom: 0.25rem;
}

.search-result-item .result-category {
    font-size: 0.75rem;
    color: var(--spaceflux-text-secondary);
}

.search-result-item .result-description {
    font-size: 0.8rem;
    color: var(--spaceflux-text-muted);
    margin-top: 0.25rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-header {
    background: var(--spaceflux-surface-hover);
    border-bottom: 2px solid var(--spaceflux-primary);
    cursor: default;
}

.search-result-header .result-title {
    color: var(--spaceflux-primary);
    font-weight: 600;
}

/* Responsive search results */
@media (max-width: 768px) {
    .search-results {
        position: fixed;
        top: auto;
        left: 1rem;
        right: 1rem;
        max-height: 50vh;
        z-index: 1001;
    }
    
    .search-container {
        position: relative;
    }
}

/* Search input focus improvements */
.search-input:focus {
    outline: none;
    border-color: var(--spaceflux-primary);
    background: var(--spaceflux-surface-hover);
    box-shadow: 0 0 0 3px rgba(146, 74, 228, 0.1);
}

/* Search results scrollbar styling */
.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: var(--spaceflux-surface);
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb {
    background: var(--spaceflux-border);
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: var(--spaceflux-text-muted);
}

/* Colored links in sidebar */
.link-website {
    background: var(--spaceflux-primary) !important;
    color: white !important;
    border-radius: 6px !important;
    padding: 0.5rem 0.75rem !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
    display: inline-block !important;
    min-width: 80px !important;
}

.link-website:hover {
    background: var(--spaceflux-primary-hover) !important;
    color: white !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(146, 74, 228, 0.3) !important;
}

.link-api-docs {
    background: #49cc28 !important;
    color: white !important;
    border-radius: 6px !important;
    padding: 0.5rem 0.75rem !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
    display: inline-block !important;
    min-width: 80px !important;
}

.link-api-docs:hover {
    background: #3da622 !important;
    color: white !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(73, 204, 40, 0.3) !important;
}

.link-app {
    background: var(--spaceflux-accent) !important;
    color: white !important;
    border-radius: 6px !important;
    padding: 0.5rem 0.75rem !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
    display: inline-block !important;
    min-width: 80px !important;
}

.link-app:hover {
    background: var(--spaceflux-primary-hover) !important;
    color: white !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(192, 132, 252, 0.3) !important;
}

/* Content Area */
.content-area {
    min-height: 800px;
}

/* Home Page */
.home-page {
    max-width: 100%;
}

/* Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--spaceflux-text-secondary);
}

.breadcrumb a {
    color: var(--spaceflux-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--spaceflux-primary-hover);
}

.breadcrumb-separator {
    color: var(--spaceflux-text-muted);
}

.breadcrumb-current {
    color: var(--spaceflux-text);
    font-weight: 500;
}



/* Category Header */
.category-header {
    background: linear-gradient(135deg, var(--spaceflux-surface) 0%, var(--spaceflux-card-bg) 100%);
    border: 1px solid var(--spaceflux-border);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.category-header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--spaceflux-primary), var(--spaceflux-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-description {
    font-size: 1.125rem;
    color: var(--spaceflux-text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.category-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.stat-item {
    background: var(--spaceflux-surface);
    color: var(--spaceflux-text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--spaceflux-border);
}

/* Journey Cards */
.journeys-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.journey-card {
    background: var(--spaceflux-card-bg);
    border: 1px solid var(--spaceflux-card-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.journey-card:hover {
    transform: translateY(-2px);
    border-color: var(--spaceflux-primary);
    box-shadow: 0 8px 25px rgba(146, 74, 228, 0.1);
}

.journey-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.journey-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--spaceflux-text);
    margin-bottom: 0.5rem;
}

.journey-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.meta-tag {
    background: var(--spaceflux-surface);
    color: var(--spaceflux-text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}



.journey-description {
    color: var(--spaceflux-text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.journey-steps {
    background: var(--spaceflux-surface);
    border-radius: 8px;
    padding: 1rem;
}

.journey-steps h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--spaceflux-text);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.step-list {
    list-style: none;
}

.step-list li {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--spaceflux-text-secondary);
}

.step-number {
    background: var(--spaceflux-primary);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* Footer */
.footer {
    background: var(--spaceflux-surface);
    border-top: 1px solid var(--spaceflux-border);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    text-align: center;
    color: var(--spaceflux-text-secondary);
}

.footer-content p {
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.footer-links a {
    color: var(--spaceflux-text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--spaceflux-primary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .sidebar {
        position: static;
        order: 2;
    }

    .journeys-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .header {
        padding: 1rem 0;
        margin-bottom: 1.5rem;
    }

    /* Show mobile search box on mobile devices */
    .mobile-search-container {
        display: block;
    }

    /* Hide breadcrumb on home page for mobile */
    .home-page .breadcrumb {
        display: none;
    }

    /* Make subheading smaller and hide guide count on home page for mobile */
    .home-page .category-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .home-page .category-stats {
        display: none;
    }

    .header-content {
        flex-direction: row;
        text-align: left;
        gap: 1rem;
        margin-left: 0;
        align-items: center;
        justify-content: space-between;
    }

    .logo {
        flex: 1;
        align-items: flex-start;
    }

    .logo-image {
        width: 140px;
    }

    .logo-text p {
        font-size: 0.8rem;
        margin-top: 0.25rem;
    }

    .header-actions {
        flex-direction: row;
        width: auto;
        justify-content: flex-end;
        gap: 0.5rem;
        flex-shrink: 0;
    }

    .header-actions .btn {
        flex: none;
        justify-content: center;
    }

    /* Feedback button mobile styles */
    .btn-feedback {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        min-width: auto;
        height: 42px;
        gap: 0.375rem;
    }

    /* Theme toggle button mobile styles */
    .btn-theme-toggle {
        padding: 0.5rem;
        min-width: 42px;
        height: 42px;
    }

    /* Language picker mobile styles */
    .btn-language-toggle {
        padding: 0.5rem 0.75rem;
        height: 42px;
        font-size: 0.8rem;
        min-width: 80px;
    }

    .language-text {
        min-width: 50px;
    }

    .language-dropdown {
        min-width: 100px;
        right: 0;
    }

    /* Logo sizing already handled above */

    /* Step layout improvements for mobile */
    .step-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .step-number-large {
        order: 1;
        align-self: flex-start;
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .step-title-container {
        order: 2;
        width: 100%;
    }

    .step-title-container h3 {
        font-size: 1.1rem;
    }

    .step-content {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    /* Journey cards mobile improvements */
    .journey-card {
        padding: 1.25rem;
    }

    .journeys-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Welcome section mobile */
    .welcome-section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .welcome-section h2 {
        font-size: 1.75rem;
    }

    /* Category header mobile */
    .category-header {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .category-header h1 {
        font-size: 2rem;
    }

    .category-description {
        font-size: 1rem;
    }

    .category-stats {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Journey detail header mobile - make it much more compact */
    .journey-detail-header {
        padding: 1rem;
        margin-bottom: 1.25rem;
    }

    .journey-detail-header h1 {
        font-size: 1.125rem; /* 50% smaller than desktop 2.25rem */
        margin-bottom: 0.5rem;
    }

    .journey-detail-description {
        font-size: 0.625rem; /* 50% smaller than desktop 1.25rem */
        margin-bottom: 0.75rem;
        line-height: 1.4;
    }

    /* Hide meta tags (category and time estimate) on mobile */
    .journey-detail-meta {
        display: none !important;
    }

    /* Mobile journey actions - hide Cortex button, make print button an icon */
    .journey-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 0.75rem;
    }

    /* Hide all buttons on mobile - Cortex, API Docs, and Print */
    .journey-actions .btn-primary,
    .journey-actions .btn-swagger,
    .journey-actions .btn-secondary {
        display: none;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    /* Header adjustments for very small screens - stack vertically if needed */
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        align-items: center;
    }

    .logo {
        align-items: center;
    }

    .header-actions {
        flex-direction: row;
        gap: 0.5rem;
        justify-content: center;
    }

    .header-actions .btn {
        max-width: none;
    }

    .btn-feedback,
    .btn-theme-toggle {
        height: 44px;
    }

    .logo-image {
        width: 120px;
    }

    .logo-text p {
        font-size: 0.75rem;
        text-align: center;
    }

    /* Step adjustments for very small screens */
    .step-number-large {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .step-title-container h3 {
        font-size: 1rem;
    }

    /* Journey card adjustments */
    .journey-card {
        padding: 1rem;
    }

    /* Category and journey headers */
    .category-header,
    .journey-detail-header {
        padding: 1rem;
    }

    .category-header h1 {
        font-size: 1.5rem;
    }

    .journey-detail-header h1 {
        font-size: 1rem; /* Even smaller for very small screens */
        margin-bottom: 0.4rem;
    }

    .category-description,
    .journey-detail-description {
        font-size: 0.55rem; /* Even smaller for very small screens */
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }

    /* Journey actions are hidden on mobile, so no additional styling needed */

    /* Mobile search adjustments for very small screens */
    .mobile-search-wrapper {
        padding: 1.25rem;
    }

    .mobile-search-wrapper h3 {
        font-size: 1rem;
    }

    .mobile-search-input {
        font-size: 0.95rem;
        padding: 0.875rem 1rem;
    }
}

/* Loading State */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
    color: var(--spaceflux-text-secondary);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--spaceflux-border);
    border-top: 2px solid var(--spaceflux-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.75rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Breadcrumb Navigation */
.breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--spaceflux-text-secondary);
}

.breadcrumb a {
    color: var(--spaceflux-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--spaceflux-accent);
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: var(--spaceflux-text-muted);
}

.breadcrumb-current {
    color: var(--spaceflux-text);
    font-weight: 500;
}

/* Journey Detail Page */
.journey-detail-header {
    background: linear-gradient(135deg, var(--spaceflux-surface) 0%, var(--spaceflux-card-bg) 100%);
    border: 1px solid var(--spaceflux-border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.journey-detail-header h1 {
    font-size: 2.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--spaceflux-primary), var(--spaceflux-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.journey-detail-description {
    font-size: 1.25rem;
    color: var(--spaceflux-text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.journey-detail-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.journey-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Journey Steps Container */
.journey-steps-container {
    margin-bottom: 3rem;
}

.journey-steps-container h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--spaceflux-text);
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.step-item {
    background: var(--spaceflux-surface);
    border: 1px solid var(--spaceflux-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.step-item:hover {
    border-color: var(--spaceflux-primary);
    box-shadow: 0 4px 12px rgba(146, 74, 228, 0.1);
}

.step-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1rem;
    justify-content: space-between;
}

.step-title-container {
    flex: 1;
}

.step-number-large {
    background: var(--spaceflux-primary);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
    order: 2;
}

.step-title-container h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--spaceflux-text);
}

.step-description {
    color: var(--spaceflux-text);
    font-weight: 500;
    margin: 0;
}

.step-content {
    margin-left: 0;
}

.step-details {
    color: var(--spaceflux-text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Markdown content styling */
.step-details p {
    margin-bottom: 0.75rem;
}

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

.step-details ul, .step-details ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.step-details li {
    margin-bottom: 0.25rem;
}

.step-details strong {
    color: var(--spaceflux-text-primary);
    font-weight: 600;
}

.step-details em {
    font-style: italic;
    color: var(--spaceflux-text-secondary);
}

.step-code-example {
    margin: 1rem 0;
}

.step-code-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.step-code-label {
    color: var(--spaceflux-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.step-code-select {
    min-width: 10rem;
    padding: 0.45rem 2rem 0.45rem 0.75rem;
    border: 1px solid var(--spaceflux-border);
    border-radius: 6px;
    background: var(--spaceflux-card-bg);
    color: var(--spaceflux-text);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

.step-code-select:focus {
    outline: 2px solid var(--spaceflux-accent);
    outline-offset: 2px;
}

.step-code-panel[hidden] {
    display: none;
}

.step-code-example pre {
    max-width: 100%;
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
    border: 1px solid var(--spaceflux-border);
    border-radius: 8px;
    background: #100919;
    color: #eeeeee;
    line-height: 1.5;
    tab-size: 2;
}

.step-code-example code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.85rem;
    white-space: pre;
}

@media print {
    .step-code-toolbar {
        display: none;
    }

    .step-code-panel[hidden] {
        display: none;
    }

    .step-code-example pre {
        background: #f8f8f8;
        color: #222222;
        white-space: pre-wrap;
    }
}

@media (max-width: 480px) {
    .step-code-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 0.4rem;
    }

    .step-code-select {
        width: 100%;
    }
}

.screenshot-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--spaceflux-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.screenshot-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(146, 74, 228, 0.2);
}

/* Related Journeys */
.related-journeys {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--spaceflux-border);
}

.related-journeys h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--spaceflux-text);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.related-journey-card {
    background: var(--spaceflux-card-bg);
    border: 1px solid var(--spaceflux-card-border);
    border-radius: 8px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.related-journey-card:hover {
    transform: translateY(-2px);
    border-color: var(--spaceflux-primary);
    box-shadow: 0 4px 12px rgba(146, 74, 228, 0.1);
}

.related-journey-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--spaceflux-text);
}

.related-journey-card p {
    font-size: 0.875rem;
    color: var(--spaceflux-text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

/* Category Page */
.category-header {
    background: linear-gradient(135deg, var(--spaceflux-surface) 0%, var(--spaceflux-card-bg) 100%);
    border: 1px solid var(--spaceflux-border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.category-header h1 {
    font-size: 2.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--spaceflux-primary), var(--spaceflux-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-description {
    font-size: 1.125rem;
    color: var(--spaceflux-text-secondary);
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.category-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.stat-item {
    background: var(--spaceflux-surface);
    color: var(--spaceflux-text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.other-categories {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--spaceflux-border);
    text-align: center;
}

.other-categories h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--spaceflux-text);
}

.category-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Category chips render as design-system secondary buttons (.btn.btn-secondary).
   These overrides only refine spacing and give a brand-orchid hover accent. */
.category-link {
    text-decoration: none;
}

.category-link:hover {
    background: var(--spaceflux-surface-hover);
    border-color: var(--spaceflux-accent);
    color: var(--spaceflux-accent);
    transform: translateY(-1px);
}

/* Error Page */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.error-content {
    text-align: center;
    max-width: 500px;
}

.error-title {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--spaceflux-primary), var(--spaceflux-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.error-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--spaceflux-text);
    margin-bottom: 1rem;
}

.error-description {
    color: var(--spaceflux-text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.helpful-links {
    background: var(--spaceflux-surface);
    border: 1px solid var(--spaceflux-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: left;
}

.helpful-links h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--spaceflux-text);
}

.helpful-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.helpful-links li {
    margin-bottom: 0.5rem;
}

.helpful-links a {
    color: var(--spaceflux-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.helpful-links a:hover {
    color: var(--spaceflux-accent);
}

/* Category Section Styling */
.category-section {
    margin-bottom: 3rem;
}

.category-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--spaceflux-text);
    border-bottom: 2px solid var(--spaceflux-primary);
    padding-bottom: 0.5rem;
}

/* Screenshot Modal Styles */
.screenshot-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.screenshot-modal.show {
    opacity: 1;
}

.screenshot-modal-content {
    background: var(--spaceflux-card-bg);
    border: 1px solid var(--spaceflux-border);
    border-radius: 16px;
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.screenshot-modal.show .screenshot-modal-content {
    transform: scale(1);
}

.screenshot-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--spaceflux-border);
}

.screenshot-modal-header h3 {
    margin: 0;
    color: var(--spaceflux-text);
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--spaceflux-text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

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

.screenshot-modal-body {
    padding: 0;
    text-align: center;
    background: var(--spaceflux-bg);
}

.screenshot-full-size {
    max-width: 100%;
    max-height: 70vh;
    height: auto;
    width: auto;
    object-fit: contain;
    border-radius: 0;
}

.screenshot-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--spaceflux-border);
}


/* Adjust header position when banner is present */
.header {
    background: linear-gradient(135deg, var(--spaceflux-surface) 0%, var(--spaceflux-card-bg) 100%);
    border-bottom: 1px solid var(--spaceflux-border);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

/* General link styling for content areas */
.content-area a:not(.btn),
.journey-steps-container a:not(.btn),
.step-content a:not(.btn) {
    color: var(--spaceflux-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 4px;
    padding: 2px 4px;
    margin: 0 2px;
}

.content-area a:not(.btn):hover,
.journey-steps-container a:not(.btn):hover,
.step-content a:not(.btn):hover {
    color: var(--spaceflux-primary-hover);
    text-shadow: 0 0 8px rgba(146, 74, 228, 0.6);
    box-shadow: 0 0 12px rgba(146, 74, 228, 0.4);
    background: rgba(146, 74, 228, 0.1);
}

/* External link indicator */
.content-area a[href^="http"]:not(.btn),
.journey-steps-container a[href^="http"]:not(.btn),
.step-content a[href^="http"]:not(.btn) {
    position: relative;
}

.content-area a[href^="http"]:not(.btn)::after,
.journey-steps-container a[href^="http"]:not(.btn)::after,
.step-content a[href^="http"]:not(.btn)::after {
    content: "↗";
    font-size: 0.75em;
    margin-left: 4px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.content-area a[href^="http"]:not(.btn):hover::after,
.journey-steps-container a[href^="http"]:not(.btn):hover::after,
.step-content a[href^="http"]:not(.btn):hover::after {
    opacity: 1;
}

/* Step details link styling */
.step-details a:not(.btn) {
    display: inline-block;
    word-break: break-word;
    max-width: 100%;
}

.step-details a:not(.btn):hover {
    transform: translateY(-1px);
}

/* Journey description link styling */
.journey-detail-description a:not(.btn),
.journey-description a:not(.btn) {
    display: inline-block;
    word-break: break-word;
    max-width: 100%;
}

.journey-detail-description a:not(.btn):hover,
.journey-description a:not(.btn):hover {
    transform: translateY(-1px);
}

/* Version Selector Styles */
.version-selector {
    margin-top: 0.5rem;
}

.version-selector select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--spaceflux-border);
    border-radius: 4px;
    background: var(--spaceflux-surface);
    color: var(--spaceflux-text);
    font-size: 0.9rem;
    cursor: pointer;
}

.version-selector select:hover {
    background: var(--spaceflux-surface-hover);
}

.version-selector select:focus {
    outline: none;
    border-color: var(--spaceflux-primary);
    box-shadow: 0 0 0 2px rgba(146, 74, 228, 0.2);
}

.version-compare-link {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--spaceflux-border);
}

.version-compare-link a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--spaceflux-text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.version-compare-link a:hover {
    color: var(--spaceflux-primary);
}

.version-icon {
    font-size: 1rem;
}

/* Journey Change Indicators */
.journey-title-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Meta tag badges - styled like other meta tags but with color */
.meta-tag.change-badge {
    font-weight: 600;
    font-size: 0.8rem;
}

.meta-tag.new-journey-badge {
    background: var(--spaceflux-success);
    color: white;
    border-color: var(--spaceflux-success);
}

.meta-tag.updated-journey-badge {
    background: var(--spaceflux-warning);
    color: white;
    border-color: var(--spaceflux-warning);
}

.step-change-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.75rem;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.025em;
    color: #ffffff !important;
}

.new-step-badge {
    background: linear-gradient(135deg, #059669, #047857);
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.modified-step-badge {
    background: linear-gradient(135deg, #d97706, #c2410c);
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Step highlighting */
.step-item.new-step {
    border-left: 4px solid var(--spaceflux-success);
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.05), transparent 50%);
}

.step-item.modified-step {
    border-left: 4px solid var(--spaceflux-warning);
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.05), transparent 50%);
}

/* Journey Card Badges */
.journey-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 0.5rem;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.025em;
    color: #ffffff !important;
}

.new-journey-card-badge {
    background: linear-gradient(135deg, #059669, #047857);
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.updated-journey-card-badge {
    background: linear-gradient(135deg, #d97706, #c2410c);
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.new-steps-count {
    background: rgba(34, 197, 94, 0.1) !important;
    color: var(--spaceflux-success) !important;
    border: 1px solid rgba(34, 197, 94, 0.3) !important;
}

.new-guide-badge {
    background: var(--spaceflux-warning) !important;
    color: white !important;
    border: 1px solid var(--spaceflux-warning) !important;
    font-weight: 600;
}

/* Mobile responsive badges */
@media (max-width: 768px) {
    .step-change-badge {
        margin-left: 0;
        margin-top: 0.5rem;
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }
    
    .journey-card-badge {
        margin-left: 0;
        margin-top: 0.25rem;
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
        gap: 0.2rem;
    }
    
    .journey-title {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        align-items: flex-start;
    }
}

/* Version comparison page specific styles are in the template */

/* Request Modal Styles - Updated for proper layering */
.request-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Force all other elements to be behind the modal when modal is active */
.request-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    z-index: 999999;
}

/* Ensure modal content has highest z-index */
.request-modal.active .request-modal-content {
    z-index: 1000000;
    position: relative;
}

/* When modal is open, ensure all other elements stay behind it */
body.modal-open .header,
body.modal-open .main-content,
body.modal-open .footer,
body.modal-open .sidebar,
body.modal-open .content-area {
    z-index: 1;
    position: relative;
}

/* Ensure modal has the highest z-index when open */
body.modal-open .request-modal {
    z-index: 999999 !important;
}

body.modal-open .request-modal-content {
    z-index: 1000000 !important;
}

/* Reset z-index for specific elements that might interfere */
body.modal-open .screenshot-modal,
body.modal-open .language-dropdown,
body.modal-open .search-results {
    z-index: 1 !important;
}

.request-modal-content {
    background: var(--spaceflux-card-bg);
    border: 1px solid var(--spaceflux-card-border);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    overflow: hidden;
    z-index: 100000;
    position: relative;
}

.request-modal.active .request-modal-content {
    transform: translateY(0);
}

.request-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--spaceflux-border);
    background: var(--spaceflux-surface);
}

.request-modal-header h3 {
    margin: 0;
    color: var(--spaceflux-text);
    font-size: 1.25rem;
    font-weight: 600;
}

.request-modal-close {
    background: none;
    border: none;
    color: var(--spaceflux-text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.request-form {
    padding: 2rem;
}

.form-field {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--spaceflux-text);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 1px solid var(--spaceflux-border);
    border-radius: 8px;
    background: var(--spaceflux-surface);
    color: var(--spaceflux-text);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--spaceflux-primary);
    box-shadow: 0 0 0 3px rgba(146, 74, 228, 0.1);
}

.form-textarea::placeholder {
    color: var(--spaceflux-text-muted);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.request-success {
    display: none;
    padding: 1rem;
    margin-top: 1rem;
    background: var(--spaceflux-success);
    color: white;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
}

.link-request {
    background: #ec4899 !important;
    color: white !important;
    border-radius: 6px !important;
    padding: 0.5rem 0.75rem !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
    display: inline-block !important;
    min-width: 80px !important;
}

.link-request:hover {
    background: #db2777 !important;
    color: white !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3) !important;
}

@media (max-width: 768px) {
    .request-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .request-modal-header {
        padding: 1rem 1.5rem;
    }
    
    .request-form {
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ---------------------------------------------------------------------------
   Signed-in user menu (header)
--------------------------------------------------------------------------- */
.sidebar-user .user-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
}

.sidebar-user .user-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--spaceflux-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user .btn-logout {
    width: 100%;
    justify-content: center;
    padding: 0.6rem 1rem;
}

/* ---------------------------------------------------------------------------
   Login page (Unity-aligned dark sign-in surface)
--------------------------------------------------------------------------- */
.login-body {
    min-height: 100dvh;
    background:
        radial-gradient(
            ellipse 60% 50% at 50% 0%,
            rgba(107, 41, 174, 0.18) 0%,
            transparent 70%
        ),
        #100919;
    color: #eeeeee;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: "IBM Plex Sans", sans-serif;
}

.login-wrapper {
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.login-wordmark {
    width: 140px;
    height: auto;
    opacity: 0.95;
    display: block;
}

.login-product-label {
    margin: 0;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #cf8bff;
}

.login-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #292134;
    border: 1px solid #1d1825;
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.login-card-copy {
    text-align: center;
}

.login-card-copy h1 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    color: #eeeeee;
}

.login-card-copy p {
    margin: 6px 0 0;
    font-size: 12px;
    font-weight: 400;
    line-height: 17px;
    color: #97959c;
}

.login-error {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(207, 0, 25, 0.12);
    border: 1px solid rgba(207, 0, 25, 0.45);
    color: #eeeeee;
    border-radius: 8px;
    padding: 10px 12px;
    text-align: left;
}

.login-error-title {
    font-size: 12px;
    font-weight: 600;
    color: #ff8a96;
}

.login-error-body {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    color: #bdbcc0;
}

.login-sso-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    padding: 0 22px;
    border: none;
    border-radius: 13px;
    background: linear-gradient(135deg, #8a3fe0 0%, #6b29ae 52%, #5a1f9e 100%);
    color: #ffffff;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    box-shadow:
        0 10px 26px -8px rgba(138, 63, 224, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
    transition:
        transform 0.15s ease-out,
        box-shadow 0.2s ease-out,
        filter 0.2s ease-out;
}

.login-sso-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 55%;
    height: 100%;
    background: linear-gradient(
        100deg,
        transparent 0%,
        rgba(255, 255, 255, 0.22) 45%,
        transparent 100%
    );
    transform: translateX(-180%) skewX(-18deg);
    opacity: 0;
    pointer-events: none;
}

.login-sso-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow:
        0 14px 32px -8px rgba(138, 63, 224, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.login-sso-btn:hover::after {
    animation: login-sf-shine 0.9s ease-out 1;
}

.login-sso-btn:active {
    transform: translateY(0);
    filter: brightness(0.96);
    box-shadow:
        0 6px 16px -8px rgba(138, 63, 224, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.login-sso-label {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}

.login-sso-text {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 10px;
}

.login-sso-logo {
    display: inline-block;
    width: 104px;
    height: 10px;
    background: #ffffff;
    -webkit-mask: url("../spaceflux-wordmark.svg") center / contain no-repeat;
    mask: url("../spaceflux-wordmark.svg") center / contain no-repeat;
}

.login-sso-sparkle {
    position: absolute;
    z-index: 1;
    color: #ffffff;
    opacity: 0;
    transform: scale(0);
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.55));
    pointer-events: none;
    line-height: 0;
}

.login-sso-sparkle-1 {
    top: 9px;
    left: 16%;
}

.login-sso-sparkle-2 {
    bottom: 8px;
    left: 40%;
}

.login-sso-sparkle-3 {
    top: 11px;
    right: 20%;
}

.login-sso-sparkle-4 {
    bottom: 10px;
    right: 12%;
}

.login-sso-btn:hover .login-sso-sparkle-1 {
    animation: login-sf-twinkle 1.4s ease-in-out infinite;
}

.login-sso-btn:hover .login-sso-sparkle-2 {
    animation: login-sf-twinkle 1.4s ease-in-out 0.35s infinite;
}

.login-sso-btn:hover .login-sso-sparkle-3 {
    animation: login-sf-twinkle 1.4s ease-in-out 0.7s infinite;
}

.login-sso-btn:hover .login-sso-sparkle-4 {
    animation: login-sf-twinkle 1.4s ease-in-out 1.05s infinite;
}

@keyframes login-sf-shine {
    0% {
        transform: translateX(-180%) skewX(-18deg);
        opacity: 0;
    }
    12% {
        opacity: 1;
    }
    100% {
        transform: translateX(240%) skewX(-18deg);
        opacity: 0;
    }
}

@keyframes login-sf-twinkle {
    0%,
    100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    25% {
        opacity: 1;
        transform: scale(1) rotate(90deg);
    }
    50% {
        opacity: 0;
        transform: scale(0) rotate(90deg);
    }
}

.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #737079;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin: 2px 0;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #1d1825;
}

.login-divider span {
    padding: 0 12px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-form .form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.login-form .form-label {
    font-size: 11px;
    font-weight: 500;
    color: #97959c;
}

.login-form .form-input {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    background: transparent;
    border: 1px solid #1d1825;
    border-radius: 10px;
    color: #eeeeee;
    font-family: inherit;
    font-size: 12px;
    transition: border-color 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

.login-form .form-input:hover {
    border-color: #cf8bff;
    background: rgba(107, 41, 174, 0.1);
}

.login-form .form-input:focus {
    outline: none;
    border-color: #cf8bff;
    background: rgba(107, 41, 174, 0.1);
}

.login-password-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 38px;
    margin-top: 2px;
    padding: 0 14px;
    border: 1px solid #1d1825;
    border-radius: 10px;
    background: transparent;
    color: #97959c;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.login-password-btn:hover {
    border-color: #cf8bff;
    background: rgba(107, 41, 174, 0.1);
    color: #eeeeee;
}

.login-password-btn:active {
    border-color: #1d1825;
    background: rgba(0, 0, 0, 0.2);
}

.login-password-hint {
    margin: 0;
    font-size: 10px;
    line-height: 1.4;
    color: #737079;
    text-align: center;
}

.login-footer-text {
    font-size: 0.8rem;
    color: #737079;
    margin: 0;
}

@media (prefers-reduced-motion: reduce) {
    .login-sso-btn:hover::after,
    .login-sso-btn:hover .login-sso-sparkle-1,
    .login-sso-btn:hover .login-sso-sparkle-2,
    .login-sso-btn:hover .login-sso-sparkle-3,
    .login-sso-btn:hover .login-sso-sparkle-4 {
        animation: none;
    }

    .login-sso-btn:hover .login-sso-sparkle-1,
    .login-sso-btn:hover .login-sso-sparkle-2,
    .login-sso-btn:hover .login-sso-sparkle-3,
    .login-sso-btn:hover .login-sso-sparkle-4 {
        opacity: 0;
        transform: scale(0);
    }
}

/* Toast notification (e.g. feedback fallback when no mail client is found) */
.app-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    max-width: min(90vw, 440px);
    background: var(--spaceflux-card-bg);
    color: var(--spaceflux-text);
    border: 1px solid var(--spaceflux-card-border);
    border-radius: 8px;
    padding: 12px 18px;
    font-size: 0.9rem;
    line-height: 1.4;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 3000;
}

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