/* Design Tokens & Root Variables - Dark Mode Hi-Tech Theme (VinFast & Murrplastik) */
:root {
    --bg-primary: #060608;
    --bg-secondary: #0d0d12;
    --accent-red: #d51e29;
    --accent-red-hover: #f02834;
    --accent-red-glow: rgba(213, 30, 41, 0.3);
    --accent-blue: #007bc3;
    --accent-blue-glow: rgba(0, 123, 195, 0.2);
    --accent-cyan: #06b6d4;
    --text-primary: #f8f9fa;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(13, 13, 18, 0.85);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-border-red: rgba(213, 30, 41, 0.3);
    --glass-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.6);
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Plus Jakarta Sans', 'Montserrat', sans-serif;
    --header-height: 80px;
    --max-width: 1200px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: #2d3748;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-red);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* Reusable Glassmorphic Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--glass-shadow);
    padding: 30px;
    transition: var(--transition);
}

.glass-card:hover {
    border-color: var(--glass-border-red);
    box-shadow: 0 16px 48px 0 rgba(213, 30, 41, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--accent-red);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--accent-red-glow);
}

.btn-primary:hover {
    background-color: var(--accent-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(213, 30, 41, 0.5);
}

.btn-outline-white {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ffffff;
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

/* Sticky Main Header (Dark Mode Adaption) */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(6, 6, 8, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.company-name {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    color: #ffffff !important;
    letter-spacing: 0.5px;
    text-decoration: none !important;
    display: inline-block;
    transition: opacity 0.2s ease;
}

.company-name:hover {
    color: #ffffff !important;
    text-decoration: none !important;
    opacity: 0.85;
}

.distributor {
    font-size: 11px;
    color: var(--accent-red) !important;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none !important;
    display: inline-block;
    transition: opacity 0.2s ease;
}

.distributor:hover {
    color: var(--accent-red-hover) !important;
    text-decoration: none !important;
    opacity: 0.85;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
}

.nav-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: #ffffff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-red);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 160px 24px 100px;
    background: radial-gradient(circle at 50% 20%, rgba(213, 30, 41, 0.12) 0%, rgba(6, 6, 8, 1) 70%);
    border-bottom: 1px solid var(--border-color);
}

.hero-container {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.cooperation-badges {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 18px;
    border-radius: 50px;
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--text-secondary);
}

.badge {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.badge-murr { color: var(--accent-red); }
.badge-tt { color: var(--accent-cyan); }
.badge-vf { color: var(--accent-blue); }

.hero-title {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 32px;
}

.hero-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 36px;
    font-size: 14px;
    color: var(--text-muted);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-item i { color: var(--accent-red); }

/* Content Sections */
.content-section {
    padding: 80px 24px;
}

.section-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-tag {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-red);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}

.section-title {
    font-size: 32px;
    margin-bottom: 12px;
}

.header-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-red), var(--accent-blue));
    margin: 0 auto;
    border-radius: 2px;
}

/* Overview Section */
.overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.info-block h3, .summary-block h3 {
    font-size: 18px;
    color: var(--accent-red);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-list {
    list-style: none;
}

.info-list li {
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.info-list ul {
    margin-top: 6px;
    padding-left: 20px;
}

/* Issues Cards & Photo Gallery */
.issues-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.status-card {
    text-align: left;
}

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
}

.icon-red { background: rgba(213, 30, 41, 0.15); color: var(--accent-red); }
.icon-yellow { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

.status-card h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.status-card p {
    font-size: 13px;
    color: var(--text-secondary);
}

.photo-gallery-section h3 {
    font-size: 20px;
    margin-bottom: 24px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    padding: 12px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.item-desc {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Technical Solution & 3D Viewer */
.solution-detail-card {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
    margin-bottom: 40px;
}

.comparison-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comp-item {
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    border-left: 3px solid #718096;
}

.comp-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comp-title.red { color: var(--accent-red); }
.comp-title.green { color: #10b981; }

.callout-card {
    background: rgba(213, 30, 41, 0.08);
    border: 1px solid rgba(213, 30, 41, 0.2);
    border-radius: var(--radius-md);
    padding: 20px;
}

.callout-card h5 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #ffffff;
}

/* 3D Interactive Card */
.interactive-3d-card {
    margin-bottom: 40px;
}

.card-header-3d {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.viewer-layout {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 24px;
}

.viewer-container-wrapper {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000000;
    border: 1px solid var(--border-color);
}

#threejs-container {
    width: 100%;
    height: 420px;
    position: relative;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 6, 8, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 10;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-red);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.viewer-controls-bar {
    position: absolute;
    bottom: 16px;
    left: 16px;
    display: flex;
    gap: 10px;
    z-index: 5;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.spec-table tr {
    border-bottom: 1px solid var(--border-color);
}

.spec-table td {
    padding: 12px 8px;
    color: var(--text-secondary);
}

.spec-table td:first-child {
    color: var(--text-primary);
    width: 40%;
}

/* Drawings & Videos */
.drawings-grid, .videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
    margin-bottom: 30px;
}

.drawing-card img, .video-card video {
    width: 100%;
    border-radius: var(--radius-sm);
}

.drawing-title, .video-title {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.schematic-flex {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.schematic-img img {
    width: 100%;
    border-radius: var(--radius-sm);
}

.schematic-img span {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    margin-top: 6px;
    text-align: center;
}

/* Materials Tables */
.table-responsive {
    overflow-x: auto;
}

.materials-table, .qualification-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 16px;
}

.materials-table th, .qualification-table th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    padding: 14px 12px;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
}

.materials-table td, .qualification-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.gallery-thumbs {
    display: flex;
    gap: 6px;
}

.gallery-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.gallery-thumb:hover {
    border-color: var(--accent-red);
    transform: scale(1.1);
}

/* Construction Log Cards */
.construction-log-card {
    margin-bottom: 30px;
}

.construction-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.event-date-badge {
    background: rgba(213, 30, 41, 0.2);
    color: var(--accent-red);
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 13px;
}

.event-status-tag {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 12px;
}

.construction-highlights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.highlight-box h4 {
    font-size: 15px;
    margin-bottom: 12px;
}

.highlight-box ul {
    padding-left: 20px;
}

.highlight-box li {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.testing-plan-card {
    background: rgba(0, 123, 195, 0.1);
    border: 1px solid rgba(0, 123, 195, 0.25);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 30px;
}

.test-dates-pill {
    background: rgba(0, 123, 195, 0.2);
    color: var(--accent-blue);
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 12px;
}

.construction-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.construction-gallery-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    overflow: hidden;
    padding: 8px;
}

.construction-gallery-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 4px;
}

.construction-gallery-caption {
    padding: 8px 4px 4px;
    font-size: 12px;
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: var(--radius-sm);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.lightbox-caption {
    margin-top: 16px;
    color: var(--text-primary);
    text-align: center;
    font-size: 14px;
}

.close-lightbox {
    position: absolute;
    top: 24px;
    right: 32px;
    color: #ffffff;
    font-size: 36px;
    font-weight: 300;
    cursor: pointer;
}

/* Footer (Dark Mode Adaption) */
.main-footer {
    background: #040405;
    border-top: 1px solid var(--border-color);
    padding: 40px 24px;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.footer-info p {
    margin-bottom: 8px;
}

.footer-copyright-warning {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-muted);
    text-align: justify;
}

.footer-copyright-warning strong {
    color: var(--text-secondary);
}

.murr-link {
    color: var(--accent-red);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: var(--transition);
}

.murr-link:hover {
    color: var(--accent-red-hover);
}

/* Responsive Rules */
@media (max-width: 992px) {
    .hero-title { font-size: 32px; }
    .overview-grid, .solution-detail-card, .viewer-layout, .construction-highlights-grid, .schematic-flex {
        grid-template-columns: 1fr;
    }
    .nav-menu { display: none; }
}
