:root {
    /* Colors */
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --bg-color: #f8fafc;
    --sidebar-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    
    /* Layout */
    --sidebar-width: 280px;
    --header-height: 64px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

/* Layout */
.layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 40;
}

.sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-nav {
    padding: 16px 0;
}

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

.sidebar-nav .nav-item > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 22px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    transition: all 0.2s ease;
    border-left: 3.5px solid transparent;
}

.sidebar-nav .nav-item > a:hover {
    color: var(--primary-color);
    background-color: #f8fafc;
    border-left-color: #cbd5e1;
}

.sidebar-nav .nav-item.active > a {
    color: var(--primary-color);
    background-color: #eef2ff;
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.sub-nav {
    padding-left: 24px;
    margin-top: 4px;
}

.sub-nav a {
    display: block;
    padding: 8px 24px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.sub-nav a:hover {
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.top-header {
    height: var(--header-height);
    background-color: var(--bg-color);
    padding: 0 32px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(8px);
    background-color: rgba(248, 250, 252, 0.8);
    border-bottom: 1px solid var(--border-color);
}

.search-bar {
    position: relative;
    max-width: 460px;
    width: 100%;
}

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

.search-bar-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 0.95rem;
    pointer-events: none;
}

.search-bar input {
    padding: 10px 64px 10px 38px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    width: 100%;
    background: #ffffff;
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    background: #ffffff;
}

.search-shortcut-badge {
    position: absolute;
    right: 12px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 2px 7px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    pointer-events: none;
}

.search-clear-btn {
    display: none;
    position: absolute;
    right: 12px;
    background: #e2e8f0;
    color: #475569;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    transition: background 0.15s ease;
}

.search-clear-btn:hover {
    background: #cbd5e1;
    color: #0f172a;
}

/* Search Results Dropdown */
.search-results-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    min-width: 380px;
    max-width: 520px;
    max-height: 460px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.search-result-item {
    padding: 12px 18px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
    display: block;
}

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

.search-result-item:hover,
.search-result-item.selected {
    background: #f8fafc;
}

.search-result-section {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-result-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.search-result-snippet {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.45;
}

.search-result-snippet mark,
.search-result-title mark {
    background: #fef08a;
    color: #854d0e;
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: 600;
}

.search-empty-state {
    padding: 32px 20px;
    text-align: center;
    color: #64748b;
    font-size: 0.92rem;
}

.search-results-footer {
    padding: 8px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    justify-content: space-between;
}

/* Highlight section target */
@keyframes sectionPulse {
    0% { background-color: rgba(99, 102, 241, 0.2); }
    100% { background-color: transparent; }
}

.highlight-pulse {
    animation: sectionPulse 2.5s ease forwards;
    border-radius: 10px;
    padding: 4px 8px;
}

.content-container {
    padding: 48px 32px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

/* Typography & Content Styles */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-main);
    letter-spacing: -0.025em;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

p {
    margin-bottom: 16px;
    color: var(--text-main);
}

/* Info Card */
.info-card {
    display: flex;
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 20px;
    margin: 32px 0;
    gap: 16px;
}

.info-icon {
    font-size: 1.5rem;
}

.info-text {
    color: #1e3a8a;
}

/* Placeholder for images */
.placeholder-image {
    width: 100%;
    height: 300px;
    background-color: #e2e8f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    margin: 32px 0;
    border: 2px dashed #cbd5e1;
}

/* Responsive */
.toggle-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
    display: none;
}

@media (min-width: 769px) {
    .md-hidden {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-md);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .toggle-btn {
        display: block;
        margin-right: 16px;
    }
    
    .search-bar input {
        width: 100%;
    }
    
    .top-header {
        padding: 0 16px;
    }
    
    .content-container {
        padding: 24px 16px;
    }
}

/* Image Modal */
.zoomable {
    cursor: pointer;
    transition: transform 0.2s;
}

.zoomable:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.modal {
    display: none;
    position: fixed;
    z-index: 100;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.85);
    backdrop-filter: blur(4px);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
    object-fit: contain;
}

#modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    text-align: center;
    color: #fff;
    padding: 20px 0;
    font-size: 1.1rem;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover,
.close-modal:focus {
    color: #bbb;
    text-decoration: none;
}

/* Modal Animation */
.modal-content, #modal-caption {
    animation-name: zoomIn;
    animation-duration: 0.3s;
}

@keyframes zoomIn {
    from {transform: scale(0.95); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

/* Copy Buttons */
.copy-btn {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.copy-btn:hover {
    background-color: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
}
.copy-btn.copied {
    background-color: #dcfce3;
    border-color: #86efac;
    color: #166534;
}

/* Tabs */
.tabs-container {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.tab-buttons {
    display: flex;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
}
.tab-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: #64748b;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}
.tab-btn:hover {
    color: #0f172a;
    background: #e2e8f0;
}
.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: #fff;
}
.tab-content {
    display: none;
    padding: 24px;
}
.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}
.specs-box {
    background: #f8fafc; 
    padding: 16px; 
    border: 1px solid #cbd5e1; 
    border-radius: 6px; 
    font-family: monospace; 
    font-size: 0.95rem; 
    color: #475569; 
    white-space: pre-wrap; 
    line-height: 1.6;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* =========================================
   MỤC 8: QUẢN LÝ HỢP ĐỒNG & BỘ EXPLAINER HOVER
   ========================================= */

.contract-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.form-group-block {
    position: relative;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    overflow: visible;
}

.form-group-block:hover,
.form-group-block:focus-within {
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
    z-index: 50;
}

.form-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    color: #1e293b;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
}

.form-group-header .group-badge {
    background: #e0e7ff;
    color: #4338ca;
    font-size: 0.78rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}

/* Interactive Input Card with Hover Explainer */
.field-explainer-item {
    position: relative;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.field-explainer-item:last-child {
    margin-bottom: 0;
}

.field-explainer-item:hover,
.field-explainer-item.active {
    background: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.15), 0 8px 10px -6px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
    z-index: 999;
}

.field-explainer-item .field-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.field-explainer-item .field-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.field-explainer-item .field-type-pill {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 6px;
    background: #ede9fe;
    color: #6d28d9;
    font-weight: 600;
}

.field-explainer-item .field-preview-box {
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.85rem;
    color: #475569;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.field-explainer-item .hover-hint {
    font-size: 0.75rem;
    color: #6366f1;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    margin-top: 6px;
}

/* Hover Tooltip / Detail Popover */
.field-popover {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 280px;
    background: #1e1b4b;
    color: #ffffff;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 20px 30px -5px rgba(0, 0, 0, 0.4), 0 10px 15px -5px rgba(0, 0, 0, 0.2);
    z-index: 99999 !important;
    animation: popoverFade 0.25s ease forwards;
}

/* Arrow for popover */
.field-popover::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 24px;
    width: 12px;
    height: 12px;
    background: #1e1b4b;
    transform: rotate(45deg);
}

/* Pop upward for the last child in each block to prevent overflow */
.field-explainer-item:last-child .field-popover {
    top: auto;
    bottom: calc(100% + 8px);
}

.field-explainer-item:last-child .field-popover::before {
    top: auto;
    bottom: -6px;
}

.field-explainer-item:hover .field-popover,
.field-explainer-item.active .field-popover {
    display: block;
    pointer-events: auto;
}

@keyframes popoverFade {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.popover-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #a5b4fc;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.popover-desc {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #e2e8f0;
    margin-bottom: 8px;
}

.popover-tip {
    background: rgba(99, 102, 241, 0.25);
    border-left: 3px solid #818cf8;
    padding: 6px 10px;
    border-radius: 0 6px 6px 0;
    font-size: 0.8rem;
    color: #c7d2fe;
    margin-top: 6px;
}

.popover-alert {
    background: rgba(239, 68, 68, 0.2);
    border-left: 3px solid #f87171;
    padding: 6px 10px;
    border-radius: 0 6px 6px 0;
    font-size: 0.8rem;
    color: #fecaca;
    margin-top: 6px;
}

/* UI Badges */
.badge-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-rent {
    background-color: #cffafe;
    color: #0891b2;
}

.badge-active {
    background-color: #dcfce7;
    color: #16a34a;
}

.badge-btn-auto {
    background: #e0e7ff;
    color: #4f46e5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Interactive Explainer Table */
.explainer-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.92rem;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
}

.explainer-table th {
    background: #f1f5f9;
    color: #334155;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
}

.explainer-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

.explainer-table tr:hover td {
    background: #f8fafc;
}

.explainer-table .tag-important {
    color: #dc2626;
    background: #fee2e2;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
    margin-left: 6px;
}

/* Responsive popover handling */
@media (max-width: 768px) {
    .contract-grid-container {
        grid-template-columns: 1fr;
    }
    .field-popover {
        position: relative;
        top: 8px;
        left: 0;
        right: 0;
        margin-top: 10px;
    }
    .field-popover::before {
        display: none;
    }
    .field-explainer-item.active .field-popover {
        display: block;
    }
}

/* =========================================
   MỤC 9: BÁO GIÁ PRO & BOT ZALO AI
   ========================================= */

.prompt-copy-card {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    margin: 20px 0;
    border: 1px solid #334155;
    box-shadow: var(--shadow-md);
    position: relative;
}

.prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #1e293b;
}

.prompt-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #38bdf8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prompt-content {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 14px 16px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #f1f5f9;
    white-space: pre-wrap;
    word-break: break-word;
}

.zalo-step-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.zalo-step-card:hover {
    border-color: #0284c7;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.zalo-step-num {
    background: #0284c7;
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.zalo-step-body h4 {
    margin-bottom: 6px;
    color: #0f172a;
    font-size: 1.05rem;
}

.zalo-step-body p {
    color: #475569;
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0;
}

.feature-badge-stamp {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* =========================================
   MỤC: XEM HƯỚNG DẪN TỰ ĐỘNG (AUTO-TOUR CINEMATIC MODE)
   ========================================= */

.btn-auto-tour {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 9px 18px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
    transition: all 0.25s ease;
    white-space: nowrap;
    margin-left: 12px;
}

.btn-auto-tour:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
    filter: brightness(1.08);
}

.btn-auto-tour:active {
    transform: translateY(0);
}

/* Dark cinematic backdrop */
.tour-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9990;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.tour-overlay.active {
    display: block;
    opacity: 1;
}

/* Spotlight on focused element */
.tour-target-highlight {
    position: relative !important;
    z-index: 9995 !important;
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.82), 0 0 50px rgba(129, 140, 248, 0.95), 0 25px 40px rgba(0, 0, 0, 0.6) !important;
    transform: scale(1.04) !important;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease !important;
    border-radius: 14px !important;
}

/* Special Zoom for images in tour */
img.tour-target-highlight {
    transform: scale(1.07) !important;
}

/* Zoom for text cards */
.tour-target-text-zoom {
    font-size: 1.15em !important;
    line-height: 1.8 !important;
}

/* Narration & Subtitle Floating Card */
.tour-narration-card {
    position: fixed;
    bottom: 95px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: calc(100% - 40px);
    max-width: 760px;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(129, 140, 248, 0.45);
    border-radius: 16px;
    padding: 18px 24px;
    color: #ffffff;
    z-index: 10000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(99, 102, 241, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tour-narration-card.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.tour-narration-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tour-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.tour-narration-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 6px;
}

.tour-narration-desc {
    font-size: 0.92rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin: 0;
}

/* Tour Controller Bar (Bottom Video-style player) */
.tour-player-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(30px);
    width: calc(100% - 40px);
    max-width: 760px;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    z-index: 10000;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tour-player-bar.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.tour-timeline {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tour-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    overflow: hidden;
}

.tour-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
    border-radius: 10px;
    transition: width 0.1s linear;
}

.tour-time-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

.tour-btn-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tour-ctrl-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.tour-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
}

.tour-play-btn {
    background: #6366f1;
    border-color: #818cf8;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
    font-size: 1rem;
}

.tour-play-btn:hover {
    background: #4f46e5;
}

.tour-exit-btn {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.tour-exit-btn:hover {
    background: rgba(239, 68, 68, 0.4);
    color: #ffffff;
}

@media (max-width: 768px) {
    .btn-auto-tour {
        padding: 7px 12px;
        font-size: 0.8rem;
        margin-left: 6px;
    }
    .tour-narration-card {
        bottom: 130px;
        padding: 14px 16px;
    }
    .tour-player-bar {
        flex-wrap: wrap;
        padding: 12px 14px;
        gap: 10px;
    }
    .tour-timeline {
        order: -1;
        width: 100%;
    }
}



