/* Game specific styles for Drop Merge */

:root {
    --primary-color: #FF9800;
    --primary-hover: #F57C00;
    --text-main: #333;
    --bg-card: #FFFFFF;
    --game-bg: #FFF8E1;
    --game-border: #8D6E63;
}

.game-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 20px 0;
}

.game-container h1 {
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.game-description {
    margin-bottom: 3rem;
    color: #555;
    font-size: 1.1rem;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 400px;
    margin: 0 auto 1rem;
    padding: 0 10px;
}

.score-box {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    background: #fff;
    padding: 5px 15px;
    border-radius: 50px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.game-area-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

/* Next Preview Bubble */
.next-preview {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 60px;
    height: 80px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border: 2px solid var(--game-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.next-preview span {
    font-size: 0.8rem;
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
}

.fruit-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    /* Background color set by JS */
    transition: all 0.2s;
}

canvas {
    background: var(--game-bg);
    border: 4px solid var(--game-border);
    border-top: none;
    /* Open top conceptually */
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    touch-action: none;
    cursor: crosshair;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    border-radius: 0 0 12px 12px;
    z-index: 10;
}

.hidden {
    display: none;
}

.overlay h2 {
    font-size: 3rem;
    color: #FF9800;
    margin-bottom: 1rem;
}

/* Instructions */
.instructions {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: left;
    margin: 3rem auto 5rem;
    color: #444;
    line-height: 1.8;
}

.instructions h3 {
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 700;
}

.instructions h3:first-child {
    margin-top: 0.5rem;
}

/* Buttons */
.primary-btn {
    background-color: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: bold;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--primary-shadow);
}

.primary-btn:active {
    transform: translateY(4px);
    box-shadow: none;
}

.primary-btn:hover {
    background-color: var(--primary-hover);
}