/* ==========================================================================
   Sea of Thieves Australia (SOTAU) - Mini Games & Arcade Hub Stylesheet
   Professional Game Development Suite: Cannon Challenge, Treasure Run, Skeleton Survival
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Arcade Hub & Giveaway Banner (mini-games.html)
   -------------------------------------------------------------------------- */
section.page-section.mg-hub-hero-section {
    padding-top: 90px !important;
    padding-bottom: 20px !important;
    position: relative;
    z-index: 1;
}

.mg-hero-card {
    background: linear-gradient(135deg, rgba(16, 22, 32, 0.96) 0%, rgba(10, 14, 20, 0.98) 100%);
    border: 1px solid rgba(226, 172, 38, 0.32);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 16px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.mg-hero-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, rgba(226, 172, 38, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.mg-hero-header,
.mg-giveaway-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 11px;
    position: relative;
    z-index: 1;
}

.mg-hero-title-group,
.mg-giveaway-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mg-hero-icon,
.mg-giveaway-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: linear-gradient(135deg, rgba(226, 172, 38, 0.2), rgba(226, 172, 38, 0.05));
    border: 1px solid rgba(226, 172, 38, 0.38);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--accent-gold);
    flex-shrink: 0;
}

.mg-hero-icon .icon,
.mg-giveaway-icon .icon {
    width: 22px;
    height: 22px;
}

.mg-giveaway-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: #ffffff;
    margin: 0 0 2px 0;
    letter-spacing: 0.5px;
}

.mg-giveaway-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.mg-header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mg-sound-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(14, 19, 27, 0.92);
    border: 1px solid rgba(226, 172, 38, 0.35);
    color: var(--accent-gold);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mg-sound-toggle-btn:hover {
    background: rgba(226, 172, 38, 0.14);
    border-color: var(--accent-gold);
}

.mg-sound-toggle-btn.muted {
    border-color: rgba(143, 153, 166, 0.35);
    color: #8f99a6;
}

/* Overall 3-Game Progress Tracker */
.mg-progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 10px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.mg-progress-box {
    background: rgba(8, 11, 15, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 14px;
    position: relative;
    transition: all 0.25s ease;
}

.mg-progress-box:hover {
    border-color: rgba(226, 172, 38, 0.4);
    background: rgba(226, 172, 38, 0.04);
    transform: translateY(-2px);
}

.mg-progress-box.completed {
    border-color: rgba(46, 184, 172, 0.6);
    background: linear-gradient(135deg, rgba(46, 184, 172, 0.12) 0%, rgba(8, 11, 15, 0.78) 100%);
}

.mg-progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.mg-game-name {
    font-weight: 700;
    font-size: 0.96rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mg-level-count {
    font-size: 0.76rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-gold);
    border: 1px solid rgba(226, 172, 38, 0.25);
}

.mg-progress-box.completed .mg-level-count {
    background: rgba(46, 184, 172, 0.18);
    color: #2eb8ac;
    border-color: rgba(46, 184, 172, 0.45);
}

.mg-bar-outer {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 8px;
}

.mg-bar-inner {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #d97706, #e2ac26);
    border-radius: 999px;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.mg-progress-box.completed .mg-bar-inner {
    background: linear-gradient(90deg, #1b7f79, #2eb8ac);
}

/* 5-Stage Pips Row */
.mg-pip-row {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: space-between;
}

.mg-pip {
    flex: 1;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.mg-pip.done {
    background: var(--accent-gold);
}

.mg-progress-box.completed .mg-pip.done {
    background: #2eb8ac;
}

/* Claim Terminal Banner */
.mg-claim-banner {
    background: rgba(6, 9, 14, 0.78);
    border: 1px dashed rgba(226, 172, 38, 0.4);
    border-radius: 10px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.mg-claim-banner.unlocked {
    border-style: solid;
    border-width: 1.5px;
    border-color: var(--accent-gold);
    background: linear-gradient(90deg, rgba(226, 172, 38, 0.14) 0%, rgba(46, 184, 172, 0.14) 100%);
}

.mg-claim-info h4 {
    margin: 0 0 4px 0;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: #ffffff;
}

.mg-claim-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.mg-code-display {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mg-code-badge {
    font-family: 'Courier New', monospace;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--accent-gold);
    background: #06090d;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(226, 172, 38, 0.35);
}

.mg-claim-banner.unlocked .mg-code-badge {
    color: #2eb8ac;
    border-color: #2eb8ac;
}

/* --------------------------------------------------------------------------
   2. Arcade Voyage Game Cards (Hub Selection)
   -------------------------------------------------------------------------- */
.mg-arcade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 20px;
    margin-bottom: 34px;
}

.mg-voyage-card {
    background: linear-gradient(180deg, rgba(16, 22, 32, 0.96) 0%, rgba(10, 14, 20, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 28px rgba(0, 0, 0, 0.5);
}

.mg-voyage-card:hover {
    transform: translateY(-5px);
    border-color: rgba(226, 172, 38, 0.65);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65);
}

/* Visual Banner Preview Inside Hub Card */
.mg-card-art {
    height: 96px;
    margin: -20px -20px 16px -20px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mg-card-art-cannon {
    background: radial-gradient(circle at 75% 30%, rgba(226, 172, 38, 0.22), transparent 60%),
                linear-gradient(180deg, #06101e 0%, #0b233e 65%, #034060 100%);
}

.mg-card-art-treasure {
    background: radial-gradient(circle at 50% 30%, rgba(46, 184, 172, 0.22), transparent 60%),
                linear-gradient(180deg, #052e2b 0%, #115e59 65%, #b45309 100%);
}

.mg-card-art-skeleton {
    background: radial-gradient(circle at 50% 40%, rgba(224, 90, 71, 0.22), transparent 60%),
                linear-gradient(180deg, #1a0d12 0%, #261419 65%, #0b0e14 100%);
}

.mg-card-art svg {
    width: 100%;
    height: 100%;
    display: block;
}

.mg-voyage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.mg-voyage-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    background: rgba(226, 172, 38, 0.12);
    border: 1px solid rgba(226, 172, 38, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--accent-gold);
}

.mg-voyage-badge {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background: rgba(46, 184, 172, 0.14);
    color: #2eb8ac;
    border: 1px solid rgba(46, 184, 172, 0.35);
}

.mg-voyage-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: #ffffff;
    margin: 0 0 10px 0;
}

.mg-voyage-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.mg-voyage-specs {
    background: rgba(0, 0, 0, 0.38);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 22px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.mg-spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    margin-bottom: 8px;
}

.mg-spec-row:last-child {
    margin-bottom: 0;
}

.mg-spec-label {
    color: var(--text-muted);
}

.mg-spec-val {
    font-weight: 700;
    color: var(--color-cream);
}

.mg-btn-launch {
    width: 100%;
    padding: 13px 20px;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 10px;
    transition: all 0.25s ease;
}

/* --------------------------------------------------------------------------
   3. Dedicated Game Page Viewport & Arcade Navigation
   -------------------------------------------------------------------------- */
.mg-game-page-section {
    padding-top: 105px;
    padding-bottom: 60px;
    min-height: 85vh;
}

.mg-arcade-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 20px;
    padding: 14px 20px;
    background: linear-gradient(165deg, rgba(16, 25, 39, 0.96) 0%, rgba(10, 15, 24, 0.98) 100%);
    border: 1px solid rgba(245, 190, 24, 0.28);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 10px 30px rgba(0, 0, 0, 0.5);
}

.mg-nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mg-btn-return {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-cream);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mg-btn-return:hover {
    background: rgba(245, 190, 24, 0.15);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.mg-arcade-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mg-viewport-card {
    background: #070b12;
    border: 2px solid rgba(245, 190, 24, 0.38);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 65px rgba(0, 0, 0, 0.88), 0 0 38px rgba(245, 190, 24, 0.14);
    position: relative;
}

/* In-Game HUD Bar */
.mg-hud-bar {
    background: linear-gradient(180deg, rgba(16, 22, 31, 0.98) 0%, rgba(10, 14, 21, 0.98) 100%);
    padding: 14px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.mg-hud-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Stage Selector Pills */
.mg-stage-pills {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.45);
    padding: 4px 6px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mg-stage-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mg-stage-pill:hover {
    border-color: rgba(245, 190, 24, 0.5);
    color: #fff;
}

.mg-stage-pill.active {
    background: rgba(245, 190, 24, 0.22);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    box-shadow: 0 0 10px rgba(245, 190, 24, 0.3);
}

.mg-stage-pill.cleared {
    border-color: rgba(46, 184, 172, 0.5);
    color: #2eb8ac;
}

.mg-stage-pill.cleared.active {
    background: rgba(46, 184, 172, 0.22);
    border-color: #2eb8ac;
    color: #fff;
}

.mg-hud-stats {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.mg-stat-badge {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 6px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 82px;
}

.mg-stat-val {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent-gold);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.mg-stat-lbl {
    font-size: 0.66rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-top: 2px;
}

/* Canvas Viewport */
.mg-canvas-wrapper {
    position: relative;
    width: 100%;
    height: 540px;
    background: #040811;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
}

.mg-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

#cannon-canvas {
    cursor: crosshair;
}

/* Controls Action Bar */
.mg-controls-bar {
    background: linear-gradient(180deg, rgba(13, 20, 29, 0.98) 0%, rgba(8, 13, 20, 0.99) 100%);
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.mg-ctrl-group {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.mg-ctrl-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mg-ctrl-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.mg-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mg-step-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.mg-step-btn:hover {
    background: rgba(245, 190, 24, 0.2);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.mg-range-input {
    accent-color: var(--accent-gold);
    cursor: pointer;
    width: 150px;
    height: 6px;
}

.mg-val-display {
    font-family: 'Courier New', monospace;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--accent-gold);
    min-width: 46px;
    text-align: right;
}

/* Mobile Touch D-Pad */
.mg-touch-overlay {
    position: absolute;
    bottom: 18px;
    right: 18px;
    z-index: 12;
    display: none;
    align-items: flex-end;
    gap: 14px;
}

@media (max-width: 960px), (pointer: coarse) {
    .mg-touch-overlay {
        display: flex;
    }
}

.mg-dpad {
    display: grid;
    grid-template-columns: repeat(3, 46px);
    grid-template-rows: repeat(3, 46px);
    gap: 5px;
}

.mg-dpad-btn {
    background: rgba(11, 16, 23, 0.88);
    border: 1px solid rgba(245, 190, 24, 0.45);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.mg-dpad-btn:active,
.mg-dpad-btn.pressed {
    background: var(--accent-gold);
    color: #000;
    transform: scale(0.94);
}

.mg-sprint-touch-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(46, 184, 172, 0.18);
    border: 2px solid #2eb8ac;
    color: #fff;
    font-weight: 800;
    font-size: 0.72rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.mg-sprint-touch-btn:active {
    background: #2eb8ac;
    color: #080b0f;
}

/* --------------------------------------------------------------------------
   4. Skeleton Survival Visual Arena & Reaction Bar
   -------------------------------------------------------------------------- */
.skel-arena-wrap {
    position: relative;
    background: #070b12 !important;
    padding: 0 !important;
    display: block !important;
}

.skel-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.skel-hud-overlay {
    position: relative;
    z-index: 5;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px 24px;
    pointer-events: none;
}

.skel-hud-top {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
    background: rgba(7, 11, 18, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    padding: 12px 22px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
}

.skel-hud-bottom {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    background: rgba(7, 11, 18, 0.94);
    border: 1px solid rgba(245, 190, 24, 0.3);
    border-radius: 14px;
    padding: 14px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.72);
}

.skel-combat-box {
    position: relative;
    z-index: 5;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px 24px;
    pointer-events: none;
}

.skel-prompt-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--accent-gold);
    margin: 0 0 4px 0;
    min-height: 26px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.skel-enemy-desc {
    font-size: 0.84rem;
    color: #cbd5e1;
    margin-bottom: 0;
    min-height: 18px;
}

.skel-telegraph-wrap {
    width: 100%;
    max-width: 520px;
    margin: 0 auto 12px auto;
}

.skel-telegraph-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #cbd5e1;
    margin-bottom: 5px;
    letter-spacing: 0.6px;
}

.skel-telegraph-bar-outer {
    height: 14px;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8);
}

.skel-telegraph-parry-window {
    position: absolute;
    top: 0;
    left: 65%;
    width: 28%;
    height: 100%;
    background: linear-gradient(90deg, rgba(245, 190, 24, 0.35), rgba(250, 204, 21, 0.55));
    border-left: 2px solid #facc15;
    border-right: 2px solid #facc15;
    pointer-events: none;
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.5);
}

.skel-telegraph-bar-inner {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #dc2626, #f97316, #facc15);
    border-radius: 6px;
}

.skel-health-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
}

.skel-hp-label {
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    letter-spacing: 0.5px;
}

.skel-hp-bar-outer {
    height: 12px;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    overflow: hidden;
}

.skel-hp-bar-inner {
    height: 100%;
    width: 100%;
    transition: width 0.2s ease-out;
}

.skel-enemy-hp {
    background: linear-gradient(90deg, #b91c1c, #e05a47, #f87171);
}

.skel-player-hp {
    background: linear-gradient(90deg, #1b7f79, #2eb8ac, #5fd1c5);
}

/* Combat Action Buttons */
.skel-actions-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.skel-action-btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    font-size: 0.92rem;
    font-weight: 800;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.18s ease;
    min-width: 175px;
    user-select: none;
}

.skel-action-btn:active {
    transform: scale(0.95);
}

.skel-act-key {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 5px;
    padding: 2px 7px;
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    color: #fff;
}

.btn-water {
    border: 1px solid rgba(46, 184, 172, 0.55) !important;
    color: #2eb8ac !important;
    background: rgba(46, 184, 172, 0.12) !important;
}

.btn-water:hover {
    background: rgba(46, 184, 172, 0.24) !important;
    transform: translateY(-2px);
}

.btn-lantern {
    border: 1px solid rgba(250, 204, 21, 0.6) !important;
    color: #facc15 !important;
    background: rgba(250, 204, 21, 0.12) !important;
}

.btn-lantern:hover {
    background: rgba(250, 204, 21, 0.25) !important;
    box-shadow: 0 0 18px rgba(250, 204, 21, 0.35) !important;
    transform: translateY(-2px);
}

.skel-action-btn.highlight-needed {
    animation: skelBtnPulse 1s infinite alternate;
}

@keyframes skelBtnPulse {
    from { box-shadow: 0 0 5px currentColor; transform: scale(1); }
    to { box-shadow: 0 0 22px currentColor; transform: scale(1.04); }
}

/* --------------------------------------------------------------------------
   5. Achievements Showcase
   -------------------------------------------------------------------------- */
.mg-achievements-section {
    background: rgba(13, 20, 29, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 30px;
    margin-bottom: 50px;
}

.mg-achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 18px;
}

.mg-achievement-card {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.mg-achievement-card.unlocked {
    opacity: 1;
    border-color: rgba(245, 190, 24, 0.55);
    background: linear-gradient(135deg, rgba(245, 190, 24, 0.14) 0%, rgba(16, 185, 129, 0.08) 100%);
    box-shadow: 0 0 20px rgba(245, 190, 24, 0.18);
}

.mg-ach-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.mg-achievement-card.unlocked .mg-ach-icon {
    background: rgba(245, 190, 24, 0.22);
    border-color: rgba(245, 190, 24, 0.5);
    box-shadow: 0 0 14px rgba(245, 190, 24, 0.3);
}

.mg-ach-info h5 {
    margin: 0 0 4px 0;
    font-family: var(--font-heading);
    color: #ffffff;
    font-size: 1rem;
}

.mg-ach-info p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* --------------------------------------------------------------------------
   6. In-Canvas Overlays (Game Over / Level Complete)
   -------------------------------------------------------------------------- */
.mg-overlay-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 7, 13, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    z-index: 30;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.mg-overlay-screen.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mg-overlay-box {
    background: linear-gradient(180deg, #111a27 0%, #0a1018 100%);
    border: 2px solid var(--accent-gold);
    border-radius: 18px;
    padding: 34px 40px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 24px 65px rgba(0, 0, 0, 0.92), 0 0 40px rgba(245, 190, 24, 0.28);
    transform: scale(0.92) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mg-overlay-screen.active .mg-overlay-box {
    transform: scale(1) translateY(0);
}

.mg-overlay-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 5px 14px;
    border-radius: 6px;
    background: rgba(46, 184, 172, 0.16);
    color: #2eb8ac;
    border: 1px solid rgba(46, 184, 172, 0.45);
    margin-bottom: 14px;
}

.mg-overlay-badge.badge-red {
    background: rgba(239, 68, 68, 0.18);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.45);
}

.mg-overlay-title {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    color: #ffffff;
    margin: 0 0 10px 0;
}

.mg-overlay-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 0 0 18px 0;
}

.mg-overlay-stat {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--accent-gold);
    background: rgba(245, 190, 24, 0.12);
    border: 1px solid rgba(245, 190, 24, 0.35);
    border-radius: 10px;
    padding: 10px 18px;
    display: inline-block;
    margin-bottom: 24px;
}

.mg-overlay-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   7. Responsive Adaptations
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .mg-canvas-wrapper {
        height: 430px;
    }

    .mg-controls-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 14px 16px;
    }

    .mg-range-input {
        width: 100%;
    }

    .mg-hud-bar {
        padding: 12px 14px;
    }

    .mg-stat-badge {
        min-width: 68px;
        padding: 5px 10px;
    }

    .mg-stat-val {
        font-size: 0.95rem;
    }

    .skel-action-btn {
        min-width: 130px;
        flex: 1 1 calc(50% - 8px);
        padding: 10px 12px;
        font-size: 0.84rem;
    }

    .skel-combat-box,
    .skel-hud-overlay {
        padding: 12px;
    }

    .skel-prompt-text {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .mg-hub-hero-section {
        padding-top: 110px;
    }

    .mg-hero-card {
        padding: 20px 16px;
    }

    .mg-claim-banner {
        padding: 16px;
    }

    .mg-code-badge {
        font-size: 0.9rem;
        padding: 8px 12px;
        letter-spacing: 1px;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .mg-voyage-card {
        padding: 20px 16px;
    }

    .mg-card-art {
        margin: -20px -16px 14px -16px;
    }

    .mg-achievements-section {
        padding: 20px 16px;
    }

    .mg-arcade-nav {
        padding: 12px 14px;
    }

    .mg-arcade-title {
        font-size: 1.05rem;
    }

    .mg-stage-pill {
        padding: 4px 7px;
        font-size: 0.7rem;
    }

    .mg-dpad {
        grid-template-columns: repeat(3, 38px);
        grid-template-rows: repeat(3, 38px);
        gap: 4px;
    }

    .mg-sprint-touch-btn {
        width: 50px;
        height: 50px;
        font-size: 0.65rem;
    }

    .skel-hud-top {
        padding: 8px 12px;
    }

    .skel-hud-bottom {
        padding: 10px 12px;
    }

    .skel-health-grid {
        gap: 10px;
    }

    .skel-action-btn {
        min-width: 115px;
        padding: 9px 8px;
        font-size: 0.76rem;
        gap: 6px;
    }

    .mg-overlay-box {
        padding: 22px 18px;
    }

    .mg-overlay-title {
        font-size: 1.45rem;
    }
}
