body {
    margin: 0;
    overflow: hidden;
    font-family: 'Arial', sans-serif;
    background: linear-gradient(to bottom, #1a1a2e, #16213e);
    color: white;
}

#game-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

#ui {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #f5b349;
    z-index: 10;
}

#score {
    font-size: 24px;
    color: #f5b349;
    margin-bottom: 10px;
}

#attempts {
    font-size: 18px;
    color: #e94560;
}

#controls {
    position: absolute;
    bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 10;
    flex-wrap: wrap;
}

.control-btn {
    padding: 12px 20px;
    background: #e94560;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.control-btn:hover {
    background: #f5b349;
    transform: translateY(-3px);
}

.control-btn:active {
    transform: translateY(0);
}

#camera-controls {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.join-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 15px 30px;
    background: linear-gradient(45deg, #f5b349, #e94560);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(245, 179, 73, 0.5);
    animation: pulse 2s infinite;
    z-index: 10;
}

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

.join-btn:hover {
    background: linear-gradient(45deg, #e94560, #f5b349);
    box-shadow: 0 5px 25px rgba(233, 69, 96, 0.7);
}

#player-stories {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #3ab7bf;
    max-width: 250px;
    z-index: 10;
}

.story {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #3ab7bf;
}

#prize-gallery {
    position: absolute;
    bottom: 80px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #0f3460;
    z-index: 10;
}

.prize-item {
    width: 50px;
    height: 50px;
    margin: 5px;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

/* Экран начала игры */
#start-screen {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#start-title {
    font-size: 48px;
    color: #f5b349;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 0 10px rgba(245, 179, 73, 0.7);
}

#start-subtitle {
    font-size: 24px;
    color: white;
    margin-bottom: 50px;
    text-align: center;
}

#start-button {
    padding: 15px 40px;
    background: linear-gradient(45deg, #f5b349, #e94560);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(245, 179, 73, 0.5);
}

#start-button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 25px rgba(233, 69, 96, 0.7);
}

/* Экран победы/проигрыша */
#end-screen {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#end-title {
    font-size: 48px;
    color: #f5b349;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 0 10px rgba(245, 179, 73, 0.7);
}

#end-score {
    font-size: 36px;
    color: white;
    margin-bottom: 30px;
}

#end-message {
    font-size: 24px;
    color: white;
    margin-bottom: 50px;
    text-align: center;
}

#restart-button {
    padding: 15px 40px;
    background: linear-gradient(45deg, #f5b349, #e94560);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(245, 179, 73, 0.5);
}

#restart-button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 25px rgba(233, 69, 96, 0.7);
}

.prize-item {
    width: 50px;
    height: 50px;
    margin: 5px;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
    border: 1px solid #3ab7bf;
    border-radius: 5px;
    transition: transform 0.3s;
}

.prize-item:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

.prize-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    perspective: 1000px;
}

.prize-view {
    width: 80px;
    height: 80px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

.prize-view:hover {
    transform: rotateY(180deg) scale(1.1);
}

.prize-view canvas {
    width: 100%;
    height: 100%;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

@media (max-width: 900px) {
    #player-stories {
        display: none;
    }
    #camera-controls {
        right: 10px;
        left: auto;
        top: 80px;
        transform: none;
        flex-direction: column;
    }
    .join-btn {
        right: 10px;
        top: 10px;
        bottom: initial;
    }
}