body {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  background-color: #44668c;
  color: #333;
}

*,
::before,
::after {
  box-sizing: border-box;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
}


header {
  background-color: #1F2030;
  padding: 10px 15px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

header img {
  width: 60px;
  height: 60px;
  transition: transform 0.3s ease;
}

header img:hover {
  transform: scale(1.05);
}

/* 顶部行容器 */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  gap: 20px;
}

/* 左侧区域：Logo和菜单 */
.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* 右侧区域：汉堡菜单和登录按钮 */
.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* 搜索框容器 */
.search-container {
  max-width: 1440px;
  margin: 10px auto 0;
  width: 100%;
}

/* 汉堡菜单按钮 */
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

/* 移动端菜单容器 */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #1F2030;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
  padding: 15px;
  border-top: 1px solid #333;
  z-index: 999;
}

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

.mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu li {
  margin: 10px 0;
  transition: all 0.3s ease;
}

.mobile-menu a {
  color: white;
  text-decoration: none;
  display: block;
  padding: 10px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.mobile-menu a:hover {
  background-color: #EE4222;
}

main {
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

@media (min-width: 1440px) {
  main {
    max-width: 1440px;
  }
}

/* 用户页面特定样式 */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    color: #e0e0e0;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    color: #ffffff;
}

.page-header p {
    font-size: 1.1rem;
    color: #b0b0b0;
    max-width: 800px;
    margin: 0 auto;
}

.content-container {
    background-color: rgba(31, 32, 48, 0.8);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

/* 未登录状态样式 */
.not-logged-in {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.login-prompt {
    text-align: center;
    padding: 30px;
    background-color: rgba(41, 42, 68, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 400px;
    width: 100%;
}

.login-prompt i {
    color: #4285F4;
    margin-bottom: 20px;
}

.login-prompt h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #ffffff;
}

.login-prompt p {
    color: #b0b0b0;
    margin-bottom: 25px;
    line-height: 1.5;
}

.login-prompt .google-sign-in-btn {
    width: 100%;
    max-width: 300px;
}

/* 信息提示样式 */
.message-info {
    background-color: rgba(66, 133, 244, 0.1);
    border-left: 4px solid #4285F4;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.message-info i {
    color: #4285F4;
    font-size: 1.5rem;
    margin-top: 2px;
}

.message-info p {
    color: #e0e0e0;
    margin: 0;
    line-height: 1.6;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .content-container {
        padding: 20px;
    }
    
    .login-prompt {
        padding: 20px;
    }
}

/* --------- -google searchbar----------*/
#___gcse_0 {
  width: 100%;
  max-width: 100%;
}

/* 桌面端布局 */
@media (min-width:769px) {
  .menu-top {
    display: block;
  }
  
  .hamburger-menu {
    display: none;
  }
  
  /* 调整菜单间距和样式以适应桌面端 */
  .menu-top-list {
    gap: 12px;
  }
}

/* 769-791px特殊处理 */
@media (min-width:769px) and (max-width:791px) {
  .menu-top-list {
    gap: 8px;
  }
  
  .menu-top-list a {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* 移动端布局 */
@media (max-width:768px) {
  /* 隐藏桌面菜单，显示汉堡菜单 */
  .menu-top {
    display: none;
  }
  
  .hamburger-menu {
    display: block;
  }
  
  /* 调整顶部行布局 - 确保所有元素在同一行 */
  .header-top {
    flex-wrap: nowrap;
    gap: 10px;
  }
  
  /* 移除排序和宽度设置，保持默认布局 */
  .header-right {
    order: initial;
  }
  
  .header-left {
    order: initial;
    width: auto;
    justify-content: flex-start;
    flex: 1;
  }
  
  /* 调整搜索框容器 */
  .search-container {
    margin-top: 15px;
  }
}

/* 小屏移动端优化 */
@media (max-width:480px) {
  header img {
    width: 50px;
    height: 50px;
  }
  
  .header-top {
    gap: 10px;
  }
  
  .header-right {
    gap: 10px;
  }
  
  /* 调整登录按钮尺寸 */
  .google-sign-in-btn {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .google-logo {
    width: 18px;
    height: 18px;
    margin-right: 8px;
  }
}

table.gsc-search-box td.gsc-input {
  padding-right: 0 !important;
}

td .gsc-input-box {
  border-radius: 5px 0 0 5px;
  padding: 0 !important;
}

td .gsc-search-button {
  height: 35px;
  border-radius: 0 5px 5px 0;
}

.gsc-search-button-v2 {
  margin-left: 2px !important;
}



.menu-top-list {
  display: flex;
  list-style: none;
  color: #fff;
  gap: 12px;
  padding-left: 0;
  margin: 0;
  align-items: center;
}

.menu-top-list a {
  color: #fff;
  background-color: #323344;
  border: 1px solid #444;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  padding: 10px 16px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

/* YouTube按钮特殊样式 */
.menu-top-list a[href="/youtube.html"] {
  background-color: #FF0000;
  color: white;
  font-weight: bold;
  padding: 10px 16px;
  box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.menu-top-list a[href="/youtube.html"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.6s;
}

.menu-top-list a[href="/youtube.html"]:hover::before {
  left: 100%;
}

.menu-top-list a[href="/youtube.html"]:hover {
  background-color: #CC0000;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.6);
}

.menu-top-list a:hover:not([href="/youtube.html"]) {
  background-color: #EE4222;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(238, 66, 34, 0.4);
}

/* 移动端优化 */
.mobile-menu a[href="/youtube.html"] {
  background-color: #FF0000;
  border: none;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
}

.mobile-menu a[href="/youtube.html"]:hover {
  background-color: #CC0000;
}

/*----------google account----------*/

.google-sign-in-btn {
  display: flex;
  align-items: center;
  background: #fff;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 16px;
  margin-right: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.google-sign-in-btn:hover {
  background: #e2e1e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.google-logo {
  width: 20px;
  height: 20px;
  margin-right: 10px;
}

.userbar {
  position: relative;
  margin-left: 0;
  padding-left: 0;
  display: flex;
  align-items: center;
}

/* 移动端优化 */
@media (max-width:768px) {
  .google-sign-in-btn {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .google-logo {
    width: 18px;
    height: 18px;
    margin-right: 8px;
  }
}

/*-----avatar-----*/
.avatar-wrapper {
  cursor: pointer;
  width: 55px;
  height: 55px;
  margin-right: 10px;
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  grid-area: 1/1;
  margin: 0;
  align-self: center;
  justify-self: center;
}

.avatar-wrapper:hover {
  background: #323344;
}

/* 下拉面板 */
.dropdown-panel {
  position: absolute;
  top: 52px;
  right: 15px;
  width: 200px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s;
  pointer-events: none;
  z-index: 100;
  display: none;
}

.dropdown-panel a {
  color: #333;
}

.dropdown-panel a:hover {
  display: block;
  color: #fff;
  background: #EE4222;
}

.user-menu.active .dropdown-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  display: block;
}

/* 菜单列表 */
.user-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  line-height: 46px;
}

.user-info {
  display: flex;
  align-items: center;
  padding: 10px 16px;
}

.nickname {
  margin-left: 12px;
  color: #333;
  font-weight: 500;
}

/* 菜单项 */
.menu-item {
  width: 100%;
  background: transparent;
  border: none;
  color: #333;
  text-align: left;
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background 0.2s;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.menu-item .icon {
  margin-right: 8px;
}

.divider {
  height: 1px;
  background: #ddd;
  margin: 8px 0;
}

.menu-list {
  padding-left: 20px;
  padding-top: 10px;
}

/*----------end google account--------*/

footer {
  text-align: center;
  font-size: 12px;
  width: 100%;
  margin: 0;
  padding: 10px 0;
  background-color: #1F2030;
  color: #fff;
}

footer span {
  display: block;
}

footer a {
  color: #fff;
}

footer a:hover {
  color: #fa8f03;
}

footer img {
  width: 16px;
  height: 16px;
  margin: 10px 10px 0 0;
}


/*-------------------nav top------------------*/
.nav-categories {
  box-shadow: 0 4px 12px 0 rgba(37, 37, 37, 0.3);
  padding: 5px;
  white-space: nowrap;
  display: flex;
}

.nav-categories .gamecard {
  margin: 0;
  border-radius: 10px;
  background-color: transparent;
}

.nav-categories a {
  color: #fff;
}

.nav-logo ul {
  display: flex;
  list-style-type: none;
  margin: 10px;
  padding: 0;
  max-height: 1lh;
  line-height: 40px;
  gap: 10px
}

.nav-logo li:nth-of-type(1) {
  background-color: #39a706;
  border-radius: 15px;
  padding: 0 16px;
}

.list-categories {
  list-style-type: none;
  margin: 10px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: 1lh;
  overflow: hidden;
  line-height: 40px;
}

.list-categories li {
  text-align: center;
  padding: 0 16px;
  border-radius: 15px;
}

.list-categories li {
  background-color: #7d03ba;
}

.list-categories li:hover,
.nav-logo li:nth-of-type(1):hover {
  background-color: #EE4222;
  font-weight: bold;
}

/*--------------------aboutindex-------------------*/
.aboutindex {
  background: #c5d8e5;
  margin: 10px;
  padding: 10px;
  border-radius: 10px;
}

.aboutindex h2 {
  font-size: 14px;
}

i {
  padding-right: 2px;
  color: #b34902;
}

/*====================gameinfo page====================*/
.container {
  display: flex;
  gap: 10px;
  margin: 0 auto;
  padding: 10px;
}

.col-m {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gametit {
  background-color: #03adb3;
  font-weight: bold;
  font-size: 18pt;
  color: #fff;
  line-height: 50px;
  border-radius: 10px;
  text-align: center;
}

.game-area {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.bg-blur {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  filter: blur(20px);
  z-index: 1;
}

.game-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
}

.gameicon img {
  width: 240px;
  height: 240px;
  border-radius: 20px;
  border: 3px solid #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/*=====================gameinfo========================*/
.gameinfo {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: auto auto auto auto;
  gap: 10px;
  position: relative;
}

.info-comm {
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: relative;
  background: #fff;
}

.info-comm h3 {
  background-color: #f8f8f8;
  color: #333;
  padding: 10px;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.info-comm p {
  padding: 0 5px;
  color: #666;
  font-size: 1.2rem;
  font-weight: normal;
}

.info-instructions {
  grid-column: 1 / -1;
  grid-row: 1;
}

.info-description {
  grid-column: 1 / -1;
  grid-row: 3;
}

.info-agegroup {
  grid-column: 1 / 4;
  grid-row: 2;
  display: flex;
  flex-direction: column;
}

.info-gender {
  grid-column: 4 / 7;
  grid-row: 2;
  display: flex;
  flex-direction: column;
}

.info-genres {
  grid-column: 1 / 3;
  grid-row: 4;
  display: flex;
  flex-direction: column;
}

.info-tags {
  grid-column: 3 / 7;
  grid-row: 4;
  display: flex;
  flex-direction: column;
}

.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px;
}

.tag-group span {
  background-color: #f0f0f0;
  padding: 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.tag-group span:nth-child(6n+1) { background-color: #FF9AA2; color: #c02734; }
.tag-group span:nth-child(6n+2) { background-color: #8bc0f1; color: #2368a8;}
.tag-group span:nth-child(6n+3) { background-color: #FFDAC1; color: #ad612e;}
.tag-group span:nth-child(6n+4) { background-color: #E2F0CB; color: #6f9b29;}
.tag-group span:nth-child(6n+5) { background-color: #B5EAD7; color: #289e73;}
.tag-group span:nth-child(6n+6) { background-color: #e8f0b9; color: #899b24;}

@media (max-width: 768px) {
  .gameinfo {
    grid-template-columns: 1fr;
  }

  .info-instructions,
  .info-description,
  .info-agegroup,
  .info-gender,
  .info-genres,
  .info-tags {
    grid-column: 1;
  }

  .info-agegroup {
    grid-row: 2;
  }

  .info-gender {
    grid-row: 4;
  }

  .info-genres {
    grid-row: 5;
  }

  .info-tags {
    grid-row: 6;
  }
}

.col-l,
.col-r {
  flex: 1;
}

.section-title {
  font-size: 18px;
  color: #333;
  font-weight: bold;
  background: #ddd;
  text-align: center;
  margin: 0 auto;
  border-radius: 10px 10px 0 0;
  line-height: 35px;
}

/* 左侧游戏卡片样式 - 精准对齐方案 */
.col-l .game-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: #EDE7F0;
  border-radius: 0 0 10px 10px;
  padding: 5px 0;
}

.col-l .game-card {
  display: flex;
  gap: 15px;
  padding: 10px;
  border-radius: 8px;
  background: #f8f9fa;
  transition: all 0.3s ease;
  position: relative;
}

.col-l .game-card:hover {
  background: #e9ecef;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 游戏图片容器 */
.col-l .game-thumb-container {
  position: relative;
  width: 100px;
  height: 100px;
}

.col-l .game-thumb {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
}

/* 精准对齐的游戏信息区域 */
.col-l .game-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100px;
}

/* 标题区域 - 顶部对齐 */
.col-l .game-title-wrapper {
  margin-top: 0;
  padding-top: 0;
}

.col-l .game-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0;
  padding: 0;
  line-height: 1.3;
}

/* 标签区域 - 底部对齐 */
.col-l .game-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: auto;
}

.col-l .game-tags span {
  background: #e9e9e9;
  color: #333;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}


/* 右侧游戏卡片样式 */
.col-r .game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background-color: #EDE7F0;
  border-radius: 0 0 10px 10px;
  padding: 5px;
}

.col-r .game-card-small {
  background: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

.col-r .game-card-small:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.col-r .game-thumb {
  width: 100%;
  height: 90px;
  border-radius: 8px 8px 0 0;
  object-fit: cover;
}

.col-r .game-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0 0 5px 5px;
}

.col-r .game-tags {
  display: flex;
  gap:4px;
  margin-left: 5px;
  margin-top: auto;
  flex-wrap: nowrap;
  overflow: hidden;
}

.col-r .game-tags span {
  background: #e9e9e9;
  color: #333;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}

/* 独家游戏标签样式 */
.game-thumb-container {
  position: relative;
  flex-shrink: 0;
}


/*==================Play Button Styles=================*/
.play-btn {
  --primary: #e63c09;
  --accent: #e73eec;
  padding: 12px 60px;
  font: 900 28px/1.2 system-ui;
  letter-spacing: 0.05em;
  color: white;
  text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition:
    transform 0.2s ease,
    filter 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(248, 244, 4, 0.3);
  border: 2px solid transparent;
}

.play-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(243, 227, 5, 0.8);
  filter: brightness(1.05);
}

.play-btn:active {
  transform: scale(0.96);
  filter: brightness(1.1) contrast(1.2);
}

@media (max-width: 1024px) {
  .container {
    flex-direction: column;
  }

  .col-l,
  .col-r {
    min-height: auto;
  }

  .game-area {
    height: 350px;
  }

  .col-l,
  .col-r {
    display: none;
  }
}

@media (max-width: 768px) {
  .game-area {
    height: 300px;
  }

  .gameicon img {
    width: 100px;
    height: 100px;
  }

  .play-btn {
    padding: 10px 50px;
    font-size: 24px;
  }

  .col-l,
  .col-r {
    display: none;
  }
}

@media (max-width: 480px) {
  .game-area {
    height: 250px;
  }

  .gametit {
    font-size: 16px;
  }

  .gameicon img {
    width: 80px;
    height: 80px;
  }

  .gameinfo {
    font-size: 16px;
    padding: 10px;
  }

  .play-btn {
    padding: 8px 40px;
    font-size: 20px;
  }
}

/*====================single pages====================*/
.single-container {
  background: #ede7f0;
  margin: 0 10px;
  border-radius: 10px;
}

.single-container p {
  padding: 10px;
  font-size: 18px;
  font-weight: normal;
}

.single-title {
  background: #ddd;
  border-radius: 10px 10px 0 0;
  padding-left: 10px;
  font-size: 20px;
  line-height: 45px;
}

/*==============cj ad==================*/
.cjadtxt1 {
  padding: 10px 10px 0 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cjadtxt1 a {
  display: inline-block;
  white-space: nowrap;
  border-radius: 20px;
  padding: 10px;
  margin-bottom: 10px;
  color: #fff;
}

.cjadtxt1 a:nth-child(1) { background: #03adb3; } 
.cjadtxt1 a:nth-child(3) { background: #ff6b6b; } 
.cjadtxt1 a:nth-child(5) { background: #51cf66; } 
.cjadtxt1 a:nth-child(7) { background: #c49814; } 
.cjadtxt1 a:nth-child(9) { background: #66ccb3; } 
.cjadtxt1 a:nth-child(11) { background: #345785; } 
.cjadtxt1 a:nth-child(13) { background: #97a518; } 
.cjadtxt1 a:nth-child(15) { background: #5574ca; } 
.cjadtxt1 a:nth-child(17) { background: #a119fc; } 
.cjadtxt1 a:nth-child(19) { background: #fc19a5; } 
.cjadtxt1 a:nth-child(21) { background: #fc9a19; } 
.cjadtxt1 a:nth-child(23) { background: #da6ead; } 
.cjadtxt1 a:nth-child(25) { background: #19e1fc; } 

.cjadtxt1 a:hover {
  font-weight: bold;
}

.cjadtxt2{
  padding:10px;
}

.cjadimg {
  padding: 10px 0 5px 0;
}

.cjadimg img {
  border-radius: 10px;
  width: 300px;
  height: 250px;
  margin-left: 10px;
}

/*==================YouTube模块样式==================*/
.youtube-home-section {
    margin: 25px 10px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.youtube-title-container {
    padding: 20px 20px 0;
    text-align: center;
}

#youtube-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: bold;
    margin: 0;
    display: inline-block;
    position: relative;
}

#youtube-title i {
    color: #ff0000;
    margin-right: 10px;
}

.youtube-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 15px;
    padding: 20px;
}

.youtube-video-card {
    background: #333333;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.youtube-video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.video-thumbnail-container {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    background: #000;
}

.video-thumbnail-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.youtube-video-card:hover .video-thumbnail-container img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
}

.youtube-video-card:hover .play-overlay {
    opacity: 1;
    background: rgba(255, 0, 0, 0.7);
}

.play-overlay i {
    color: white;
    font-size: 20px;
    margin-left: 3px;
}

.video-info {
    padding: 12px;
}

.video-title {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 5px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-date {
    color: #aaaaaa;
    font-size: 12px;
    margin: 0;
}

.youtube-channel-link {
    text-align: center;
    padding: 0 20px 20px;
}

.youtube-channel-link a {
    display: inline-block;
    padding: 10px 24px;
    background: #ff0000;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.youtube-channel-link a:hover {
    background: #cc0000;
}

.youtube-channel-link a i {
    margin-right: 8px;
}

/* 降级内容样式 - 优化显示 */
.youtube-fallback {
    padding: 30px 20px;
    text-align: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%);
    border-radius: 8px;
    color: white;
}

.youtube-fallback .channel-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 3px solid #FF0000;
}

.youtube-fallback h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: bold;
    color: white;
}

.youtube-fallback p {
    margin: 0 0 20px 0;
    color: #cccccc;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.youtube-fallback a {
    display: inline-block;
    padding: 12px 24px;
    background: #FF0000;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s ease;
    margin-top: 15px;
}

.youtube-fallback a:hover {
    background: #cc0000;
}

/* 加载状态样式 */
.youtube-widget-loading {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 8px;
    padding: 20px;
}

.youtube-widget-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid #333;
    border-top-color: #ff0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 加载占位符样式 */
#youtube-home-widget {
    min-height: 200px;
    transition: all 0.3s ease;
}

/* 错误状态样式 - 确保优雅降级 */
#youtube-home-widget .error-message {
    color: #f44336;
    text-align: center;
    padding: 20px;
    background: rgba(244, 67, 54, 0.1);
    border-radius: 4px;
    margin: 10px;
}

/* Responsive adjustments for YouTube module */
@media (max-width: 768px) {
    .youtube-home-section {
        margin: 25px 5px;
    }
    
    #youtube-title {
        font-size: 20px;
    }
    
    .youtube-videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
        padding: 15px;
    }
    
    .video-thumbnail-container {
        padding-top: 60%; /* Slightly taller for mobile */
    }
    
    .video-info {
        padding: 10px;
    }
    
    .video-title {
        font-size: 13px;
    }
    
    .video-date {
        font-size: 11px;
    }
    
    .play-overlay {
        width: 40px;
        height: 40px;
    }
    
    .play-overlay i {
        font-size: 16px;
    }
    
    .youtube-fallback {
        padding: 20px 15px;
    }
    
    .youtube-fallback .channel-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
    
    .youtube-fallback h3 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .youtube-videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }
    
    #youtube-title {
        font-size: 18px;
    }
    
    .youtube-channel-link a {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .youtube-fallback h3 {
        font-size: 16px;
    }
    
    .youtube-fallback a {
        padding: 10px 20px;
        font-size: 14px;
    }
}