/* 游戏详情页专属样式 - 补充版 */
.game-detail-container {
  padding: 2rem 0;
  max-width: 1200px;
  margin: 0 auto;
}

/* 游戏标题区域 */
.game-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.game-header .game-title {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: center;
  font-size: 0.95rem;
}

.game-rating {
  color: #f59e0b;
  font-weight: 600;
}

.game-views {
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* 游戏内容区 */
.game-content {
  display: grid;
  gap: 3rem;
  margin-bottom: 4rem;
}

/* 游戏嵌入容器 */
.game-player-container {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 
              0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.game-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 比例 */
  height: 0;
  background: #f1f5f9;
}

.game-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: url('/static/images/loading.gif') center no-repeat;
}

/* 游戏控制按钮 */
.game-controls {
  display: flex;
  gap: 1rem;
  padding: 1.2rem;
  background: var(--background);
  border-top: 1px solid #e2e8f0;
}

.game-controls button {
  padding: 0.8rem 1.8rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.game-controls button:hover {
  transform: translateY(-2px);
}

.game-controls .fullscreen-btn {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
}

.game-controls .fullscreen-btn:hover {
  background: #4338ca;
}

.game-controls .refresh-btn {
  background: var(--surface);
  border: 1px solid var(--secondary);
  color: var(--text-primary);
}

.game-controls .refresh-btn:hover {
  background: #f1f5f9;
}

/* 游戏信息区 */
.game-info {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3rem;
  align-items: start;
}

.game-thumbnail {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.game-thumbnail:hover {
  transform: scale(1.02);
}

.game-description {
  line-height: 1.7;
  color: var(--text-primary);
}

.game-description h3 {
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
  color: var(--text-primary);
}

.game-description p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

/* 游戏数据统计 */
.game-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
}

.stat-item {
  background: var(--background);
  padding: 1.2rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.stat-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.2rem;
}

/* 类似游戏 */
.similar-games {
  margin: 4rem 0;
}

.similar-games h2 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

/* 评论区域增强 */
.comments-section {
  margin: 3rem 0;
  background: var(--surface);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.comments-section h2 {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

.comment-form {
  display: grid;
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}

.comment-input {
  padding: 0.9rem 1.2rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.comment-input:focus {
  outline: none;
  border-color: var(--secondary);
}

.comment-submit-btn {
  background: var(--primary);
  color: white;
  padding: 0.9rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s;
  max-width: 220px;
}

.comment-submit-btn:hover {
  background: #4338ca;
  transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .game-info {
    grid-template-columns: 280px 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .game-header .game-title {
    font-size: 1.8rem;
  }
  
  .game-info {
    grid-template-columns: 1fr;
  }
  
  .game-embed {
    padding-bottom: 75%; /* 更适合移动端的比例 */
  }
  
  .game-controls {
    flex-direction: column;
  }
  
  .game-controls button {
    width: 100%;
  }
  
  .game-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .game-header .game-title {
    font-size: 1.6rem;
  }
  
  .game-meta {
    gap: 0.8rem;
    font-size: 0.85rem;
  }
  
  .game-stats {
    grid-template-columns: 1fr;
  }
  
  .comments-section {
    padding: 1.5rem;
  }
  
  .comment-submit-btn {
    max-width: 100%;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.game-detail-container > * {
  animation: fadeIn 0.5s ease forwards;
}

.game-detail-container > *:nth-child(1) { animation-delay: 0.1s; }
.game-detail-container > *:nth-child(2) { animation-delay: 0.2s; }
.game-detail-container > *:nth-child(3) { animation-delay: 0.3s; }
.game-detail-container > *:nth-child(4) { animation-delay: 0.4s; }

/* 加载状态 */
.loading-placeholder {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 8px;
  min-height: 20px;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


          /* 评论系统样式 */
.comment-form-container {
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.comment-form-container h3,
.comments-list-container h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.submit-btn {
    background: var(--primary);
    color: white;
    padding: 0.8rem 1.8rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.submit-btn:hover {
    background: #4338ca;
    transform: translateY(-2px);
}

.submit-btn:disabled {
    background: #a5b4fc;
    cursor: not-allowed;
}

/* 评分样式 */
.rating-group {
    margin-bottom: 2rem;
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 1.8rem;
    color: #e2e8f0;
    cursor: pointer;
    transition: color 0.2s;
    margin-right: 5px;
}

.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #f59e0b;
}

.star-rating input:checked + label {
    color: #f59e0b;
}

/* 评论列表 */
.comments-list-container {
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.comment-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
}

.comment-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.comment-rating {
    color: #f59e0b;
    font-weight: 600;
}

.comment-content {
    line-height: 1.6;
    color: var(--text-primary);
    margin-right: 80px; /* 为删除按钮留空间 */
}

.delete-comment {
    position: absolute;
    right: 0;
    top: 1.5rem;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.delete-comment:hover {
    background: #dc2626;
    color: white;
}

.loading, .no-comments, .error {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .comment-form-container,
    .comments-list-container {
        padding: 1.5rem;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .comment-content {
        margin-right: 0;
    }
    
    .delete-comment {
        position: static;
        margin-top: 1rem;
        display: inline-block;
    }
    
}
/* 评论列表容器 */
.comments-list-container {
    margin-top: 3rem;
    background: var(--surface);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.comments-list-container h3 {
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    position: relative;
}

.comments-list-container h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 80px;
    height: 2px;
    background: var(--primary);
}

/* 单个评论项 */
.comment-item {
    padding: 1.8rem;
    margin-bottom: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    border: 1px solid rgba(99, 102, 241, 0.1);
    position: relative;
    overflow: hidden;
}

.comment-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}

.comment-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
}

/* 评论头部 */
.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.comment-author::before {
    content: '👤';
    margin-right: 8px;
    opacity: 0.7;
}

.comment-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.comment-date::before {
    content: '🕒';
    margin-right: 6px;
    opacity: 0.7;
}

/* 评论评分 */
.comment-rating {
    color: #f59e0b;
    font-weight: 700;
    background: rgba(245, 158, 11, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
}

.comment-rating::before {
    content: '★';
    margin-right: 4px;
}

/* 评论内容 */
.comment-content {
    line-height: 1.7;
    color: var(--text-primary);
    padding-left: 1.5rem;
    border-left: 2px dashed rgba(99, 102, 241, 0.2);
    margin-left: 0.5rem;
    position: relative;
}

.comment-content::before {
    content: '❝';
    position: absolute;
    left: -0.5rem;
    top: -0.8rem;
    font-size: 2rem;
    color: rgba(99, 102, 241, 0.2);
    line-height: 1;
}

/* 空状态和加载状态 */
.loading, .no-comments, .error {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    background: rgba(241, 245, 249, 0.5);
    border-radius: 8px;
    border: 1px dashed #e2e8f0;
}

.no-comments::before {
    content: '💬';
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* 删除按钮 */
.delete-comment {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s;
    font-size: 1.1rem;
    padding: 0.5rem;
}

.delete-comment:hover {
    opacity: 1;
    transform: scale(1.1);
}

.delete-comment::before {
    content: '🗑️';
}

/* 响应式设计 */
@media (max-width: 768px) {
    .comments-list-container {
        padding: 1.5rem;
    }
    
    .comment-item {
        padding: 1.5rem 1rem 1.5rem 1.2rem;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .comment-content {
        padding-left: 1rem;
        margin-left: 0.3rem;
    }
    
    .delete-comment {
        position: static;
        display: inline-block;
        margin-top: 1rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.comment-item {
    animation: fadeIn 0.4s ease forwards;
    opacity: 0;
}

.comment-item:nth-child(1) { animation-delay: 0.1s; }
.comment-item:nth-child(2) { animation-delay: 0.2s; }
.comment-item:nth-child(3) { animation-delay: 0.3s; }
.comment-item:nth-child(4) { animation-delay: 0.4s; }
.comment-item:nth-child(5) { animation-delay: 0.5s; }