/* Page: detail */

.main { margin-top: 100px; padding: 40px 0; }

.game-detail, .comments-section, .similar-games {
    background: var(--gray);
    border: 2px solid var(--border);
    border-radius: 25px;
    padding: 50px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.game-header { display: grid; grid-template-columns: 1fr 2fr; gap: 50px; margin-bottom: 50px; position: relative; z-index: 1; }

.game-image { width: 100%; height: 400px; background: linear-gradient(135deg, var(--darker), var(--gray)); border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 8rem; color: var(--text-muted); position: relative; overflow: hidden; border: 2px solid var(--border); }
.game-badge { position: absolute; top: 20px; right: 20px; background: var(--secondary); color: var(--text); padding: 8px 20px; border-radius: 25px; font-size: .9rem; font-weight: 700; box-shadow: var(--glow-pink); }

.game-info h1 { font-size: 4rem; font-weight: 900; margin-bottom: 20px; background: linear-gradient(45deg, var(--primary), var(--accent)); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.game-rating { display: flex; align-items: center; gap: 20px; margin-bottom: 30px; }
.rating-stars { color: var(--accent); font-size: 2rem; }
.rating-text { font-size: 1.5rem; font-weight: 700; }
.rating-count { color: var(--text-muted); font-size: 1rem; }
.game-category { background: var(--light-gray); color: var(--primary); padding: 10px 25px; border-radius: 25px; display: inline-block; margin-bottom: 30px; font-weight: 700; border: 2px solid var(--primary); }
.game-description { 
  font-size: 1.2rem; 
  line-height: 1.8; 
  color: var(--text-muted); 
  /* margin-bottom: 40px; */
  max-height: 200px;
  overflow: hidden;
  position: relative;
  transition: max-height 0.3s ease;
}

.game-description.expanded {
  max-height: none;
}

.game-description::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(transparent, var(--gray));
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.game-description.expanded::after {
  opacity: 0;
}

/* Back Button */
.back-btn {
  background: var(--gray);
  color: var(--text);
  border: 2px solid var(--border);
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.back-btn:hover {
  background: var(--primary);
  color: var(--dark);
  border-color: var(--primary);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

/* Expand Button */
.expand-btn {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  margin: 15px auto 50px;
  transition: all 0.3s ease;
  display: inline-block;
}

.expand-btn:hover {
  background: var(--primary);
  color: var(--dark);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

.game-actions { display: flex; gap: 20px; flex-wrap: wrap; }
.btn { padding: 15px 30px; border: 0; border-radius: 25px; font-weight: 700; text-decoration: none; transition: all .3s ease; cursor: pointer; font-size: 1rem; display: inline-flex; align-items: center; gap: 10px; position: relative; overflow: hidden; }
.btn-primary { background: linear-gradient(45deg, var(--primary), var(--accent)); color: var(--dark); box-shadow: var(--glow); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(0,255,136,.4); }

/* Features */
.game-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-bottom: 50px; position: relative; z-index: 1; }
.feature-card { background: var(--light-gray); padding: 30px; border-radius: 20px; text-align: center; transition: all .3s ease; border: 2px solid var(--border); }
.feature-card:hover { transform: translateY(-10px); border-color: var(--primary); box-shadow: var(--glow); }
.feature-icon { font-size: 3rem; margin-bottom: 20px; display: block; }
.feature-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 15px; }
.feature-desc { color: var(--text-muted); line-height: 1.6; }

/* Comments */
.comment-form { background: var(--light-gray); padding: 40px; border-radius: 20px; margin-bottom: 40px; position: relative; z-index: 1; }
.form-group { margin-bottom: 25px; }
.form-group label { display: block; margin-bottom: 10px; font-weight: 700; }
.form-group input, .form-group textarea { width: 100%; padding: 15px; background: var(--darker); border: 2px solid var(--border); border-radius: 15px; color: var(--text); font-size: 1rem; transition: all .3s ease; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--glow); }
.form-group textarea { height: 120px; resize: vertical; }
.rating-input { display: flex; align-items: center; gap: 20px; }
.star-rating { display: flex; gap: 5px; }
.star-rating input[type="radio"] { display: none; }
.star-rating label { font-size: 2rem; color: var(--border); cursor: pointer; transition: color .3s ease; }
.star-rating input[type="radio"]:checked ~ label, .star-rating label:hover { color: var(--accent); }
.submit-btn { background: linear-gradient(45deg, var(--primary), var(--accent)); color: var(--dark); border: none; padding: 15px 30px; border-radius: 15px; cursor: pointer; font-weight: 700; font-size: 1.1rem; transition: all .3s ease; box-shadow: var(--glow); }
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,255,136,.4); }
.comments-list { margin-top: 40px; position: relative; z-index: 1; }
.comment { background: var(--light-gray); border: 2px solid var(--border); border-radius: 15px; padding: 25px; margin-bottom: 20px; transition: all .3s ease; }
.comment:hover { border-color: var(--primary); box-shadow: var(--glow); }
.comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.comment-author { font-weight: 700; font-size: 1.1rem; }
.comment-rating { color: var(--accent); font-size: 1rem; }
.comment-date { color: var(--text-muted); font-size: .9rem; }
.comment-text { color: var(--text-muted); line-height: 1.6; font-size: 1rem; }

/* Similar games */
.similar-games h2, .comments-section h2 { font-size: 2.5rem; font-weight: 900; margin-bottom: 40px; background: linear-gradient(45deg, var(--primary), var(--accent)); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; position: relative; z-index: 1; }
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; position: relative; z-index: 1; }
.game-card { background: var(--light-gray); border: 2px solid var(--border); border-radius: 20px; overflow: hidden; transition: all .3s ease; }
.game-card:hover { transform: translateY(-10px); border-color: var(--primary); box-shadow: var(--glow); }
.game-card-image { 
  width: 100%; 
  height: 150px; 
  background: linear-gradient(135deg, var(--darker), var(--gray)); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 3rem; 
  color: var(--text-muted);
  overflow: hidden;
}

.game-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.game-card-info { padding: 25px; }
.game-card-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; }
.game-card-rating { color: var(--accent); font-size: 1rem; font-weight: 700; }

@media (max-width: 768px) {
  .main { 
    margin-top: 100px; 
    padding: 20px 0; 
  }
  
  .game-detail, .comments-section, .similar-games {
    padding: 30px 20px;
    margin-bottom: 30px;
  }
  
  .game-header { 
    grid-template-columns: 1fr; 
    gap: 30px;
    margin-bottom: 30px;
  }
  
  .game-image {
    height: 250px;
    font-size: 4rem;
  }
  
  .game-info h1 {
    font-size: 2.5rem;
    text-align: center;
  }
  
  .game-rating {
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .game-category {
    display: block;
    text-align: center;
    margin: 0 auto 30px;
  }
  
  .game-description {
    font-size: 1rem;
    text-align: center;
    max-height: 150px;
  }
  
  .back-btn {
    font-size: 0.8rem;
    padding: 8px 15px;
  }
  
  .expand-btn {
    display: block;
    margin: 15px auto 50px;
    padding: 10px 25px;
    font-size: 0.9rem;
    text-align: center;
  }
  
  .game-actions { 
    flex-direction: column; 
    gap: 15px;
  }
  
  .game-actions .btn { 
    width: 100%; 
    justify-content: center; 
    padding: 12px 20px;
  }
  
  .game-features {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .feature-card {
    padding: 20px;
  }
  
  .comment-form {
    padding: 20px;
  }
  
  .games-grid { 
    grid-template-columns: 1fr; 
  }
  
  .similar-games h2, .comments-section h2 {
    font-size: 2rem;
    text-align: center;
  }
}

/* New Detail Design Styles */
.detail-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.detail-hero .container {
    position: relative;
    z-index: 1;
    padding: 4rem 0;
}
.hero-bg {
    position: absolute;
    inset: 0;
}
.hero-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, .45), rgba(15, 23, 42, .7));
}
.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) saturate(1.1);
    transform: scale(1.08);
}
.hero-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.hero-cover {
    flex: 0 0 220px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
    border: 1px solid rgba(255, 255, 255, .2);
}
.hero-cover img {
    width: 220px;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
}
.hero-text {
    color: #fff;
    max-width: 760px;
}
.hero-text h1 {
    margin: 0 0 .5rem;
    font-size: 2.25rem;
    line-height: 1.2;
}
.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    opacity: .95;
    margin-bottom: .75rem;
}
.badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .25);
}
.badge--primary {
    background: linear-gradient(135deg, var(--primary, #7c3aed), var(--secondary, #ec4899));
    border: none;
}

.detail-body {
    padding: 2rem 0;
}
.detail-grid {
    display: grid;
    grid-template-columns: 1.3fr .7fr;
    gap: 2rem;
}
.card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
}
.card .card-inner {
    padding: 24px;
}
.prose p {
    color: #334155;
    line-height: 1.8;
}
.section-title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    color: #0f172a;
}
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.media-grid img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

.sidebar {
    position: relative;
}
@media (min-width: 1024px) {
    .sidebar {
        position: sticky;
        top: 100px;
    }
}
.info-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}
.info-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #475569;
}
.cta-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .9rem 1.25rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary, #7c3aed), var(--secondary, #ec4899));
    color: #fff;
}
.btn-outline {
    background: #fff;
    border: 2px solid var(--primary, #7c3aed);
    color: var(--primary, #7c3aed);
}

/* More Games Section */
.more-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.more-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.more-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
}
.more-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}
.more-card .meta {
    padding: 10px;
}
.more-card .title {
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.more-card .actions {
    display: flex;
    gap: 8px;
    flex-direction: column;
}
.more-card .actions .btn-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .6rem .8rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.875rem;
    background: linear-gradient(135deg, var(--primary, #7c3aed), var(--secondary, #ec4899));
    color: #fff;
    transition: transform 0.2s ease;
}
.more-card .actions .btn-start:hover {
    transform: translateY(-2px);
}
.more-card .actions .btn-explore {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .6rem .8rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.875rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: var(--primary, #7c3aed);
    transition: all 0.2s ease;
}
.more-card .actions .btn-explore:hover {
    border-color: var(--primary, #7c3aed);
    background: #f8fafc;
}

.hero-actions-mobile {
    display: none;
}
.btn-mobile {
    width: 100%;
    max-width: 300px;
}

@media (max-width: 1023.98px) {
    .hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .hero-text {
        max-width: 100%;
    }
    .hero-meta {
        justify-content: center;
    }
    .hero-cover {
        flex: 0 0 auto;
    }
    .hero-cover img {
        width: 160px;
    }
    .hero-actions-mobile {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-top: 1.5rem;
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
    .media-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .cta-stack {
        align-items: stretch;
    }
    .more-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    /* 确保移动端侧边栏按钮也可见 */
    .sidebar {
        order: -1;
        margin-bottom: 2rem;
    }
}



