:root {
    --bg-color: #fce4ec; /* Ніжно-рожевий фон */
    --envelope-color: #ff5252; /* Червоний конверт */
    --envelope-dark: #d32f2f; /* Темніша частина конверта */
    --flap-color: #ff1744; /* Колір клапана */
    --card-bg: #fff;
    --text-color: #555;
}

body {
    margin: 0;
    font-family: sans-serif;
    background: #f4f4f4;
}


body {
    margin: 0;
    background: var(--bg-color);
    background-image: radial-gradient(#ffcdd2 1px, transparent 1px);
    background-size: 20px 20px; /* Патерн в крапочку */
    font-family: 'Roboto', sans-serif;
    overflow: hidden; /* Щоб сердечка не створювали скрол */
}


#app {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
.map-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 300px;
}

.map-path {
    position: absolute;
    width: 100%;
    height: 100%;
}

.map-point {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    font-size: 24px;
    transform: translate(-50%, -50%);
}

.map-point.active {
    background: #ff7979;
    color: white;
    text-shadow: 2px 1px 2px black;
}

.map-point.locked {
    background: #c3afaf;
    color: #5c5c5c;
    pointer-events: none;
}


.dialogue {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.dialogue-box {
    background: white;
    padding: 20px;
    border-radius: 12px;
    width: 80%;
    max-width: 300px;
    text-align: center;
}

.dialogue-box button {
    margin-top: 15px;
    padding: 10px 20px;
}

.game1 {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score {
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(5, 50px);
    grid-template-rows: repeat(5, 50px);
    gap: 4px;
}

.cell {
    width: 50px;
    height: 50px;
    border-radius: 8px;
}

.cell.selected {
    outline: 3px solid black;
}

.type-0 { background: #ff6b6b; }
.type-1 { background: #4ecdc4; }
.type-2 { background: #ffe66d; }
.type-3 { background: #5e60ce; }
.cell.blocker {
    background: black;
}


.game2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 20px;
  /*  background: #f0f4f8; */
    user-select: none; /* Важливо для драгу */
    touch-action: none; /* Забороняє скрол під час гри */
}

.header {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
}

.packages-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    min-height: 150px; /* Місце для предметів */
}

.package {
    width: 60px;
    height: 60px;
    font-size: 35px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.1s;
}

.package:active {
    cursor: grabbing;
}

.zones {
    display: flex;
    gap: 40px;
    margin-bottom: 75px;
}

.zone {
    width: 100px;
    height: 120px;
    border: 3px dashed #ccc;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.5);
    transition: all 0.2s ease;
    font-weight: bold;
    color: #555;
}

.zone span {
    font-size: 40px;
    margin-bottom: 5px;
}

/* Стани зони */
.zone.hovered {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    transform: scale(1.05);
}

.zone.zone-a { border-color: #FF9800; } /* Помаранчевий для їжі */
.zone.zone-b { border-color: #2196F3; } /* Синій для техніки */

/* Анімації */
.shake {
    animation: shake 0.4s;
    border-color: red !important;
    background: rgba(255, 0, 0, 0.1);
}

.pulse {
    animation: pulse 0.3s;
    background: rgba(0, 255, 0, 0.2);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.game3 {
    position: relative;
}

.game3 canvas {
    background: #87ceeb;
    border-radius: 12px;
}

.game3 .score {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    font-weight: bold;
    color: #f4f4f4;
    text-shadow: 2px 1px 1px black;
    user-select: none;
}
