/* HTML5 Game Manager Styles - Insane Design */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Poppins:wght@300;400;600&display=swap');

:root {
    --hgm-primary: #ff0055;
    --hgm-primary-glow: rgba(255, 0, 85, 0.5);
    --hgm-secondary: #00e5ff;
    --hgm-secondary-glow: rgba(0, 229, 255, 0.5);
    --hgm-bg-dark: #0b0c15;
    --hgm-bg-card: rgba(22, 33, 62, 0.7);
    --hgm-text: #ffffff;
    --hgm-text-muted: #8f9aa3;
    --hgm-glass-border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Global Reset */
.hgm-game-page-container *,
.hgm-home-wrapper * {
    box-sizing: border-box;
}

/* =========================================
   HOME PAGE GRID (Revamped)
   ========================================= */

.hgm-home-wrapper {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

.hgm-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.hgm-game-card {
    background: var(--hgm-bg-card);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.hgm-game-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 229, 255, 0.2);
    border-color: var(--hgm-secondary);
}

.hgm-game-card a {
    text-decoration: none;
    color: var(--hgm-text);
    display: block;
    height: 100%;
}

.hgm-card-thumb {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.hgm-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hgm-game-card:hover .hgm-card-thumb img {
    transform: scale(1.1);
}

/* Overlay Effect */
.hgm-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hgm-game-card:hover .hgm-card-overlay {
    opacity: 1;
}

.hgm-play-btn {
    background: var(--hgm-primary);
    color: #fff;
    padding: 10px 25px;
    border-radius: 30px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 0 15px var(--hgm-primary-glow);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.hgm-game-card:hover .hgm-play-btn {
    transform: translateY(0);
}

.hgm-card-info {
    padding: 20px;
    background: linear-gradient(to top, rgba(11, 12, 21, 0.9), transparent);
}

.hgm-card-info h3 {
    margin: 0 0 10px 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hgm-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--hgm-text-muted);
}

.hgm-card-views {
    color: var(--hgm-secondary);
}

.hgm-card-rating {
    color: #ffd700;
}

/* Pagination */
.hgm-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.hgm-pagination .page-numbers {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: var(--hgm-bg-card);
    color: #fff;
    border-radius: 50%;
    /* Rounded Pagination */
    text-decoration: none;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.hgm-pagination .page-numbers.current,
.hgm-pagination .page-numbers:hover {
    background: var(--hgm-secondary);
    color: #000;
    box-shadow: 0 0 15px var(--hgm-secondary-glow);
    border-color: var(--hgm-secondary);
}

.hgm-pagination .next,
.hgm-pagination .prev {
    width: auto;
    padding: 0 20px;
    border-radius: 20px;
}


/* =========================================
   GAME PAGE STYLES (Existing + Social Fixes)
   ========================================= */
/* Main Container - The Stage */
.hgm-game-page-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    background: radial-gradient(circle at top right, #1a1a2e, #0b0c15);
    padding: 30px;
    border-radius: 20px;
    color: var(--hgm-text);
    font-family: 'Poppins', sans-serif;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    border: var(--hgm-glass-border);
}

/* Background aesthetic blob */
.hgm-game-page-container::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: var(--hgm-secondary);
    filter: blur(150px);
    opacity: 0.2;
    z-index: 0;
    pointer-events: none;
}

.hgm-game-page-container::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 300px;
    height: 300px;
    background: var(--hgm-primary);
    filter: blur(150px);
    opacity: 0.2;
    z-index: 0;
    pointer-events: none;
}

/* Headers */
.hgm-game-page-container h2,
.hgm-game-page-container h3,
.hgm-sidebar h3 {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--hgm-text);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Sidebar */
.hgm-sidebar {
    width: 300px;
    flex-shrink: 0;
    z-index: 1;
}

.hgm-sidebar h3 {
    color: var(--hgm-secondary);
    border-bottom: 2px solid var(--hgm-secondary);
    padding-bottom: 15px;
    margin-bottom: 25px;
    text-shadow: 0 0 10px var(--hgm-secondary-glow);
}

.hgm-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hgm-sidebar-item {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--hgm-text);
    background: var(--hgm-bg-card);
    padding: 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    backdrop-filter: blur(5px);
}

.hgm-sidebar-item:hover {
    transform: translateX(10px) scale(1.02);
    background: rgba(35, 49, 87, 0.8);
    border-color: var(--hgm-secondary);
    box-shadow: 0 0 15px var(--hgm-secondary-glow);
}

.hgm-sidebar-item .hgm-thumb {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.hgm-sidebar-item .hgm-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.hgm-sidebar-item:hover .hgm-thumb img {
    transform: scale(1.1);
}

.hgm-sidebar-item .hgm-title {
    font-weight: 600;
    font-size: 1rem;
}

/* Main Content area */
.hgm-main-content {
    flex: 1;
    min-width: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Game Wrapper */
.hgm-game-wrapper {
    position: relative;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    border: 1px solid #333;
}

#hgm-game-iframe {
    width: 100%;
    height: 600px;
    border: none;
    display: block;
}

.hgm-controls {
    padding: 15px;
    background: linear-gradient(to bottom, #111, #000);
    text-align: right;
    border-top: 1px solid #333;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

#hgm-fullscreen-btn {
    background: transparent;
    color: var(--hgm-primary);
    border: 2px solid var(--hgm-primary);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px var(--hgm-primary-glow);
}

#hgm-fullscreen-btn:hover {
    background: var(--hgm-primary);
    color: #fff;
    box-shadow: 0 0 20px var(--hgm-primary);
    transform: translateY(-2px);
}

/* Interaction Bar */
.hgm-interaction-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--hgm-bg-card);
    padding: 20px 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: var(--hgm-glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hgm-vote-label {
    font-weight: 600;
    margin-right: 15px;
    color: var(--hgm-text-muted);
}

.hgm-stars {
    display: inline-flex;
    cursor: pointer;
    gap: 5px;
}

.hgm-star {
    font-size: 28px;
    color: #444;
    transition: transform 0.2s, color 0.2s;
}

.hgm-star:hover {
    transform: scale(1.2);
}

.hgm-star.active {
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.hgm-rating-result {
    margin-left: 15px;
    font-size: 0.9em;
    color: var(--hgm-text-muted);
    font-family: 'Orbitron', monospace;
}

.hgm-views {
    font-size: 1.2em;
    font-family: 'Orbitron', sans-serif;
    color: var(--hgm-secondary);
    text-shadow: 0 0 10px var(--hgm-secondary-glow);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hgm-views::before {
    content: '👁';
    font-size: 1.2em;
}

/* Description Box */
.hgm-description {
    background: var(--hgm-bg-card);
    padding: 30px;
    border-radius: 15px;
    border: var(--hgm-glass-border);
}

.hgm-description h2 {
    margin-top: 0;
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #fff;
}

.hgm-description-content {
    line-height: 1.8;
    color: #ddd;
    font-size: 1.05em;
}

/* Comments Section */
.hgm-comments-section {
    background: var(--hgm-bg-card);
    padding: 30px;
    border-radius: 15px;
    border: var(--hgm-glass-border);
    margin-top: 20px;
}

.hgm-comments-section h3 {
    margin-bottom: 25px;
    color: var(--hgm-secondary);
}

/* Social Buttons */
.hgm-social-login {
    margin-bottom: 30px;
    text-align: center;
}

.hgm-social-btns-mock {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.hgm-btn-social {
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 0.95rem;
}

.hgm-btn-google {
    background: #db4437;
    box-shadow: 0 4px 15px rgba(219, 68, 55, 0.3);
}

.hgm-btn-facebook {
    background: #4267B2;
    box-shadow: 0 4px 15px rgba(66, 103, 178, 0.3);
}

.hgm-btn-twitter {
    background: #000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
}

.hgm-btn-steam {
    background: #171a21;
    /* Fallback */
    background: linear-gradient(to bottom, #171a21 0%, #1b2838 100%);
    box-shadow: 0 4px 15px rgba(23, 26, 33, 0.4);
}

.hgm-btn-tiktok {
    background: #000;
    text-shadow: 2px 2px 0px #FF0050, -2px -2px 0px #00F2EA;
    box-shadow: 0 4px 15px rgba(0, 242, 234, 0.2);
}

.hgm-btn-reddit {
    background: #FF4500;
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3);
}

.hgm-btn-social:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.hgm-social-note {
    width: 100%;
    margin-top: 10px;
    font-size: 0.85em;
    color: var(--hgm-text-muted);
}

/* Comment Form */
.hgm-comment-form-wrapper {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 30px;
}

.hgm-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.hgm-comment-form-wrapper input,
.hgm-comment-form-wrapper textarea {
    width: 100%;
    background: #0b0c15;
    border: 1px solid #333;
    color: #fff;
    padding: 12px;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    transition: 0.3s;
}

.hgm-comment-form-wrapper input:focus,
.hgm-comment-form-wrapper textarea:focus {
    outline: none;
    border-color: var(--hgm-secondary);
    box-shadow: 0 0 10px var(--hgm-secondary-glow);
}

#hgm-submit-comment-btn {
    background: var(--hgm-primary);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
    margin-top: 10px;
}

#hgm-submit-comment-btn:hover {
    background: #d40047;
    box-shadow: 0 0 15px var(--hgm-primary);
}

#hgm-submit-comment-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.hgm-form-message {
    margin-top: 10px;
    font-weight: 600;
}

/* Comment List */
.hgm-comment-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hgm-comment-item {
    display: flex;
    gap: 20px;
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 10px;
    border-left: 3px solid var(--hgm-secondary);
}

.hgm-comment-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--hgm-secondary);
}

.hgm-comment-body {
    flex: 1;
}

.hgm-comment-meta {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
}

.hgm-comment-author {
    font-weight: 700;
    color: var(--hgm-secondary);
}

.hgm-comment-date {
    color: var(--hgm-text-muted);
}

.hgm-comment-text p {
    margin: 0;
    color: #eee;
}

/* Responsive */
@media (max-width: 900px) {
    .hgm-game-page-container {
        flex-direction: column-reverse;
        /* Sidebar at bottom */
        padding: 15px;
    }

    .hgm-sidebar {
        width: 100%;
    }

    .hgm-interaction-bar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .hgm-form-row {
        flex-direction: column;
    }
}