/* Main CSS for Generate Nano Blueprint */

:root {
    --primary-color: #4e8cff;
    --secondary-color: #1e2124;
    --tertiary-color: #121416;
    --text-color: #ffffff;
    --text-muted: #b0b0b0;
    --border-color: #2a2a2a;
    --card-bg: #1e2124;
    --hover-color: #2c3036;
    --code-bg: #252525;
    --sidebar-width: 280px;
    --top-nav-height: 70px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --accent-color: #5c93ff;
    --accent-color-hover: #3a7ae0;
    --banner-gradient-start: #1e3a8a;
    --banner-gradient-end: #1e2124;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--top-nav-height);
}

body {
    font-family: var(--font-family);
    background-color: var(--tertiary-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 0.95rem;
}

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

a:hover {
    color: #6fa0ff;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2rem;
    margin-top: 0.5rem;
    color: var(--primary-color);
}

h2 {
    font-size: 1.6rem;
    margin-top: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

h3 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
    color: var(--primary-color);
}

h4 {
    font-size: 1.1rem;
    margin-top: 1.2rem;
}

p {
    margin-bottom: 1rem;
}

ul, ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

code, pre {
    font-family: 'Consolas', 'Monaco', 'Andale Mono', 'Ubuntu Mono', monospace;
    background-color: var(--code-bg);
    border-radius: 4px;
}

code {
    padding: 0.2rem 0.4rem;
    font-size: 0.9rem;
}

pre {
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
    line-height: 1.5;
}

pre code {
    padding: 0;
    background-color: transparent;
}

img {
    max-width: 100%;
    height: auto;
}

/* Top Navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--top-nav-height);
    background-color: var(--secondary-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.top-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 75%; /* 3/4 of the screen width to allow for 1/8 on each side */
    padding: 0 2rem;
    margin: 0 auto; /* Center the container */
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-left: 0.75rem;
    letter-spacing: -0.02em;
}

.main-nav-links {
    display: flex;
    list-style: none;
    margin: 0;
}

.main-nav-links li {
    margin: 0 0.5rem;
}

.main-nav-link {
    display: flex;
    align-items: center;
    padding: 0.6rem 1.2rem;
    color: var(--text-color);
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.main-nav-link i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.main-nav-link:hover {
    background-color: var(--hover-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.main-nav-link.active {
    background-color: rgba(78, 140, 255, 0.15);
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(78, 140, 255, 0.2);
}

/* Container Layout */
.container {
    display: flex;
    margin-top: var(--top-nav-height);
    min-height: calc(100vh - var(--top-nav-height));
    width: 75%; /* 3/4 of the screen width to allow for 1/8 on each side */
    margin-left: auto;
    margin-right: auto;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--secondary-color);
    position: fixed;
    top: var(--top-nav-height);
    bottom: 0;
    left: 12.5%; /* Position at 1/8 of the screen width */
    overflow-y: auto;
    z-index: 900;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 1.75rem 1.25rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.search-container {
    position: relative;
    margin-bottom: 1rem;
}

.search-container input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(78, 140, 255, 0.2);
}

.search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.nav-progress {
    height: 4px;
    background-color: var(--tertiary-color);
    margin-bottom: 1rem;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    width: 0;
    transition: width 0.3s ease;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0 0 1rem 0;
    flex-grow: 1;
}

.nav-category {
    margin-top: 1.5rem;
}

.category-header {
    display: flex;
    align-items: center;
    padding: 0.5rem 1.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.category-header.sdk-header {
    background-color: rgba(78, 140, 255, 0.2);
    border-left: 3px solid var(--primary-color);
    padding-left: calc(1.5rem - 3px);
    color: var(--primary-color);
    font-weight: 700;
}

.category-header.sdk-header::before {
    content: "SDK: ";
}

.category-header.apk-header {
    background-color: rgba(255, 99, 71, 0.2);
    border-left: 3px solid tomato;
    padding-left: calc(1.5rem - 3px);
    color: tomato;
    font-weight: 700;
}

.category-header.apk-header::before {
    content: "APK: ";
}

.category-icon {
    margin-right: 0.75rem;
}

.nav-links li a {
    display: flex;
    align-items: center;
    padding: 0.65rem 1.5rem 0.65rem 2.5rem;
    color: var(--text-color);
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border-radius: 0 4px 4px 0;
    margin: 0.2rem 0.5rem 0.2rem 0;
}

.nav-links li a i {
    margin-right: 0.75rem;
    width: 1.2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.nav-links li a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--primary-color);
    transform: translateX(2px);
}

.nav-links li a:hover i {
    color: var(--primary-color);
}

.nav-links li a.active {
    background-color: rgba(78, 140, 255, 0.1);
    border-left: 3px solid var(--primary-color);
    padding-left: calc(2.5rem - 3px);
    color: var(--primary-color);
    font-weight: 500;
}

.nav-links li a.active i {
    color: var(--primary-color);
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.sdk-version {
    margin-bottom: 0.5rem;
}

.documentation-info {
    display: flex;
    align-items: center;
}

.documentation-info i {
    margin-right: 0.5rem;
}

/* Main Content */
.content {
    flex: 1;
    margin-left: var(--sidebar-width);
    margin-right: 0;
    padding: 2rem 3rem 4rem;
    max-width: calc(100% - var(--sidebar-width));
}

.section {
    margin-bottom: 3rem;
}

.subsection {
    margin-bottom: 2rem;
    padding-top: 1rem;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 1.75rem;
    margin-bottom: 1.75rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
}

/* Tables */
.table-container {
    margin: 1.5rem 0;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--secondary-color);
    font-weight: 600;
}

tr:hover {
    background-color: var(--hover-color);
}

/* Example Interactions */
.example-interaction {
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--primary-color);
    padding-left: 1rem;
}

.user-query {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.assistant-response {
    color: var(--text-muted);
    padding: 0.5rem 0;
}

/* Mermaid Diagrams */
.mermaid {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    text-align: center;
}

/* Checklist */
.checklist {
    list-style: none;
    margin-left: 0;
}

.checklist li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.75rem;
}

.checklist li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

/* Banner */
.banner {
    background: linear-gradient(135deg, var(--banner-gradient-start) 0%, var(--banner-gradient-end) 100%);
    padding: 3rem 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(78, 140, 255, 0.2) 0%, transparent 70%);
    z-index: 1;
}

.banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(78, 140, 255, 0.05) 0%, transparent 70%);
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.banner h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.banner p {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.banner-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.banner-buttons .btn {
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.banner-buttons .btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(78, 140, 255, 0.3);
}

.banner-buttons .btn-primary:hover {
    background-color: var(--accent-color-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(78, 140, 255, 0.4);
}

.banner-buttons .btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.banner-buttons .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.banner-buttons .btn-apk {
    background-color: tomato;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 99, 71, 0.3);
}

.banner-buttons .btn-apk:hover {
    background-color: #ff5233; /* Slightly darker tomato color on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 99, 71, 0.4);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .content {
        padding: 2rem;
    }
}

@media (max-width: 992px) {
    :root {
        --sidebar-width: 240px;
    }
    
    .content {
        max-width: calc(70% - var(--sidebar-width)/2);
    }
    
    .nav-links li a {
        padding: 0.5rem 1rem 0.5rem 2rem;
    }
    
    .nav-links li a.active {
        padding-left: calc(2rem - 3px);
    }
    
    .category-header {
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0;
    }
    
    .top-nav-container,
    .container {
        width: 100%; /* Full width on mobile */
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        left: 0; /* Reset to left edge on mobile */
    }
    
    .sidebar.active {
        transform: translateX(0);
        width: 280px;
    }
    
    .content {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
        padding: 1.5rem;
    }
    
    .top-nav-container {
        padding: 0 1rem;
    }
    
    .main-nav-link span {
        display: none;
    }
    
    .main-nav-link i {
        margin-right: 0;
    }
    
    .banner {
        padding: 2rem 1rem;
    }
    
    .banner h1 {
        font-size: 2rem;
    }
    
    .banner p {
        font-size: 1rem;
    }
    
    .banner-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .banner-buttons .btn {
        width: 100%;
        max-width: 250px;
        margin-bottom: 0.5rem;
    }
}

/* Code Syntax Highlighting */
.keyword {
    color: #569cd6;
}

.string {
    color: #ce9178;
}

.comment {
    color: #6a9955;
}

/* Documentation Links */
.documentation-links {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 2rem 0;
}

.doc-link-card {
    flex: 1;
    min-width: 300px;
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 1.75rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.doc-link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
}

.doc-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
}

.doc-link-card h4 {
    color: var(--text-color);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    font-size: 1.3rem;
    font-weight: 600;
}

.doc-link-card h4 i {
    margin-right: 0.75rem;
    font-size: 1.4rem;
    color: var(--primary-color);
}

.doc-link-card p {
    margin-bottom: 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.doc-link-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.doc-link-card .btn-primary {
    display: inline-block;
    padding: 0.85rem 1.5rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(78, 140, 255, 0.3);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 6px;
    transition: all 0.3s ease;
}

.doc-link-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(78, 140, 255, 0.4);
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
}

.doc-link-card .btn-gallery {
    display: inline-flex;
    align-items: center;
    padding: 0.85rem 1.5rem;
    font-weight: 500;
    color: var(--text-color);
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.doc-link-card .btn-gallery i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.doc-link-card .btn-gallery:hover {
    transform: translateY(-2px);
    background-color: rgba(255, 255, 255, 0.12);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Additional Components */

/* Tabs */
.tabs {
    margin: 1.5rem 0;
}

.tab-buttons {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.tab-button {
    padding: 0.75rem 1.5rem;
    background-color: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tab-button:hover {
    background-color: var(--hover-color);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.tab-content {
    padding: 1.5rem 0;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

.badge-primary {
    background-color: var(--primary-color);
    color: white;
}

.badge-secondary {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.alert-info {
    background-color: rgba(78, 140, 255, 0.1);
    border-left-color: var(--primary-color);
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border-left-color: #ffc107;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-left-color: #dc3545;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(78, 140, 255, 0.3);
}

.btn-primary:hover {
    background-color: var(--accent-color-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(78, 140, 255, 0.4);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Image Gallery */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 1.5rem 0;
    justify-content: center;
}

.image-gallery figure {
    flex: 0 1 auto;
    max-width: 100%;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
    position: relative;
}

.image-gallery figure:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.doc-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
    cursor: pointer;
}

/* Version Gallery */
.version-gallery {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 1.75rem;
    margin: 2rem 0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.version-gallery:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
}

.gallery-container {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--text-color);
    padding: 10px 15px;
    font-size: 0.9rem;
    z-index: 2;
    text-align: center;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
    background-color: var(--tertiary-color);
    padding: 0.5rem;
    border-radius: 6px;
}

.gallery-image.active {
    opacity: 1;
    z-index: 1;
}

.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.gallery-nav {
    display: flex;
    gap: 1rem;
}

.gallery-btn {
    background-color: var(--secondary-color);
    color: var(--text-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.gallery-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.gallery-counter {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.gallery-version {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.gallery-title {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gallery-title h3 {
    margin-top: 0;
}

.gallery-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Image type labels */
.image-type-label {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    z-index: 10;
}

.label-ma {
    background-color: #4e8cff; /* Primary color for Menu Assistant */
}

.label-da {
    background-color: tomato; /* Using tomato color for Device Aid to match APK header */
}

/* Modal for expanded images */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    display: block;
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    border-radius: 4px;
}

.modal-caption {
    color: white;
    text-align: center;
    padding: 10px;
    width: 100%;
    position: absolute;
    bottom: 20px;
    left: 0;
    background-color: rgba(0, 0, 0, 0.7);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1101;
}

.close-modal:hover {
    color: #bbb;
}

/* APK Documentation specific image styling */
#apk-section .image-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
    width: 100%;
}

#apk-section .image-gallery figure {
    flex: 1 1 300px;
    max-width: 450px;
    margin-bottom: 1rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

#apk-section .image-gallery figure:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

#apk-section .doc-image {
    max-height: 600px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
    cursor: pointer;
}

/* Make architecture diagrams specifically larger and span the width of the card */
#apk-section img[src*="Architecture.png"],
img[src*="Architecture.png"] {
    max-height: 700px;
    width: 100%;
    max-width: 100%;
    object-fit: contain;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 992px) {
    #apk-section .image-gallery figure {
        flex: 1 1 250px;
    }
}

@media (max-width: 768px) {
    #apk-section .image-gallery {
        gap: 1rem;
    }
    
    #apk-section .image-gallery figure {
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    #apk-section .doc-image {
        max-height: 350px;
    }
}

.image-gallery figcaption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 0 0.5rem;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.p-1 {
    padding: 0.5rem;
}

.p-2 {
    padding: 1rem;
}

.p-3 {
    padding: 1.5rem;
}
