/* === GALAXY - ENHANCED COSMIC STYLESHEET === */

/* 1. VARIABLES & BASE SETUP
--------------------------------------------- */

/* Reset và Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-dark-deep);
    color: var(--color-text-light);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden; /* Ngăn cuộn ngang */
    /* cursor: url('/galaxy/cursor.cur'), auto; */ /* Giữ lại nếu bạn có cursor.cur */
}

/* 2. TYPOGRAPHY & GENERAL COMPONENTS
--------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text-light);
    margin-bottom: 0.75em;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.15); /* Hiệu ứng glow nhẹ cho tiêu đề */
}

.section-title {
    font-size: clamp(2.2rem, 5vw, 2.8rem); /* Responsive font size */
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, var(--color-glow-primary), var(--color-glow-secondary));
    border-radius: 2px;
    box-shadow: 0 0 15px var(--color-glow-primary); /* Glow mạnh hơn */
}

.section-title.text-start::after {
    left: 0;
    transform: translateX(0);
}

.section-subtitle {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3.5rem auto;
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

a {
    color: var(--color-accent-blue);
    text-decoration: none;
    transition: color var(--transition-ease);
}
a:hover {
    color: var(--color-glow-primary);
    text-shadow: 0 0 5px var(--color-glow-primary);
}

/* Buttons */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 14px 36px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 40px;
    border: none;
    cursor: pointer;
    text-decoration: none;

    color: #fff;
    background: linear-gradient(135deg, #5a83a9, #00dfd8); /* xanh dương -> xanh ngọc */
    box-shadow: 0 4px 15px rgba(0, 124, 240, 0.35);

    transition: all 0.3s ease;
}

/* Hover */
.cta-button:hover {
    background: linear-gradient(135deg, #00dfd8, #5a83a9);
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.5);
}

/* Active (khi click) */
.cta-button:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 124, 240, 0.3);
}


.btn-outline-primary {
    border: 1px solid var(--color-accent-blue);
    color: var(--color-accent-blue);
    background-color: transparent;
    border-radius: 25px;
    padding: 10px 25px;
    transition: all var(--transition-ease);
}
.btn-outline-primary:hover {
    background-color: rgba(0, 191, 255, 0.1);
    color: var(--color-glow-primary);
    border-color: var(--color-glow-primary);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

/* 3. HERO SECTION
--------------------------------------------- */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    color: var(--color-text-light);
}

#hero-video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: -3; /* Dưới lớp overlay */
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(5, 10, 28, 0.9) 0%, rgba(5, 10, 28, 0.6) 50%, rgba(5, 10, 28, 0.9) 100%);
    z-index: -2;
    pointer-events: none; /*không chặn sự kiện chuột*/
}

.hero-content {
    max-width: 1000px;
    padding: 30px;
    z-index: 5; /* Trên overlay, dưới video */
}

.hero-content h1 {
    font-size: clamp(1.5rem, 7vw, 4.0rem);
    font-weight: 800;
    letter-spacing: 3px;
    line-height: 1.1;
    margin-bottom: 2rem;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.7); /* Hiệu ứng glow mạnh */
    animation: text-glow 2s infinite alternate;
}

@keyframes text-glow {
    from { text-shadow: 0 0 15px var(--color-text-light); }
    to { text-shadow: 0 0 30px var(--color-glow-primary), 0 0 45px var(--color-blue-min); }
}

.hero-content .lead {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--color-text-light);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.scroll-down-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 0;
    width: 35px;
    height: 60px;
    border: 2px solid var(--color-glow-primary);
    border-radius: 30px;
    opacity: 0.8;
    transition: opacity var(--transition-ease);
}
.scroll-down-indicator:hover {
    opacity: 1;
}
.scroll-down-indicator::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 12px;
    background: var(--color-glow-primary);
    border-radius: 3px;
    animation: scroll-anim 2.5s infinite ease-out;
}

/* 4. MAIN INTRO SECTION (EXPLORE)
--------------------------------------------- */
#explore-section {
    background-color: var(--color-dark-deep);
    position: relative;
    padding: 6rem 0;
}
#explore-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://img4.thuthuatphanmem.vn/uploads/2020/12/25/hinh-anh-vu-tru-va-cac-hanh-tinh_033609129.jpg'); /* Nền tinh vân nhẹ */
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: 0;
}
#explore-section .container {
    position: relative;
    z-index: 1;
}

.feature-card {
    background-color: var(--color-dark-medium);
    border: 1px solid rgba(0, 255, 255, 0.3); /* Viền glow */
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: transform var(--transition-ease), box-shadow var(--transition-ease), border-color var(--transition-ease);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    z-index: 15;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(0,255,255,0.05) 0%, transparent 70%);
    transition: transform 0.5s ease-out;
    opacity: 0;
    pointer-events: none; /*không chặn sự kiện chuột*/
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 255, 255, 0.3), 0 0 30px rgba(255, 0, 255, 0.2);
    border-color: var(--color-glow-primary);
}
.feature-card:hover::before {
    transform: scale(1.1);
    opacity: 1;
}

.feature-card-icon {
    font-size: 3.5rem;
    color: var(--color-glow-primary);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 10px var(--color-glow-primary);
    position: relative;
    z-index: 1;
}

.feature-card .card-title {
    color: var(--color-text-light);
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
}

.feature-card .card-text {
    color: var(--color-text-muted);
    font-size: 1rem;
    margin-bottom: 2rem;
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

/* 5. LIBRARY SHOWCASE SECTION
--------------------------------------------- */
.library-showcase-section {
    position: relative;
    padding: 8rem 0;
    color: var(--color-text-light);
    text-align: center;
    overflow: hidden;
    background-color: var(--color-dark-deep); /* Nền dự phòng */
}
.library-showcase-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://cdn-media.sforum.vn/storage/app/media/wp-content/uploads/2023/12/hinh-nen-vu-tru-72.jpg'); /* Nền tinh vân lớn */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Hiệu ứng parallax */
    opacity: 0.25; /* Mờ hơn để chữ dễ đọc */
    z-index: 0;
}
.library-showcase-section .overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(5, 10, 28, 0.7) 0%, rgba(13, 22, 48, 0.8) 50%, rgba(5, 10, 28, 0.7) 100%);
    z-index: 1;
}
.library-showcase-section .container {
    position: relative;
    z-index: 2;
}

/* 6. NEWS SECTION
--------------------------------------------- */
#news-section {
    background-color: var(--color-dark-deep);
    padding: 6rem 0;
}
.news-card {
    background-color: var(--color-dark-medium);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: transform var(--transition-ease), box-shadow var(--transition-ease);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

.news-card .card-img-top {
    height: 220px;
    object-fit: cover;
    filter: brightness(0.8) contrast(1.1);
    transition: filter 0.5s ease-out;
}
.news-card:hover .card-img-top {
    filter: brightness(1) contrast(1.2);
}

.news-card .card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card .news-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    font-family: var(--font-mono);
}

.news-card .card-title {
    font-size: 1.3rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.news-card .card-text {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* 7. 3D MODEL SECTION
--------------------------------------------- */
#model3d-section {
    background-color: var(--color-dark-deep);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}
#model3d-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://salamdonya.com/assets/images/37/3773gep4k.jpg'); /* Nền hành tinh / thiên thể */
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: 0;
}
#model3d-section .container {
    position: relative;
    z-index: 1;
}

#model3d-section img {
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 255, 255, 0.4), 0 0 25px rgba(255, 0, 255, 0.2);
    border: 1px solid var(--color-glow-primary);
    transition: transform 0.5s ease;
}
#model3d-section img:hover {
    transform: scale(1.02);
}

/* 8. STATS SECTION
--------------------------------------------- */
.stats-section {
    background-color: var(--color-dark-light); /* Nền sáng hơn một chút */
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}
.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://tse4.mm.bing.net/th/id/OIP.u6J22YMNc77cXGmQeqoeDQHaEJ?cb=ucfimgc2&pid=ImgDet&w=184&h=103&c=7&dpr=1.3&o=7&rm=3'); /* Nền thiên văn học */
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: 0;
}
.stats-section .container {
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
    padding: 1.5rem 1rem;
    background-color: var(--color-dark-medium);
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    transition: transform var(--transition-ease), box-shadow var(--transition-ease);
    height: 100%;
}
.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 255, 255, 0.2);
}

.stat-icon {
    font-size: 3rem;
    color: var(--color-glow-primary);
    margin-bottom: 1rem;
    text-shadow: 0 0 10px var(--color-glow-primary);
}
.stat-number {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 700;
    color: var(--color-glow-primary);
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}
.stat-label {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* VIDEO SECTION */
.video-showcase-section {
  background: linear-gradient(to bottom, #000010, #050d1a);
  color: #fff;
  text-align: center;
  padding: 80px 20px;
}

.video-showcase-section p {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 40px auto;
  line-height: 1.6;
  color: #dce3f5;
}

.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.5);
}

.video-wrapper video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 15px;
}


/* 9. QUOTE SECTION
--------------------------------------------- */
.quote-section {
    padding: 8rem 0;
    background-image: linear-gradient(rgba(5, 10, 28, 0.8), rgba(5, 10, 28, 0.8)), url('https://hoanghamobile.com/tin-tuc/wp-content/uploads/2023/09/hinh-nen-vu-tru-25.jpg'); /* Nền thiên hà/dải ngân hà */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--color-text-light);
    text-align: center;
}
.inspirational-quote {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-style: italic;
    color: #fff;
    max-width: 900px;
    margin: 0 auto;
    border-left: 4px solid var(--color-glow-secondary);
    padding-left: 2.5rem;
    line-height: 1.5;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}
.inspirational-quote footer {
    font-size: 1.2rem;
    font-style: normal;
    color: var(--color-text-muted);
    margin-top: 2rem;
    font-family: var(--font-mono);
}

/* 10. COMMUNITY CTA SECTION
--------------------------------------------- */
.community-cta-section {
    background: linear-gradient(135deg, var(--color-dark-deep) 0%, var(--color-dark-light) 100%);
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.community-cta-section::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle at center, rgba(138, 43, 226, 0.1) 0%, transparent 50%);
    animation: pulse-bg 10s infinite alternate;
    z-index: 0;
}
@keyframes pulse-bg {
    from { transform: scale(1); opacity: 0.1; }
    to { transform: scale(1.2); opacity: 0.2; }
}
.community-cta-section .container {
    position: relative;
    z-index: 1;
}

/* 11. ABOUT SECTION
--------------------------------------------- */
/* Section tổng thể */
#about-section {
    background: linear-gradient(135deg, #0d1b2a, #1b263b); /* nền tối sang trọng */
    color: #f8f9fa; /* chữ sáng dễ đọc */
    position: relative;
    overflow: hidden;
}

/* Hiệu ứng trang trí background */
#about-section::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    z-index: 0;
}
#about-section::after {
    content: "";
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    z-index: 0;
}

/* Nội dung */
#about-section .container {
    position: relative;
    z-index: 1; /* để nổi lên trên các vòng trang trí */
}

/* Đoạn mô tả */
#about-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #d1d9e6;
}

/* Hình ảnh */
#about-section img {
    border: 6px solid rgba(255,255,255,0.15);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
#about-section img:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}


/* 12. ANIMATION ON SCROLL (AOS)
--------------------------------------------- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.5s var(--transition-slow), transform 0.5s var(--transition-slow);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 13. RESPONSIVE ADJUSTMENTS
--------------------------------------------- */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: clamp(2.5rem, 9vw, 4.5rem);
    }
    .section-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }
    .section-subtitle {
        font-size: 1rem;
    }
    .cta-button {
        padding: 12px 25px;
        font-size: 1rem;
    }
    .inspirational-quote {
        font-size: clamp(1.4rem, 4vw, 2rem);
        padding-left: 1.5rem;
    }
    .inspirational-quote footer {
        font-size: 1rem;
    }
    .stat-number {
        font-size: clamp(2rem, 5vw, 3rem);
    }
    .stat-label {
        font-size: 0.9rem;
    }
    #about-section img {
        width: 60%;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }
    .hero-content .lead {
        font-size: 1rem;
    }
    .feature-card, .news-card, .stat-item {
        margin-bottom: 1.5rem; /* Thêm khoảng cách giữa các card trên mobile */
    }
    .section-title {
        text-align: center !important; /* Force center on mobile */
    }
    .section-title::after {
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

@media (max-width: 576px) {
    .hero-content {
        padding: 15px;
    }
    .cta-button {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .section-subtitle {
        font-size: 0.9rem;
    }
    .feature-card-icon {
        font-size: 3rem;
    }
    .inspirational-quote {
        font-size: 1.2rem;
        padding-left: 1rem;
        border-left: 3px solid var(--color-glow-secondary);
    }
}
