/* CSS tích hợp để đảm bảo bản xem trước hoạt động mượt mà */
:root {
    --primary: #0f172a;
    --accent: #eab308; /* Vàng năng lượng */
    --text: #334155;
    --bg: #f8fafc;
    --card-bg: #ffffff;
}

body {
    font-family: 'Be Vietnam Pro', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

h1, h2, h3, .rank {
    font-family: 'Space Grotesk', sans-serif;
}

/* Top Bar */
.sp-sticky-header {
    background: white;
    padding: 10px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sp-mag-logo img { height: 30px; }

/* Hero Section */
.hero {
    text-align: center;
    padding: 5rem 1rem 3rem;
}

.glitch-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 900;
    color: var(--primary);
    text-transform: uppercase;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    text-shadow: 2px 2px 0px rgba(234, 179, 8, 0.3);
}

/* Hero Intro Styles */
.hero-subtitle {
    color: #64748b;
    font-style: italic;
    font-size: 0.95rem;
    margin-top: 1rem;
    margin-bottom: 2.5rem;
}

.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.intro-card {
    background: #0f172a;
    color: #cbd5e1;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    border: 1px solid #1e293b;
    text-align: justify;
    font-size: 0.95rem;
    line-height: 1.8;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.intro-card p {
    margin: 0;
}

.intro-grid::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #0ea5e9;
    border-radius: 50%;
    box-shadow: 0 0 0 8px rgba(15, 23, 42, 1), 0 0 0 9px rgba(255, 255, 255, 0.2);
    z-index: 2;
}

.hero-image-container {
    max-width: 800px;
    margin: 3rem auto 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.2);
}

.hero-image-container img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.hero-image-container:hover img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .intro-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .intro-grid::after {
        display: none;
    }
}

/* Filter Section */
.filter-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 auto 3rem;
    max-width: 900px;
    padding: 0 1rem;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 30px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.2);
}

/* Timeline Section */
.timeline-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
}

.timeline-section::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: #cbd5e1;
    top: 0;
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5rem;
    position: relative;
    width: 100%;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item.hidden-item {
    display: none !important;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-node {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    border: 4px solid var(--bg);
    box-shadow: 0 0 0 4px rgba(234, 179, 8, 0.3);
    z-index: 10;
    transition: all 0.3s;
}

.timeline-item:hover .timeline-node {
    transform: translate(-50%, -50%) scale(1.3);
}

.timeline-content {
    width: 42%;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
    position: relative;
}

.timeline-item:nth-child(odd) .timeline-content::after {
    content: ''; position: absolute; top: 50%; right: -10px; transform: translateY(-50%);
    border-width: 10px 0 10px 10px; border-style: solid; border-color: transparent transparent transparent var(--card-bg);
}

.timeline-item:nth-child(even) .timeline-content::after {
    content: ''; position: absolute; top: 50%; left: -10px; transform: translateY(-50%);
    border-width: 10px 10px 10px 0; border-style: solid; border-color: transparent var(--card-bg) transparent transparent;
}

.company-name {
    color: var(--primary);
    margin-top: 0;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.spec-list {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
    background: #f1f5f9;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
    border-radius: 0 8px 8px 0;
}

.spec-list li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: #475569;
}
.spec-list li strong { color: var(--primary); }

.desc-text {
    font-size: 1rem;
    color: #475569;
    text-align: justify;
    margin-bottom: 0;
}

.timeline-visual {
    width: 48%;
}

.tilt-box {
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.15);
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

.tilt-box img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.timeline-visual:hover .tilt-box img {
    transform: scale(1.08);
}

/* Table Section */
.summary-table-section {
    max-width: 1100px;
    margin: 4rem auto;
    padding: 0 1rem;
}

.table-title {
    text-align: center;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 2rem;
}

.table-responsive {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
}

.tech-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    text-align: left;
    min-width: 800px;
}

.tech-table th, .tech-table td {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.tech-table th {
    background: var(--primary);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.tech-table tr:last-child td { border-bottom: none; }
.tech-table tr:hover td { background: #f8fafc; }
.rank { font-weight: bold; color: var(--accent); font-size: 1.1rem; }

footer {
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
    font-size: 0.9rem;
    background: white;
    margin-top: 4rem;
}

/* Responsive Design */
@media (max-width: 900px) {
    .timeline-section::before { left: 30px; }
    .timeline-item, .timeline-item:nth-child(even) { flex-direction: column; align-items: flex-end; margin-bottom: 3rem; }
    .timeline-content, .timeline-visual { width: calc(100% - 70px); }
    .timeline-content::after { display: none; }
    .timeline-visual { margin-top: 1.5rem; order: 2; }
    .timeline-content { order: 1; }
    .timeline-node { left: 30px; top: 40px; transform: translate(-50%, -50%); }
    .timeline-item:hover .timeline-node { transform: translate(-50%, -50%) scale(1.2); }
}

@media (max-width: 600px) {
    .filter-container { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 10px; }
    .filter-btn { white-space: nowrap; }
    .hero { padding: 3rem 1rem 2rem; }
}