* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: #d4c5a9;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,.05) 2px, rgba(0,0,0,.05) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0,0,0,.05) 2px, rgba(0,0,0,.05) 4px);
    min-height: 100vh;
    padding: 20px;
    color: #2c1810;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: #2c1810;
    margin-bottom: 30px;
    border-bottom: 3px double #8b6f47;
    padding-bottom: 20px;
}

header h1 {
    font-size: 3.5em;
    margin-bottom: 15px;
    font-weight: normal;
    letter-spacing: 2px;
    color: #5c3d2e;
    text-shadow: 2px 2px 0px rgba(139, 111, 71, 0.3);
    font-family: 'Georgia', serif;
    font-style: italic;
}

header p {
    font-size: 1.2em;
    color: #6b4423;
    font-weight: normal;
    letter-spacing: 1px;
    font-style: italic;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f4e8d0;
    border: 4px solid #8b6f47;
    padding: 25px 30px;
    border-radius: 0;
    margin-bottom: 25px;
    box-shadow: 5px 5px 0px rgba(44, 24, 16, 0.2), inset 0 0 20px rgba(139, 111, 71, 0.1);
    position: relative;
}

.game-info::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid #8b6f47;
    pointer-events: none;
}

.code-display {
    flex: 1;
}

.code-display h2 {
    font-size: 1.5em;
    margin-bottom: 12px;
    color: #5c3d2e;
    font-weight: normal;
    letter-spacing: 1px;
    font-family: 'Georgia', serif;
    text-decoration: underline;
    text-decoration-style: double;
}

.code-letters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.code-letter {
    display: inline-block;
    width: 50px;
    height: 50px;
    background: #8b6f47;
    color: #f4e8d0;
    border-radius: 0;
    border: 3px solid #5c3d2e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    font-weight: bold;
    animation: popIn 0.3s ease-out;
    box-shadow: 3px 3px 0px rgba(44, 24, 16, 0.4), inset 0 0 10px rgba(0, 0, 0, 0.2);
    font-family: 'Georgia', serif;
}

@keyframes popIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.progress {
    text-align: right;
}

.progress p {
    font-size: 1.3em;
    color: #5c3d2e;
    font-weight: normal;
    letter-spacing: 1px;
    font-family: 'Georgia', serif;
}

.game-container {
    background: #f4e8d0;
    border: 5px solid #8b6f47;
    border-radius: 0;
    padding: 25px;
    box-shadow: 8px 8px 0px rgba(44, 24, 16, 0.3), inset 0 0 30px rgba(139, 111, 71, 0.15);
    position: relative;
}

.game-container::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    border: 2px solid #8b6f47;
    pointer-events: none;
}

.game-scene {
    position: relative;
    width: 100%;
    height: 600px;
    background: #e8dcc0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(139, 111, 71, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 111, 71, 0.1) 0%, transparent 50%);
    border-radius: 0;
    overflow: hidden;
    cursor: crosshair;
    box-shadow: inset 0 0 50px rgba(139, 111, 71, 0.3), inset 5px 5px 10px rgba(0, 0, 0, 0.1);
    border: 3px solid #8b6f47;
}

.hidden-item {
    position: absolute;
    width: 35px;
    height: 35px;
    background: radial-gradient(circle at 30% 30%, #88dd66, #55aa44);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    z-index: 10;
    animation: float 6s ease-in-out infinite;
}

.hidden-item:hover {
    transform: scale(1.1);
    background: radial-gradient(circle at 30% 30%, #99ee77, #66bb55);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.35);
}

.hidden-item.found {
    animation: foundAnimation 0.5s ease-out;
    pointer-events: none;
}

@keyframes foundAnimation {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(2);
        background: radial-gradient(circle, rgba(102, 126, 234, 0.8), rgba(102, 126, 234, 0.4));
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

.decoy-ball {
    position: absolute;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(10px, -15px);
    }
    50% {
        transform: translate(-5px, -10px);
    }
    75% {
        transform: translate(-10px, 5px);
    }
}

.decoy-ball.yellow {
    background: radial-gradient(circle at 30% 30%, #ffff66, #ffcc00);
}

.decoy-ball.green {
    background: radial-gradient(circle at 30% 30%, #88ff66, #44cc00);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 24, 16, 0.85);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #f4e8d0;
    padding: 50px;
    border-radius: 0;
    text-align: center;
    max-width: 500px;
    animation: modalSlideIn 0.4s ease-out;
    box-shadow: 10px 10px 0px rgba(44, 24, 16, 0.4), inset 0 0 40px rgba(139, 111, 71, 0.2);
    border: 6px double #8b6f47;
    position: relative;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 2px solid #8b6f47;
    pointer-events: none;
}

@keyframes modalSlideIn {
    0% {
        transform: translateY(-50px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    color: #5c3d2e;
    font-size: 3em;
    margin-bottom: 25px;
    font-weight: normal;
    font-family: 'Georgia', serif;
    font-style: italic;
    text-shadow: 2px 2px 0px rgba(139, 111, 71, 0.3);
    letter-spacing: 2px;
}

.modal-content p {
    font-size: 1.3em;
    margin-bottom: 18px;
    color: #6b4423;
    font-weight: normal;
    font-family: 'Georgia', serif;
}

.modal-content strong {
    color: #8b6f47;
    font-size: 2em;
    font-weight: bold;
    font-family: 'Georgia', serif;
    letter-spacing: 3px;
}

#restartBtn {
    margin-top: 25px;
    padding: 15px 40px;
    font-size: 1.2em;
    background: #8b6f47;
    color: #f4e8d0;
    border: 3px solid #5c3d2e;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: normal;
    letter-spacing: 2px;
    box-shadow: 4px 4px 0px rgba(44, 24, 16, 0.4);
    font-family: 'Georgia', serif;
}

#restartBtn:hover {
    background: #a0825a;
    box-shadow: 6px 6px 0px rgba(44, 24, 16, 0.5);
}

#restartBtn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px rgba(44, 24, 16, 0.4);
}

/* Responsive design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    
    .game-info {
        flex-direction: column;
        gap: 20px;
    }
    
    .progress {
        text-align: center;
    }
    
    .game-scene {
        height: 400px;
    }
}
