.echo-game-container-6c9d2b7a {
    background: radial-gradient(circle at center, #1a1e27 0%, #090c10 100%);
    border: 3px solid #2e3b4e;
    border-radius: 16px;
    padding: 20px;
    color: #e2e8f0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    max-width: 900px;
    margin: 20px auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(100, 210, 255, 0.1);
    position: relative;
    user-select: none;
    overflow: hidden;
}

.echo-game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #2e3b4e;
    padding-bottom: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.echo-title-box h2 {
    color: #00f0ff;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
    margin: 0;
    font-size: 24px;
    letter-spacing: 2px;
}

.echo-subtitle {
    color: #c084fc;
    font-size: 13px;
    letter-spacing: 1px;
}

.echo-stats-panel {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.echo-stat {
    background: rgba(13, 17, 23, 0.8);
    border: 1px solid #3b82f6;
    border-radius: 8px;
    padding: 6px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 90px;
}

.echo-label {
    font-size: 9px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.echo-value {
    font-size: 14px;
    font-weight: bold;
    color: #38bdf8;
    text-shadow: 0 0 5px rgba(56, 189, 248, 0.3);
}

.echo-game-layout {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

/* Sidebar / Baby Echo Panel */
.echo-character-sidebar {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
}

.echo-baby-bubble-wrap {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #4a1d96;
    border-radius: 12px;
    padding: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.echo-speech-bubble {
    background: #4c1d95;
    color: #fff;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    margin-bottom: 15px;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid #7c3aed;
    width: 100%;
    box-sizing: border-box;
}

.echo-speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0;
    border-style: solid;
    border-color: #4c1d95 transparent transparent;
}

.echo-baby-echo-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.echo-baby-avatar-container {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #00f0ff;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
    transition: transform 0.3s ease;
    animation: echoHover_6c9d2b7a 3s ease-in-out infinite;
}

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

@keyframes echoHover_6c9d2b7a {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Gear / Inventory */
.echo-inventory {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 16px;
}

.echo-inventory h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #a8a29e;
    text-transform: uppercase;
}

.echo-gear-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.echo-gear-btn {
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #e2e8f0;
    position: relative;
    transition: all 0.2s;
    touch-action: manipulation;
}

.echo-gear-btn:hover {
    background: #334155;
    border-color: #38bdf8;
}

.echo-gear-btn.active {
    background: #1e3a8a;
    border-color: #60a5fa;
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

.gear-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

.gear-name {
    font-size: 10px;
    color: #94a3b8;
}

.gear-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Board styling */
.echo-board-wrapper {
    flex: 2;
    min-width: 320px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.echo-board-outer {
    background: #1c1917;
    border: 6px solid #292524;
    border-radius: 12px;
    padding: 8px;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.8), 0 8px 20px rgba(0,0,0,0.5);
}

.echo-board-grid {
    display: grid;
    grid-template-columns: repeat(8, 48px);
    grid-template-rows: repeat(8, 48px);
    gap: 4px;
    background: rgba(12, 10, 9, 0.9);
    padding: 4px;
    border-radius: 8px;
    touch-action: none;
}

.echo-cell {
    width: 48px;
    height: 48px;
    background: rgba(41, 37, 36, 0.6);
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: background-color 0.15s;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.echo-cell:hover {
    background: rgba(68, 64, 60, 0.8);
}

.echo-cell.selected {
    outline: 2px solid #38bdf8;
    box-shadow: 0 0 8px #38bdf8;
    z-index: 10;
}

/* Gem Entities */
.echo-gem {
    width: 80%;
    height: 80%;
    border-radius: 30%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    transition: transform 0.15s ease-out;
    pointer-events: none;
}

.echo-gem.amethyst {
    background: radial-gradient(circle at 35% 35%, #d8b4fe, #7e22ce);
    box-shadow: 0 0 8px rgba(126, 34, 206, 0.5);
}

.echo-gem.echo-crystal {
    background: radial-gradient(circle at 35% 35%, #99f6e4, #0f766e);
    box-shadow: 0 0 12px rgba(15, 118, 110, 0.7);
    animation: pulseGlow_6c9d2b7a 2s infinite alternate;
}

.echo-gem.amber {
    background: radial-gradient(circle at 35% 35%, #fde047, #b45309);
    box-shadow: 0 0 8px rgba(180, 83, 9, 0.5);
}

.echo-gem.emerald {
    background: radial-gradient(circle at 35% 35%, #86efac, #15803d);
    box-shadow: 0 0 8px rgba(21, 128, 61, 0.5);
}

.echo-gem.sapphire {
    background: radial-gradient(circle at 35% 35%, #93c5fd, #1d4ed8);
    box-shadow: 0 0 8px rgba(29, 78, 216, 0.5);
}

.echo-gem.opal {
    background: linear-gradient(135deg, #fbcfe8, #c7d2fe, #fef08a, #a7f3d0);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
    animation: opalShimmer_6c9d2b7a 3s infinite alternate;
}

.echo-obstacle {
    width: 100%;
    height: 100%;
    background: radial-gradient(#57534e, #292524);
    border: 2px solid #44403c;
    border-radius: 4px;
    box-shadow: inset 0 0 6px rgba(0,0,0,0.8);
    position: relative;
    pointer-events: none;
}

.echo-obstacle::after {
    content: '🪨';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
}

@keyframes pulseGlow_6c9d2b7a {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

@keyframes opalShimmer_6c9d2b7a {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Progression bar styling */
.echo-progression-bar-container {
    margin-top: 24px;
    background: rgba(15, 23, 42, 0.6);
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #1e293b;
}

.echo-progression-label {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 6px;
}

.echo-progression-track {
    height: 10px;
    background: #0f172a;
    border-radius: 5px;
    overflow: hidden;
}

.echo-progression-fill {
    height: 100%;
    background: linear-gradient(90deg, #a78bfa, #06b6d4);
    transition: width 0.4s ease-out;
}

/* Overlay & Notifications */
.echo-overlay-message {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.echo-overlay-content {
    background: #1e1b4b;
    border: 2px solid #6366f1;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    max-width: 350px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.echo-overlay-content h3 {
    color: #38bdf8;
    margin-top: 0;
}

.echo-overlay-btn {
    background: #4f46e5;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 15px;
    touch-action: manipulation;
}

.echo-overlay-btn:hover {
    background: #6366f1;
}

@media (max-width: 768px) {
    .echo-board-grid {
        grid-template-columns: repeat(8, 36px);
        grid-template-rows: repeat(8, 36px);
        gap: 3px;
    }
    .echo-cell {
        width: 36px;
        height: 36px;
    }
    .echo-gem {
        font-size: 16px;
    }
    .echo-game-container-6c9d2b7a {
        padding: 12px;
    }
}
