body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #101014;
    /*             background-color: #141414; สีเทา */
    color: #c7c7c7;
}

a {
    text-decoration: none; /* Remove underline */
}

/* header */  
.header h1 {
    margin: 0;
    font-size: 48px;
    letter-spacing: 2px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #18181c;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10;
}

.header .menu {
    display: flex;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
}

.header-logo {
    width: 40px;
    height: 40px;
    font-size: 40px;
}

.header-logo-text {
    font-size: 32px;
    font-weight: bold;
    color: #e50914;
    position: relative;
    left: -6.5px;
}

.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
}

.language-btn:hover {
    opacity: 0.8;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #1a1a1a;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 8px;
    overflow: hidden;
}

.language-dropdown:hover .dropdown-content {
    display: block;
}

.language-option {
    color: #e3e3e3;
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.language-option:hover {
    background-color: #333;
}

.header-btn{
    font-size: 0.95rem;
    color: #fff;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    background-color: rgba(255, 255, 255, .15);
    text-decoration: none;
}

.header-sub{
    background-color: #e50914;
    color: #18181c;
    letter-spacing: 1px;
}

.header-sub:hover{
    background-color: rgb(239, 58, 67);
}

.header-login:hover{
    background-color: rgba(255, 255, 255, .3);
}

.header-left{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}
.left-menu{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.header-left a{
    color: #fff;
    font-size: 0.95rem;
}

.header-left a:hover{
    color: rgba(255, 255, 255, .7);
}
/* Browse Dropdown Styles */
.browse-dropdown {
    position: relative;
    display: inline-block;
  }
  
  .browse-btn {
    color: #e3e3e3;
    padding: 10px 15px;
    display: inline-block;
    transition: color 0.3s ease;
  }
  
  .browse-btn:hover {
    color: #ffffff;
  }
  
  .browse-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    background-color: #1a1a1a;
    min-width: 280px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 8px;
    z-index: 1000;
    padding: 8px 0;
    transition: all 0.3s ease;
    transform: translateY(-10px);
  }
  
  .browse-dropdown:hover .browse-content {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }
  
  /* Add a pseudo-element to create a larger hover area */
  .browse-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
  }
  
  .browse-content a {
    color: #e3e3e3;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 14px;
    white-space: nowrap;
  }
  
  .browse-content a:hover {
    background-color: #333;
    color: #ffffff;
  }
  
  /* Add smooth scrolling for anchor links */
  html {
    scroll-behavior: smooth;
  }


/* video popup */
.image-container img {
    cursor: pointer;
    width: 200px;
    margin: 10px;
    border: 2px solid #ccc;
    border-radius: 8px;
}

.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
}

.popup-content {
    position: relative;
    border-radius: 8px;
    max-width: 100%;
    max-height: 100%;
}

.popup-content video {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #000000;
    color: black;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 18px;
    cursor: pointer;
}

/* New Hero Section */
.new-hero {
  position: relative;
  width: 100%;
  /* height: 60vh; */
  height: 430px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: start;
  margin-top: 80px;
  margin-bottom: 64px;
}

.black-fade {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(16,16,20,1) 0%, rgba(16,16,20,1) 30%, rgba(16,16,20,0) 90%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: start;
  color: white;
  max-width: 1000px;
  padding: 0 2.5%;
  opacity: 0;
  animation: fadeIn 1s ease-out 1s forwards;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.cta-button {
  padding: 15px 40px;
  font-size: 1.2rem;
  background-color: #e50914;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.cta-button:hover {
  transform: scale(1);
  background-color: rgb(239, 58, 67);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sliding-bg {
  position: absolute;
  top: 0;
  right: -10%;
  width: 110%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: background-color 100s;
}

.sliding-bg.active {
  animation: slideInBg 2s ease-out forwards;
}

.sliding-bg.fade-to-black {
  background-image: none !important;
  background-color: #000000;
  right: 0;
  opacity: 1;
}

@keyframes slideInBg {
  from {
    opacity: 0;
    right: -10%;
  }
  to {
    opacity: 1;
    right: 0;
  }
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    gap: 6px;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    width: 100%;
    height: calc(100vh - 68px);
    background-color: #18181c;
    z-index: 9;
    overflow-y: auto;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-menu-content a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 10px 0;
}

.mobile-language-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Mobile Browse Menu Styles */
.mobile-browse-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-browse-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-size: 1.1rem;
    padding: 10px 0;
    cursor: pointer;
}

.mobile-browse-arrow {
    transition: transform 0.3s ease;
}

.mobile-browse-menu.active .mobile-browse-arrow {
    transform: rotate(90deg);
}

.mobile-browse-content {
    display: none;
    flex-direction: column;
    gap: 10px;
    padding-left: 20px;
}

.mobile-browse-menu.active .mobile-browse-content {
    display: flex;
}

.mobile-browse-content a {
    color: #e3e3e3;
    font-size: 1rem;
    padding: 8px 0;
}

.mobile-browse-content a:hover {
    color: #ffffff;
}

/* When hamburger menu is active */
.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Category Styles */
.category-page-content{
    margin-top: calc(90px + 48px);
}

/* Mobile Responsive Styles */
@media screen and (max-width: 767px) {
    .header {
        padding: 15px;
    }

    .header-logo {
        width: 32px;
        height: 32px;
    }

    .header-logo-text {
        font-size: 24px;
    }

    .left-menu {
        display: none;
    }

    .menu .language-dropdown,
    .menu .header-btn {
        display: none;
    }

    .hamburger-menu {
        display: flex;
    }

    .new-hero {
       margin-top: 68px;
       margin-bottom: 0px;
       height: 400px;
    }

    .category-page-content{
        margin-top: calc(90px + 16px);
    }

    .hero-content{
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
      
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .cta-button {
        padding: 10px 20px;
        font-size: 1rem;
        border-radius: 4px;
    }

    .black-fade {
        background: linear-gradient(0deg, rgba(16,16,20,1) 0%, rgba(16,16,20,1) 40%, rgba(16,16,20,0) 90%);
      }
}

@media screen and (min-width: 768px) {
    .mobile-menu {
        display: none !important;
    }

}

/* Tablet Styles */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .header {
        padding: 15px;
    }

    .header-logo-text {
        font-size: 28px;
    }

    .left-menu {
        gap: 20px;
    }

    .menu {
        gap: 10px;
    }

    .header-btn {
        padding: 4px 8px;
        font-size: 0.9rem;
    }

    .category-page-content{
        margin-top: calc(90px + 32px);
    }

    .new-hero{
        margin-top: 70px;
        height: 330px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
      
    .hero-content p {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .cta-button {
        padding: 10px 20px;
        font-size: 1rem;
        border-radius: 4px;
    }
}