:root {
    --primary-color: #a8a29e;
    /* Stone */
    --secondary-color: #d6d3d1;
    --accent-color: #facc15;
    --background-color: #f5f5f4;
    --text-color: #44403c;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#game-container {
    width: 100%;
    max-width: 800px;
    height: 100vh;
    max-height: 600px;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

#game-header {
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    color: white;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.game-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.icon-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

#game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #e7e5e4;
    padding: 20px;
    gap: 20px;
}

.dig-site {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 2px;
    background: #57534e;
    border: 4px solid #44403c;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.dirt {
    background: #78350f;
    cursor: pointer;
    border-radius: 2px;
    transition: opacity 0.2s;
}

.dirt:hover {
    background: #92400e;
}

.dirt.dug {
    opacity: 0;
    pointer-events: none;
}

.bone-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Behind dirt (z-index of dirt is implicit higher order if not absolute?) No, dirt needs z-index > bone */
    /* Wait, if dirt is grid, bones must be absolutely positioned UNDER */
    /* Easier: Dirt is z-index 10. Bones z-index 5. */
}

/* We will inject bones into digging site as absolute elements */
.bone-found {
    position: absolute;
    font-size: 3rem;
    z-index: 5;
    cursor: grab;
}

.museum {
    height: 150px;
    background: white;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.instruction {
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: #78716c;
}

.skeleton-frame {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background: #f5f5f4;
    border: 2px dashed #d6d3d1;
    border-radius: 10px;
}

.drop-zone {
    width: 60px;
    height: 60px;
    border: 2px dashed #a8a29e;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: #d6d3d1;
}

.drop-zone.filled {
    border-style: solid;
    background: #ecfccb;
    color: black;
}

/* Modal */
.modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    width: 320px;
}

.hidden {
    display: none !important;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 15px;
}

.btn-secondary {
    background-color: transparent;
    color: #64748b;
    border: 2px solid #cbd5e1;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 10px;
}