/* =========================================
   AnimeGamesHub - Game Detail Stylesheet
   Styles specific to the game detail page
   ========================================= */

/* === Breadcrumbs === */
.breadcrumbs {
    padding: 15px 0;
    background: rgba(10, 10, 26, 0.5);
    border-bottom: 1px solid var(--glass-border);
}

.breadcrumbs ul {
    display: flex;
    list-style: none;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumbs li {
    position: relative;
    padding-right: 25px;
    margin-right: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.breadcrumbs li:not(:last-child)::after {
    content: '›';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

.breadcrumbs li:last-child {
    color: var(--primary);
    padding-right: 0;
    margin-right: 0;
}

.breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--secondary);
}

/* === Game Detail Section === */
.game-detail-section {
    padding: 40px 0 60px;
}

.game-detail-wrapper {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.game-info-column {
    flex: 0 0 35%;
}

.game-frame-column {
    flex: 0 0 65%;
}

.game-detail-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    line-height: 1.2;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.game-category-badge {
    background: var(--gradient-pink-purple);
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
}

.game-rating {
    display: flex;
    align-items: center;
}

.game-plays {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
}

.game-plays svg {
    color: var(--accent);
}

.game-cover {
    margin-bottom: 25px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    border: 2px solid transparent;
    background: 
        linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
        var(--gradient-pink-purple) border-box;
}

.game-description {
    margin-bottom: 25px;
}

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

.game-controls {
    margin-bottom: 25px;
}

.controls-section {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid var(--card-border);
}

.controls-section h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.controls-section ul {
    list-style: none;
    color: var(--text-secondary);
}

.controls-section li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.controls-section li::before {
    content: '•';
    color: var(--secondary);
    margin-right: 8px;
}

.social-share h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    transition: all var(--transition-fast) ease;
    width: 100%;
}

.twitter {
    background: #1DA1F2;
}

.facebook {
    background: #4267B2;
}

.tiktok {
    background: #000000;
    background: linear-gradient(90deg, #25F4EE, #FE2C55, #000000);
}

.share-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* === Game Frame === */
.game-frame-wrapper {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 25px;
}

.game-frame-header {
    padding: 10px;
    display: flex;
    justify-content: flex-end;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--card-border);
}

.fullscreen-button {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-fast) ease;
}

.fullscreen-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.game-frame-container {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(66, 211, 255, 0.3);
    border: 1px solid rgba(66, 211, 255, 0.3);
    aspect-ratio: 16 / 9;
    background-color: rgba(10, 10, 25, 0.8);
    transition: all 0.3s ease;
}

.game-frame-container:hover {
    box-shadow: 0 0 30px rgba(255, 66, 176, 0.4);
    border-color: rgba(255, 66, 176, 0.4);
}

.game-frame-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
    display: flex;
    gap: 10px;
}

.fullscreen-button {
    background-color: rgba(10, 10, 25, 0.7);
    border: 1px solid rgba(66, 211, 255, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #42D3FF;
    transition: all 0.2s ease;
}

.fullscreen-button:hover {
    background-color: rgba(66, 211, 255, 0.2);
    color: #fff;
    transform: scale(1.1);
}

#gameFrame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background-color: #000;
    z-index: 5;
}

.game-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(10, 10, 20, 0.85);
    backdrop-filter: blur(5px);
    z-index: 10;
    border-radius: 8px;
}

.loading-spinner {
    margin-bottom: 20px;
    position: relative;
}

.spinner-ring {
    display: inline-block;
    width: 80px;
    height: 80px;
    border: 3px solid transparent;
    border-top-color: #FF42B0;
    border-radius: 50%;
    animation: loading-spinner 1.5s linear infinite;
    position: relative;
}

.spinner-ring:before, .spinner-ring:after {
    content: '';
    position: absolute;
    border: 3px solid transparent;
    border-radius: 50%;
}

.spinner-ring:before {
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-top-color: #42D3FF;
    animation: loading-spinner 2s linear infinite;
}

.spinner-ring:after {
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border-top-color: #FF42B0;
    animation: loading-spinner 1.5s linear infinite;
}

@keyframes loading-spinner {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-tips {
    max-width: 80%;
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    padding: 12px;
    background-color: rgba(66, 211, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(66, 211, 255, 0.3);
}

#loadingProgressText {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-align: center;
    margin-top: 20px;
    text-shadow: 0 0 10px rgba(66, 211, 255, 0.8);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.7;
    }
}

.game-loaded-notification {
    animation: slide-in 0.3s ease forwards;
}

@keyframes slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.game-frame-footer {
    padding: 15px;
    display: flex;
    gap: 15px;
}

.like-button, .favorite-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid transparent;
    padding: 8px 15px;
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 500;
    transition: all var(--transition-fast) ease;
}

.like-button:hover {
    background: rgba(255, 0, 89, 0.2);
    border-color: rgba(255, 0, 89, 0.5);
}

.favorite-button:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
}

.like-button.active {
    background: rgba(255, 0, 89, 0.2);
    border-color: rgba(255, 0, 89, 0.5);
    color: #ff0059;
}

.favorite-button.active {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
    color: #ffd700;
}

/* === Rate Game === */
.rate-game {
    padding: 20px;
    margin-bottom: 25px;
}

.rate-game h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    text-align: center;
}

.rating-stars {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    gap: 10px;
}

.star {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all var(--transition-fast) ease;
}

.star:hover, .star.active {
    color: #f5c518;
}

.rate-game textarea {
    width: 100%;
    height: 100px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 10px;
    color: var(--text-primary);
    font-family: 'Zen Maru Gothic', sans-serif;
    resize: none;
    margin-bottom: 15px;
}

.rate-game textarea::placeholder {
    color: var(--text-muted);
}

.submit-rating {
    background: var(--gradient-pink-purple);
    color: white;
    border: none;
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    transition: all var(--transition-fast) ease;
}

.submit-rating:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 0, 255, 0.3);
}

/* === Game Comments === */
.game-comments {
    padding: 30px;
    margin-bottom: 40px;
}

.game-comments h2 {
    margin-bottom: 20px;
    text-align: center;
}

.no-comments {
    text-align: center;
    color: var(--text-muted);
    padding: 30px 0;
}

.comments-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid var(--glass-border);
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    border: 2px solid var(--primary);
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-meta {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 5px;
}

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

.comment-rating .stars {
    font-size: 0.9rem;
}

.comment-body {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* === Related Games Section === */
.related-games-section {
    padding: 40px 0 60px;
}

.related-games {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* === 通知样式 === */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(10, 10, 20, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid #42D3FF;
    border-radius: 8px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 0 15px rgba(66, 211, 255, 0.5);
    z-index: 9999;
    transition: all 0.3s ease;
    color: #fff;
}

.notification-icon {
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-content {
    flex: 1;
}

.notification-content p {
    margin: 0;
    font-size: 14px;
}

.game-loaded-notification {
    animation: slide-in 0.3s ease forwards;
}

@keyframes slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* === 加载文本样式 === */
.loading-text {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-align: center;
    margin: 20px 0;
    text-shadow: 0 0 10px rgba(66, 211, 255, 0.8);
    animation: pulse 2s infinite;
    color: #42D3FF;
}

/* === Responsive Overrides for Game Detail Page === */
@media screen and (max-width: 991px) {
    .game-detail-wrapper {
        flex-direction: column;
    }
    
    .game-info-column, .game-frame-column {
        flex: none;
        width: 100%;
    }
    
    .game-info-column {
        order: 2;
    }
    
    .game-frame-column {
        order: 1;
        margin-bottom: 30px;
    }
}

@media screen and (max-width: 767px) {
    .share-buttons {
        flex-direction: column;
    }
    
    .game-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .rating-stars {
        gap: 5px;
    }
    
    .star {
        font-size: 1.7rem;
    }
    
    .game-comments {
        padding: 20px;
    }
}

@media screen and (max-width: 575px) {
    .game-detail-title {
        font-size: 1.8rem;
    }
    
    .game-frame-footer {
        flex-direction: column;
    }
    
    .like-button, .favorite-button {
        width: 100%;
        justify-content: center;
    }
    
    .breadcrumbs {
        display: none;
    }
}

@media (max-width: 992px) {
    .game-frame-container {
        aspect-ratio: 4 / 3;
    }
    
    .spinner-ring {
        width: 60px;
        height: 60px;
    }
    
    .loading-tips {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .game-detail-wrapper {
        flex-direction: column;
    }
    
    .game-info-column, 
    .game-frame-column {
        width: 100%;
    }
    
    .game-frame-column {
        order: -1;
        margin-bottom: 20px;
    }
}
