/* ==========================================================================
   Melting-Mindz v2 — Game Page Styles
   ========================================================================== */

/* ── Game Title ── */
.mm-game-title {
    font-family: var(--mm-font-heading);
    font-size: var(--mm-text-2xl);
    font-weight: 700;
    color: var(--mm-text-heading);
    margin-bottom: var(--mm-space-4);
    text-align: center;
}

@media (min-width: 640px) {
    .mm-game-title { font-size: var(--mm-text-3xl); }
}

.mm-admin-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65em;
    font-family: var(--mm-font-body);
    font-weight: 600;
    color: var(--mm-text-muted);
    border: 1px solid var(--mm-border);
    border-radius: var(--mm-radius);
    padding: 2px 8px;
    margin-left: 8px;
    text-decoration: none;
    vertical-align: middle;
    opacity: 0.6;
    transition: all var(--mm-duration) var(--mm-ease);
}
.mm-admin-edit-btn:hover {
    opacity: 1;
    color: var(--mm-accent);
    border-color: var(--mm-accent);
    background: var(--mm-bg-hover);
}

/* ── Game with Sidebar Ads (800x600 games) ── */
.mm-game-with-ads {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 140px;
    margin-bottom: var(--mm-space-4);
}

.mm-game-ad-left,
.mm-game-ad-right {
    flex-shrink: 0;
    width: 160px;
    min-height: 600px;
    display: none; /* Hidden on mobile/tablet */
}

.mm-game-ad-left .mm-ad-slot,
.mm-game-ad-right .mm-ad-slot {
    margin: 0;
    padding: 0;
    position: sticky;
    top: 60px;
}

.mm-game-center {
    flex: 0 0 auto;
    width: 100%;
    max-width: var(--mm-game-max-width, 800px);
}

/* Show sidebar ads only on wide screens where there's room */
@media (min-width: 1200px) {
    .mm-game-ad-left,
    .mm-game-ad-right {
        display: block;
    }
}

/* On screens too narrow for sidebars, center the game */
@media (max-width: 1199px) {
    .mm-game-with-ads {
        flex-direction: column;
        align-items: center;
    }
}

/* ── Game Frame Wrapper ── */
.mm-game-wrap {
    width: 100%;
    margin: 0 auto var(--mm-space-4);
}

.mm-game-frame {
    position: relative;
    width: 100%;
    background: var(--mm-bg-card);
    border-radius: var(--mm-radius-md);
    overflow: hidden;
    box-shadow: var(--mm-shadow-lg);
}

.mm-game-frame iframe,
.mm-game-frame embed,
.mm-game-frame object {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ── Game Toolbar ── */
.mm-game-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--mm-space-3);
    margin-bottom: var(--mm-space-2);
    flex-wrap: wrap;
}

.mm-fullscreen-btn svg {
    flex-shrink: 0;
}

/* Fullscreen mode — CSS-based overlay */
body.mm-fs-noscroll {
    overflow: hidden !important;
}

.mm-game-wrap.mm-fs-active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    margin: 0 !important;
    z-index: 99999;
    background: #000;
}

.mm-fs-active .mm-game-toolbar {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 100000;
    margin: 0;
}

.mm-fs-active .mm-game-frame {
    width: 100vw !important;
    height: 100vh !important;
    aspect-ratio: auto !important;
    border-radius: 0;
}

.mm-fs-active .mm-game-frame iframe,
.mm-fs-active .mm-game-frame embed,
.mm-fs-active .mm-game-frame object {
    width: 100vw !important;
    height: 100vh !important;
}

.mm-rotate-hint {
    display: flex;
    align-items: center;
    gap: var(--mm-space-1);
    font-size: var(--mm-text-xs);
    color: var(--mm-accent-warm);
    opacity: 0.8;
}

/* ── Flash Fallback (mobile) ── */
.mm-flash-fallback {
    background: var(--mm-bg-card);
    border: 1px solid var(--mm-border);
    border-radius: var(--mm-radius-lg);
    overflow: hidden;
    text-align: center;
}

.mm-flash-fallback-img {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    display: block;
}

.mm-flash-fallback-content {
    padding: var(--mm-space-6);
}

.mm-flash-fallback-title {
    font-family: var(--mm-font-heading);
    font-size: var(--mm-text-xl);
    color: var(--mm-text-heading);
    margin-bottom: var(--mm-space-3);
}

.mm-flash-fallback-msg {
    font-size: var(--mm-text-base);
    color: var(--mm-text-secondary);
    margin-bottom: var(--mm-space-5);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.mm-flash-fallback-actions {
    display: flex;
    gap: var(--mm-space-3);
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Compact Info Strip ── */
.mm-info-strip {
    display: flex;
    align-items: center;
    gap: var(--mm-space-3);
    padding: var(--mm-space-3) var(--mm-space-4);
    background: var(--mm-bg-card);
    border: 1px solid var(--mm-border);
    border-radius: var(--mm-radius-md);
    margin-bottom: var(--mm-space-4);
    flex-wrap: wrap;
}

/* Type / scores badges */
.mm-info-strip-badge {
    font-size: var(--mm-text-xs);
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--mm-radius-full);
    background: var(--mm-bg-card-alt);
    color: var(--mm-text-secondary);
    border: 1px solid var(--mm-border);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.mm-info-strip-scores {
    color: var(--mm-accent-gold);
    border-color: rgba(246, 194, 62, 0.25);
    background: rgba(246, 194, 62, 0.08);
}

/* Daily Challenge inline badge */
.mm-dc-inline-badge {
    font-size: 12px;
    font-weight: 700;
    color: #f07000;
    background: rgba(240, 112, 0, 0.1);
    border: 1px solid rgba(240, 112, 0, 0.3);
    padding: 3px 10px;
    border-radius: 999px;
    vertical-align: middle;
    white-space: nowrap;
    animation: mm-dc-glow 2s ease-in-out infinite;
}
@keyframes mm-dc-glow {
    0%, 100% { box-shadow: 0 0 0 rgba(240, 112, 0, 0); }
    50%      { box-shadow: 0 0 12px rgba(240, 112, 0, 0.2); }
}

/* Now Playing indicator */
.mm-now-playing {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: var(--mm-text-xs);
    font-weight: 600;
    color: #2ecc71;
    white-space: nowrap;
    padding: 3px 10px;
    border-radius: var(--mm-radius-full);
    background: rgba(46, 204, 113, 0.08);
    border: 1px solid rgba(46, 204, 113, 0.25);
}
.mm-now-playing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2ecc71;
    animation: mm-pulse-dot 1.5s ease-in-out infinite;
}
@keyframes mm-pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(0.8); }
}

/* Play count stat */
.mm-info-strip-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--mm-text-sm);
    font-weight: 600;
    color: var(--mm-text-secondary);
    white-space: nowrap;
}
.mm-info-strip-stat svg {
    color: var(--mm-accent-warm);
}

/* Inline vote bar */
.mm-info-strip-vote {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mm-info-vote-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--mm-radius-full);
    color: var(--mm-text-muted);
    transition: all var(--mm-duration) var(--mm-ease);
}
.mm-info-vote-btn:hover {
    background: var(--mm-bg-hover);
}
.mm-info-vote-up:hover { color: var(--mm-accent-success); }
.mm-info-vote-down:hover { color: var(--mm-accent-danger); }

.mm-info-vote-bar {
    width: 80px;
    height: 6px;
    border-radius: 3px;
    background: var(--mm-bg-card-alt);
    overflow: hidden;
}

.mm-info-vote-fill {
    height: 100%;
    background: var(--mm-accent-success);
    border-radius: 3px;
    transition: width 0.5s var(--mm-ease);
}

.mm-info-vote-pct {
    font-size: var(--mm-text-xs);
    font-weight: 700;
    color: var(--mm-text-heading);
    min-width: 30px;
}

/* Info panel wrapper (strip + description) */
.mm-info-panel {
    background: var(--mm-bg-card);
    border: 1px solid var(--mm-border);
    border-radius: var(--mm-radius-md);
    margin-bottom: var(--mm-space-4);
    overflow: visible;
}

.mm-info-panel .mm-info-strip {
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--mm-border);
}

.mm-info-panel-body {
    display: flex;
    align-items: flex-start;
    gap: var(--mm-space-3);
    padding: var(--mm-space-3) var(--mm-space-4);
}
.mm-info-panel-thumb {
    width: 120px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--mm-radius-md);
    flex-shrink: 0;
    border: 1px solid var(--mm-border);
}
.mm-info-panel-desc {
    font-size: var(--mm-text-sm);
    color: var(--mm-text-secondary);
    line-height: 1.7;
    flex: 1;
}
.mm-info-panel-desc p {
    margin: 0;
}

/* Walkthrough badge link */
.mm-info-strip-walkthrough {
    color: var(--mm-accent-warm);
    border-color: rgba(232, 133, 61, 0.25);
    background: rgba(232, 133, 61, 0.08);
    text-decoration: none;
    transition: all var(--mm-duration) var(--mm-ease);
}
.mm-info-strip-walkthrough:hover {
    background: rgba(232, 133, 61, 0.18);
    border-color: var(--mm-accent-warm);
    color: var(--mm-accent-warm);
}

/* Spacer */
.mm-info-strip-spacer {
    flex: 1;
}

/* Action buttons (favorite, share) */
.mm-info-strip-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--mm-radius-full);
    color: var(--mm-text-secondary);
    border: 1px solid var(--mm-border);
    background: transparent;
    transition: all var(--mm-duration) var(--mm-ease);
    flex-shrink: 0;
}
.mm-info-strip-action:hover {
    border-color: var(--mm-accent);
    color: var(--mm-accent);
    background: var(--mm-bg-hover);
}
.mm-info-fav-active {
    color: var(--mm-accent-danger);
    border-color: rgba(229, 62, 62, 0.3);
    background: rgba(229, 62, 62, 0.06);
}

/* ── Score Toggle ── */
.mm-score-toggle {
    display: flex;
    gap: var(--mm-space-1);
}

.mm-score-tab {
    padding: var(--mm-space-2) var(--mm-space-4);
    font-size: var(--mm-text-sm);
    font-weight: 700;
    color: var(--mm-text-secondary);
    background: var(--mm-bg-card);
    border: 1px solid var(--mm-border);
    border-radius: var(--mm-radius-full);
    transition: all var(--mm-duration) var(--mm-ease);
}

.mm-score-tab:hover {
    border-color: var(--mm-accent);
    color: var(--mm-text-primary);
}

.mm-score-tab-active {
    background: var(--mm-btn-bg);
    color: var(--mm-btn-text);
    border-color: transparent;
}

/* ── Two-Column Below Game (Comments left, Scores/Blog right) ── */
.mm-game-below {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--mm-space-6);
    border-top: 1px solid var(--mm-border);
    padding-top: var(--mm-space-6);
}

@media (min-width: 1024px) {
    .mm-game-below {
        grid-template-columns: 1fr 380px;
    }
}

.mm-game-below-left {
    min-width: 0;
}

.mm-game-below-right {
    min-width: 0;
}

/* ── Sidebar Blog Cards (when no scores) ── */
.mm-sidebar-blog-card {
    display: flex;
    gap: var(--mm-space-3);
    padding: var(--mm-space-3);
    background: var(--mm-bg-card);
    border: 1px solid var(--mm-border);
    border-radius: var(--mm-radius-md);
    margin-bottom: var(--mm-space-3);
    transition: transform var(--mm-duration) var(--mm-ease), border-color var(--mm-duration) var(--mm-ease);
}
.mm-sidebar-blog-card:hover {
    transform: translateY(-2px);
    border-color: var(--mm-accent);
}

.mm-sidebar-blog-img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--mm-radius-sm);
    flex-shrink: 0;
    background: var(--mm-bg-card-alt);
}

.mm-sidebar-blog-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.mm-sidebar-blog-title {
    font-size: var(--mm-text-sm);
    font-weight: 700;
    color: var(--mm-text-heading);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mm-sidebar-blog-date {
    font-size: var(--mm-text-xs);
    color: var(--mm-text-muted);
    margin-top: var(--mm-space-1);
}

/* Comments styles moved to components.css */

.mm-game-section {
    padding-top: var(--mm-space-4);
}

/* ── Early Access Inline Badge (premium user playing early) ── */
.mm-ea-inline-badge {
    display: inline-block;
    font-size: 0.45em;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    padding: 3px 10px;
    border-radius: 6px;
    vertical-align: middle;
    letter-spacing: 0.5px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* ── Early Access Gate (non-premium interstitial) ── */
.mm-early-access-gate {
    max-width: 560px;
    margin: 40px auto;
    text-align: center;
    padding: 40px 32px;
    background: var(--mm-bg-card);
    border-radius: 16px;
    border: 1px solid var(--mm-border);
    box-shadow: 0 8px 40px rgba(0,0,0,0.15);
}

.mm-ea-thumb-wrap {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 24px;
    border-radius: 12px;
    overflow: hidden;
}
.mm-ea-thumb {
    width: 100%;
    display: block;
    filter: blur(3px) brightness(0.6);
}
.mm-ea-thumb-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, transparent 40%, var(--mm-bg-card) 100%);
}

.mm-ea-lock {
    font-size: 48px;
    margin-bottom: 12px;
}

.mm-ea-title {
    font-family: var(--mm-font-heading);
    font-size: var(--mm-text-2xl);
    color: var(--mm-text-heading);
    margin-bottom: 12px;
}

.mm-ea-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 5px 16px;
    border-radius: 8px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 12px rgba(245, 158, 11, 0.4);
    margin-bottom: 20px;
}

.mm-ea-message {
    color: var(--mm-text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.mm-ea-countdown {
    margin-bottom: 28px;
}
.mm-ea-countdown-num {
    font-family: var(--mm-font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: var(--mm-accent-warm);
    line-height: 1;
}
.mm-ea-countdown-label {
    font-size: 1rem;
    color: var(--mm-text-secondary);
    margin-top: 4px;
}
.mm-ea-countdown-date {
    font-size: 0.85rem;
    color: var(--mm-text-muted);
    margin-top: 4px;
}

.mm-btn-premium {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 14px 32px;
    border-radius: 10px;
    border: none;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
    transition: transform 0.15s, box-shadow 0.15s;
}
.mm-btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(245, 158, 11, 0.5);
    color: #fff;
}

.mm-ea-perks {
    color: var(--mm-text-muted);
    font-size: 0.85rem;
    margin-top: 20px;
    line-height: 1.6;
}

.mm-ea-cta {
    margin-bottom: 8px;
}

/* ── Report button & dropdown ── */
.mm-report-wrap {
    position: relative;
}
.mm-report-toggle:hover {
    border-color: var(--mm-accent-danger);
    color: var(--mm-accent-danger);
    background: rgba(229, 62, 62, 0.06);
}
.mm-report-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: var(--mm-bg-card);
    border: 1px solid var(--mm-border);
    border-radius: var(--mm-radius-lg);
    padding: 0.75rem;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    z-index: 100;
}
.mm-report-title {
    font-size: var(--mm-text-xs);
    color: var(--mm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.5rem;
    font-weight: 600;
}
.mm-report-options {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mm-report-option {
    text-align: left;
    background: transparent;
    border: none;
    color: var(--mm-text-primary);
    font-size: var(--mm-text-sm);
    padding: 0.4rem 0.5rem;
    border-radius: var(--mm-radius);
    cursor: pointer;
    transition: background var(--mm-duration) var(--mm-ease);
}
.mm-report-option:hover {
    background: var(--mm-bg-hover);
    color: var(--mm-accent-danger);
}
.mm-report-thanks {
    font-size: var(--mm-text-sm);
    color: var(--mm-accent-success);
    margin: 0;
    text-align: center;
    padding: 0.25rem 0;
}

/* ── Premium Nudge Chip (logged-in non-premium, below game frame) ── */
.mm-premium-nudge {
    margin: var(--mm-space-4) auto;
    max-width: 600px;
}
.mm-premium-nudge-link {
    display: flex;
    align-items: center;
    gap: var(--mm-space-3);
    background: linear-gradient(135deg, rgba(249,217,35,0.08), rgba(232,133,61,0.08));
    border: 1px solid rgba(249,217,35,0.3);
    border-radius: var(--mm-radius-lg);
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--mm-text-primary);
    transition: border-color var(--mm-duration) var(--mm-ease), background var(--mm-duration) var(--mm-ease);
}
.mm-premium-nudge-link:hover {
    border-color: rgba(249,217,35,0.6);
    background: linear-gradient(135deg, rgba(249,217,35,0.13), rgba(232,133,61,0.1));
    text-decoration: none;
    color: var(--mm-text-primary);
}
.mm-premium-nudge-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}
.mm-premium-nudge-link span:not(.mm-premium-nudge-icon):not(.mm-premium-nudge-cta) {
    flex: 1;
    font-size: var(--mm-text-sm);
    color: var(--mm-text-secondary);
}
.mm-premium-nudge-link strong {
    color: var(--mm-accent-gold, #F9D923);
}
.mm-premium-nudge-cta {
    font-size: var(--mm-text-sm);
    font-weight: 700;
    color: var(--mm-accent-gold, #F9D923);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   GAME MOOD VOTE
   ═══════════════════════════════════════════════════════════════════════════ */

.mm-mood-vote {
    padding: var(--mm-space-4);
    background: var(--mm-bg-card);
    border: 1px solid var(--mm-border);
    border-radius: var(--mm-radius-md);
}

.mm-mood-label {
    font-size: var(--mm-text-sm);
    font-weight: 600;
    color: var(--mm-text-secondary);
    display: block;
    margin-bottom: var(--mm-space-3);
}

.mm-mood-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mm-mood-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--mm-radius-full);
    background: var(--mm-bg-card-alt);
    border: 1px solid var(--mm-border);
    color: var(--mm-text-secondary);
    font-size: var(--mm-text-sm);
    cursor: pointer;
    overflow: hidden;
    transition: all var(--mm-duration) var(--mm-ease);
}
.mm-mood-btn:hover {
    border-color: var(--mm-accent);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}
.mm-mood-mine {
    border-color: var(--mm-accent);
    background: rgba(var(--mm-accent-rgb, 59, 130, 246), 0.12);
    color: var(--mm-text-heading);
}

.mm-mood-emoji {
    font-size: 16px;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.mm-mood-btn-label {
    position: relative;
    z-index: 1;
    font-weight: 500;
}

.mm-mood-count {
    position: relative;
    z-index: 1;
    font-size: 11px;
    font-weight: 700;
    color: var(--mm-text-muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 6px;
    border-radius: 999px;
    min-width: 16px;
    text-align: center;
}
.mm-mood-mine .mm-mood-count {
    color: var(--mm-accent);
    background: rgba(var(--mm-accent-rgb, 59, 130, 246), 0.15);
}

.mm-mood-bar {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    background: var(--mm-accent);
    border-radius: 0 0 var(--mm-radius-full) var(--mm-radius-full);
    opacity: 0.4;
    transition: width 0.4s ease;
}
