:root {
    --primary-red: #b11217;
    --dark-text: #1c1f24;
    --secondary-gray: #6c757d;
    --light-bg: #ffffff;
    --section-bg: #f8f9fa;
    --max-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
}

body {
    background: var(--light-bg);
    color: var(--dark-text);
    line-height: 1.6;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
nav {
    background: white;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

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

.logo-container img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--primary-red);
    object-fit: cover;
}

.logo-text {
    color: var(--primary-red);
    font-weight: 700;
    font-size: 20px;
    line-height: 1.3;
}

.logo-text span {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--secondary-gray);
    letter-spacing: 0.3px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-red);
}

/* 页面标题 */
.page-header {
    background: white;
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.page-header h1 {
    font-size: 40px;
    color: var(--primary-red);
    margin-bottom: 15px;
}

.page-header p {
    font-size: 18px;
    color: var(--secondary-gray);
    max-width: 700px;
    margin: 0 auto;
}

/* 区块样式 */
.section {
    padding: 80px 0;
}

.section-light {
    background: var(--section-bg);
}

.section h2 {
    font-size: 36px;
    margin-bottom: 30px;
    color: var(--primary-red);
    text-align: center;
}

.text-center {
    text-align: center;
    margin-bottom: 30px;
    color: var(--secondary-gray);
}

/* 页脚 */
footer {
    background: #1a1a1a;
    color: white;
    padding: 60px 0;
    margin-top: 60px;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-logo img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--primary-red);
    object-fit: cover;
}

.footer-logo span {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

footer p {
    color: #888;
    font-size: 14px;
}

/* =============================
   模态框 - 共享样式
============================= */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-dialog {
    width: 90%;
    max-width: 1100px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    transition: all 0.3s ease;
    position: relative;
}

.modal.show .modal-dialog {
    transform: translateY(0) scale(1);
}

.modal-header {
    background: var(--primary-red);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#modalTitle {
    font-size: 18px;
    font-weight: 600;
    flex: 1;
}

#modalCounter {
    font-size: 14px;
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 30px;
    margin: 0 20px;
}

.modal-close {
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    transition: transform 0.2s;
}

.modal-close:hover {
    transform: scale(1.2);
}

.modal-body {
    padding: 25px;
    text-align: center;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.modal-body img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.modal-body video {
    max-width: 100%;
    max-height: 70vh;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 48px;
    color: var(--primary-red);
    cursor: pointer;
    user-select: none;
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s;
    z-index: 10001;
}

.modal-nav:hover {
    background: var(--primary-red);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.modal-prev { left: 20px; }
.modal-next { right: 20px; }

/* =============================
   Construction 页面特定样式
============================= */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.gallery-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.gallery-caption {
    padding: 20px;
    text-align: center;
    font-weight: 600;
    color: var(--primary-red);
    background: white;
}

.steps-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.step-item {
    cursor: pointer;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: 0.3s;
}

.step-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(177,18,23,0.15);
}

.step-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.step-caption {
    padding: 10px;
    font-size: 12px;
    text-align: center;
    color: var(--dark-text);
    border-top: 1px solid #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.step-item:hover .step-caption {
    white-space: normal;
    background: white;
    position: relative;
    z-index: 2;
}

.showhouse-info {
    max-width: 600px;
    margin: 0 auto;
}

.info-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    position: relative;
}

.status-badge {
    position: absolute;
    top: -15px;
    right: 30px;
    background: var(--primary-red);
    color: white;
    padding: 8px 25px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 3px 10px rgba(177,18,23,0.3);
}

.info-card ul {
    list-style: none;
    margin-top: 20px;
}

.info-card li {
    margin: 15px 0;
    font-size: 16px;
}

.info-card li i {
    color: var(--primary-red);
    margin-right: 10px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: var(--primary-red);
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 40px;
    color: var(--primary-red);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--secondary-gray);
    font-size: 14px;
}

/* =============================
   Robotics 页面特定样式
============================= */
.timeline-alternating {
    padding: 80px 0;
    position: relative;
}

.timeline-line-center {
    position: absolute;
    left: 50%;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-red), rgba(177,18,23,0.3), transparent);
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-item {
    position: relative;
    width: 100%;
    margin-bottom: 100px;
    display: flex;
    justify-content: center;
    z-index: 2;
}

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

.timeline-badge {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    top: 20px;
}

.timeline-date {
    background: var(--primary-red);
    color: white;
    padding: 10px 25px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 5px 20px rgba(177,18,23,0.3);
    white-space: nowrap;
    border: 3px solid white;
}

.timeline-card {
    width: 45%;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #eee;
    position: relative;
}

.timeline-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(177,18,23,0.2);
    border-color: var(--primary-red);
}

.timeline-item.left .timeline-card {
    margin-right: auto;
}

.timeline-item.right .timeline-card {
    margin-left: auto;
}

.timeline-card.no-media {
    border-left: 4px solid #ffc107;
}

.concept-media {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.concept-placeholder {
    text-align: center;
    color: var(--secondary-gray);
}

.concept-placeholder i {
    font-size: 48px;
    color: var(--primary-red);
    margin-bottom: 10px;
    opacity: 0.5;
}

.concept-placeholder h3 {
    font-size: 18px;
    font-weight: 400;
    color: var(--secondary-gray);
}

.timeline-subtitle {
    font-size: 14px;
    color: var(--primary-red);
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.media-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.media-item:hover {
    transform: scale(1.03);
}

.media-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.video-item {
    position: relative;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    color: var(--primary-red);
    background: rgba(255,255,255,0.9);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    pointer-events: none;
}

.doc-thumb {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    cursor: default;
    transition: all 0.2s ease;
}

.doc-thumb i {
    font-size: 24px;
    color: var(--primary-red);
    margin-bottom: 4px;
}

.doc-thumb span {
    font-size: 9px;
    text-align: center;
    color: var(--secondary-gray);
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.no-media-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 13px;
    color: var(--secondary-gray);
    border: 1px dashed #dee2e6;
    margin-top: 10px;
}

.media-count {
    text-align: right;
    color: var(--primary-red);
    font-weight: 600;
    font-size: 14px;
    margin-top: 10px;
}

.direction-block {
    background: var(--section-bg);
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
}

.direction-block h3 {
    color: var(--primary-red);
    margin-bottom: 20px;
    font-size: 22px;
}

.direction-block h3 i {
    margin-right: 10px;
}

/* 响应式 */
@media (max-width: 992px) {
    .timeline-line-center {
        left: 30px;
    }
    
    .timeline-badge {
        left: 30px;
        transform: none;
        top: 0;
    }
    
    .timeline-card {
        width: calc(100% - 80px);
        margin-left: 80px !important;
    }
}

@media (max-width: 768px) {
    nav .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .page-header h1 {
        font-size: 32px;
    }
    
    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 32px;
    }
    
    .modal-prev { left: 5px; }
    .modal-next { right: 5px; }
}