/* Variables */
:root {
    --bg-dark: #0B0C10;
    --bg-card: rgba(31, 40, 51, 0.6);
    --text-primary: #C5C6C7;
    --text-heading: #FFFFFF;
    --accent-primary: #66FCF1;
    --accent-secondary: #45A29E;
    --glass-border: rgba(102, 252, 241, 0.1);
    --transition: all 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(11, 12, 16, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-heading);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.logo img {
    height: 32px;
    width: auto;
    border-radius: 6px;
    object-fit: cover;
}

.logo span.dot {
    color: var(--accent-primary);
}

.navbar nav a {
    margin-left: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    background: radial-gradient(circle at 80% 20%, rgba(69, 162, 158, 0.15) 0%, transparent 40%);
}

.hero-content {
    flex: 1;
    max-width: 600px;
    padding-top: 80px;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(102, 252, 241, 0.1);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    color: var(--text-heading);
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    color: #a0a3a8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn.primary {
    background: var(--accent-primary);
    color: #000;
    box-shadow: 0 0 20px rgba(102, 252, 241, 0.4);
}

.btn.primary:hover {
    box-shadow: 0 0 30px rgba(102, 252, 241, 0.7);
    transform: translateY(-2px);
}

.btn.secondary {
    background: transparent;
    color: var(--text-heading);
    border: 1px solid var(--glass-border);
}

.btn.secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

/* Abstract Mockup container */
.mockup-container {
    position: relative;
    width: 450px;
    height: 450px;
}

.phone-mockup-img {
    position: absolute;
    width: 250px;
    height: auto;
    border-radius: 30px;
    left: 0;
    top: 0;
    box-shadow: -10px 10px 40px rgba(0,0,0,0.7);
    z-index: 2;
    transition: var(--transition);
}

.device-mockup-img {
    position: absolute;
    width: 280px;
    height: auto;
    border-radius: 20px;
    right: 0;
    bottom: 20px;
    box-shadow: 10px 10px 40px rgba(0,0,0,0.8);
    z-index: 3;
    transition: var(--transition);
}

.phone-mockup-img:hover, .device-mockup-img:hover {
    transform: scale(1.05);
}

/* Sections Global */
section {
    padding: 100px 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-heading);
    margin-bottom: 15px;
}

/* Features Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-card);
    padding: 40px 30px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-secondary);
    box-shadow: 0 10px 30px rgba(102, 252, 241, 0.15);
}

.feature-card .icon {
    font-size: 2.8rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px auto;
    background: linear-gradient(135deg, rgba(102, 252, 241, 0.15) 0%, rgba(102, 252, 241, 0) 100%);
    border: 1px solid rgba(102, 252, 241, 0.3);
    border-radius: 20px;
    color: var(--accent-secondary);
    box-shadow: inset 0 0 20px rgba(102, 252, 241, 0.1);
}

.feature-card .icon i {
    background: linear-gradient(135deg, #ffffff, var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 10px rgba(102, 252, 241, 0.4));
}

.feature-card h3 {
    color: var(--text-heading);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.feature-card.left-align {
    text-align: left;
}

.feature-card.left-align .icon {
    margin: 0 0 25px 0;
}

.feature-card.left-align h3 {
    text-align: left;
}

/* Guide Timeline */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    counter-reset: step-counter; /* Khởi tạo bộ đếm tự động */
}

.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 100%;
    background: var(--glass-border);
    left: 24px;
    top: 0;
}

.timeline-item {
    display: flex;
    margin-bottom: 40px;
    position: relative;
}

.step-number {
    counter-increment: step-counter; /* Tăng bộ đếm mỗi khi gặp class này */
    width: 50px;
    height: 50px;
    background: var(--bg-dark);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-primary);
    z-index: 1;
    flex-shrink: 0;
}

.step-number::before {
    content: counter(step-counter); /* Hiển thị số tự động */
}

.step-content {
    margin-left: 30px;
    background: var(--bg-card);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    flex-grow: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px;
}

.step-text {
    flex: 1;
}

.step-content h3 {
    color: var(--text-heading);
    margin-bottom: 10px;
}

.step-image-placeholder {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed var(--glass-border);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    position: relative;
    min-height: 150px;
    display: flex;
    flex-wrap: nowrap; /* Ép buộc các ảnh luôn nằm trên 1 hàng ngang */
    gap: 15px; /* Khoảng cách giữa các ảnh */
    align-items: center;
    justify-content: flex-start; /* Căn trái để cuộn mượt mà */
    overflow-x: auto; /* Hiển thị thanh cuộn ngang nếu có quá nhiều ảnh */
    overflow-y: hidden;
}

.step-img {
    height: 300px; /* Cố định chiều cao để các ảnh xếp hàng ngang đều tăm tắp */
    width: auto; /* Chiều rộng tự co giãn theo tỷ lệ ảnh */
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

.step-img:hover {
    transform: scale(1.02);
}

/* Hiển thị ảnh nếu có thuộc tính src không lỗi (CSS không bắt được lỗi load ảnh nhưng ta có thể trick hoặc để user tự xóa class) */
/* Tạm thời hiển thị placeholder text */
.placeholder-text {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-style: italic;
    opacity: 0.7;
}

/* FAQ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-item summary {
    padding: 20px;
    font-weight: 600;
    color: var(--text-heading);
    cursor: pointer;
    list-style: none;
    position: relative;
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    color: var(--accent-primary);
    font-size: 1.2rem;
}

.faq-item[open] summary::after {
    content: '-';
}

.faq-answer {
    padding: 0 20px 20px;
    color: var(--text-primary);
}

/* Footer */
footer {
    text-align: center;
    padding: 50px 5%;
    border-top: 1px solid var(--glass-border);
    margin-top: 50px;
}

.footer-content .logo {
    margin-bottom: 15px;
}

.copyright {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 100px;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image {
        margin-top: 50px;
    }
    
    .navbar {
        flex-direction: column;
        padding: 15px 5%;
    }

    .navbar nav {
        display: flex;
        margin-top: 15px;
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .navbar nav a {
        margin-left: 0;
        font-size: 0.85rem;
    }
    
    .step-content {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Image Modal (Lightbox) */
.modal {
    display: none; /* Ẩn mặc định */
    position: fixed;
    z-index: 2000; /* Hiển thị trên cùng */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    animation: zoom 0.3s;
}

@keyframes zoom {
    from {transform: scale(0.9); opacity: 0}
    to {transform: scale(1); opacity: 1}
}

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

.close:hover,
.close:focus {
    color: var(--accent-primary);
    text-decoration: none;
}

/* Modal Navigation Buttons */
.nav-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 40px;
    transition: 0.3s;
    user-select: none;
    -webkit-user-select: none;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    z-index: 2001;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
}

.nav-btn:hover {
    background-color: rgba(102, 252, 241, 0.8);
    color: #0b0c10;
}

.nav-btn.prev {
    left: 20px;
}

.nav-btn.next {
    right: 20px;
}

@media (max-width: 768px) {
    .nav-btn {
        padding: 10px;
        font-size: 25px;
        width: 40px;
        height: 40px;
    }
    .nav-btn.prev { left: 10px; }
    .nav-btn.next { right: 10px; }
}

/* Carousel Buttons */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1; /* Thay thế thuộc tính flex của step-image-placeholder cũ */
    width: 100%;
}

.carousel-wrapper .step-image-placeholder {
    width: 100%;
    scroll-behavior: smooth; /* Cuộn mượt mà */
    -webkit-overflow-scrolling: touch;
}

/* Ẩn thanh cuộn xấu xí trên giao diện desktop nếu có nút */
.carousel-wrapper .step-image-placeholder::-webkit-scrollbar {
    height: 6px;
}
.carousel-wrapper .step-image-placeholder::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
}
.carousel-wrapper .step-image-placeholder::-webkit-scrollbar-thumb {
    background: rgba(102, 252, 241, 0.3);
    border-radius: 10px;
}
.carousel-wrapper .step-image-placeholder::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 252, 241, 0.6);
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(11, 12, 16, 0.9);
    color: var(--accent-primary);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.scroll-btn:hover {
    background: var(--accent-primary);
    color: #000;
}

.scroll-btn.left {
    left: -20px;
}

.scroll-btn.right {
    right: -20px;
}

@media (max-width: 768px) {
    .scroll-btn {
        display: none; /* Trên mobile để người dùng tự vuốt tay cho tự nhiên */
    }
}
