/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary-dark: #0a1f44;
  --primary-blue: #145da0;
  --accent-orange: #ff9f43;
  --accent-orange-hover: #ff7f18;
  --text-white: #ffffff;
  --text-light: rgba(255, 255, 255, 0.95);
  --text-muted: rgba(255, 255, 255, 0.85);
  --text-dim: rgba(255, 255, 255, 0.7);
  --card-bg: rgba(255, 255, 255, 0.06);
  --card-bg-hover: rgba(255, 255, 255, 0.1);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.45);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-white);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-blue));
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Header Styles */
.header {
  text-align: center;
  margin-bottom: 60px;
  animation: fadeInDown 0.8s ease;
}

.logo {
  font-size: 72px;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

h1 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle p {
  font-size: 18px;
  line-height: 1.8;
  max-width: 760px;
  margin: 12px auto;
  opacity: 0.95;
}

.subtitle .highlight {
  font-weight: 600;
  font-size: 19px;
  margin-top: 20px;
}

/* Section Styles */
section {
  margin-bottom: 80px;
  animation: fadeInUp 0.8s ease;
}

section h2 {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 30px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Intro Section */
.intro-section {
  background: var(--card-bg);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.intro-text {
  font-size: 18px;
  line-height: 1.8;
  max-width: 900px;
  margin: 0 auto;
  opacity: 0.95;
}

/* Videos Section */
.videos-section h2 {
  margin-bottom: 40px;
}

.videos {
  display: grid;
  gap: 30px;
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.video-item {
  animation: fadeInScale 0.6s ease;
}

/* Khung tỷ lệ 16:9 an toàn mọi trình duyệt */
.embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--card-bg);
  transition: var(--transition);
}

.embed:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.fallback {
  font-size: 14px;
  margin-top: 12px;
  opacity: 0.85;
  text-align: center;
}

.fallback a {
  color: var(--accent-orange);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.fallback a:hover {
  color: var(--accent-orange-hover);
  text-decoration: underline;
}

/* Features Section */
.features {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-top: 40px;
}

.feature-card {
  background: var(--card-bg);
  padding: 32px 24px;
  border-radius: var(--border-radius);
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow);
  cursor: default;
}

.feature-card:hover {
  background: var(--card-bg-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--accent-orange);
}

.feature-card p {
  font-size: 15px;
  opacity: 0.9;
  line-height: 1.6;
}

/* CTA Section */
.cta-section {
  text-align: center;
  padding: 50px 20px;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.cta-section h2 {
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 18px;
  margin-bottom: 30px;
  opacity: 0.9;
}

.button {
  display: inline-block;
  padding: 16px 36px;
  border-radius: 10px;
  background: var(--accent-orange);
  color: var(--text-white);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(255, 159, 67, 0.3);
  cursor: pointer;
}

.button:hover {
  background: var(--accent-orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 159, 67, 0.4);
}

.button:active {
  transform: translateY(0);
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 60px;
}

.footer-content p {
  font-size: 14px;
  opacity: 0.7;
  margin: 8px 0;
}

.footer-note {
  font-style: italic;
  font-size: 13px;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Responsive Design */

/* Tablet và màn hình trung bình */
@media (max-width: 1024px) {
  .container {
    padding: 35px 20px;
  }

  h1 {
    font-size: 36px;
  }

  .videos {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile lớn */
@media (max-width: 768px) {
  .container {
    padding: 25px 16px;
  }

  h1 {
    font-size: 28px;
    line-height: 1.3;
    margin-bottom: 16px;
  }

  .logo {
    font-size: 56px;
    margin-bottom: 16px;
  }

  .subtitle p {
    font-size: 16px;
    line-height: 1.6;
    padding: 0 4px;
  }

  .subtitle .highlight {
    font-size: 17px;
    margin-top: 16px;
  }

  section {
    margin-bottom: 50px;
  }

  section h2 {
    font-size: 24px;
    margin-bottom: 24px;
  }

  .videos {
    gap: 20px;
    grid-template-columns: 1fr;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-card {
    padding: 24px 20px;
  }

  .feature-icon {
    font-size: 42px;
  }

  .feature-card h3 {
    font-size: 18px;
  }

  .feature-card p {
    font-size: 14px;
  }

  .intro-section,
  .cta-section {
    padding: 28px 20px;
  }

  .intro-text {
    font-size: 16px;
    padding: 0 4px;
  }

  .cta-section p {
    font-size: 16px;
    padding: 0 4px;
  }

  .button {
    padding: 14px 28px;
    font-size: 16px;
    width: 100%;
    max-width: 300px;
  }

  .footer {
    padding: 30px 16px 16px;
    margin-top: 40px;
  }
}

/* Mobile nhỏ */
@media (max-width: 480px) {
  .container {
    padding: 20px 12px;
  }

  h1 {
    font-size: 24px;
    line-height: 1.3;
    margin-bottom: 14px;
  }

  .logo {
    font-size: 48px;
    margin-bottom: 12px;
  }

  .subtitle p {
    font-size: 15px;
    line-height: 1.6;
  }

  .subtitle .highlight {
    font-size: 16px;
  }

  section {
    margin-bottom: 40px;
  }

  section h2 {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .videos {
    gap: 16px;
  }

  .fallback {
    font-size: 13px;
    margin-top: 10px;
  }

  .features {
    gap: 14px;
  }

  .feature-card {
    padding: 20px 16px;
  }

  .feature-icon {
    font-size: 38px;
    margin-bottom: 12px;
  }

  .feature-card h3 {
    font-size: 17px;
    margin-bottom: 10px;
  }

  .feature-card p {
    font-size: 14px;
  }

  .intro-section {
    padding: 24px 16px;
  }

  .intro-text {
    font-size: 15px;
    line-height: 1.7;
  }

  .cta-section {
    padding: 24px 16px;
  }

  .cta-section h2 {
    font-size: 22px;
    margin-bottom: 12px;
  }

  .cta-section p {
    font-size: 15px;
    margin-bottom: 24px;
  }

  .button {
    padding: 13px 24px;
    font-size: 15px;
    width: 100%;
    max-width: 280px;
  }

  .footer {
    padding: 24px 12px 12px;
  }

  .footer-content p {
    font-size: 13px;
  }

  .footer-note {
    font-size: 12px;
  }
}

/* Mobile rất nhỏ */
@media (max-width: 360px) {
  .container {
    padding: 16px 10px;
  }

  h1 {
    font-size: 22px;
    line-height: 1.3;
  }

  .logo {
    font-size: 42px;
  }

  .subtitle p {
    font-size: 14px;
  }

  section h2 {
    font-size: 20px;
  }

  .intro-text,
  .cta-section p {
    font-size: 14px;
  }

  .feature-card {
    padding: 18px 14px;
  }

  .button {
    padding: 12px 20px;
    font-size: 14px;
  }
}

/* Landscape mode trên mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .container {
    padding: 20px 16px;
  }

  .logo {
    font-size: 42px;
    margin-bottom: 10px;
  }

  h1 {
    font-size: 26px;
    margin-bottom: 12px;
  }

  .subtitle p {
    font-size: 15px;
  }

  section {
    margin-bottom: 40px;
  }

  .videos {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Touch Optimization cho Mobile */
@media (hover: none) and (pointer: coarse) {
  /* Tăng kích thước touch target cho các link và button */
  a, button, .button {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .fallback a {
    padding: 8px 12px;
    display: inline-block;
  }

  /* Loại bỏ hover effects trên touch devices */
  .embed:hover,
  .feature-card:hover,
  .button:hover {
    transform: none;
  }

  /* Thêm active states cho feedback */
  .button:active {
    transform: scale(0.98);
    opacity: 0.9;
  }

  .feature-card:active {
    transform: scale(0.98);
  }
}

/* Tối ưu cho thiết bị có kết nối chậm */
@media (prefers-reduced-data: reduce) {
  .embed iframe {
    background: var(--card-bg);
  }

  /* Có thể thêm poster image thay vì autoload video */
}

/* Print Styles */
@media print {
  body {
    background: white;
    color: black;
  }

  .button,
  .embed {
    display: none;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --card-bg: rgba(255, 255, 255, 0.15);
    --card-bg-hover: rgba(255, 255, 255, 0.25);
  }
}

