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

body {
    overflow: hidden;
    background: #1a1a1a;
    font-family: 'Arial', sans-serif;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    width: 100vw;
    height: 100vh;
    position: fixed;
}

#gameCanvas {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    touch-action: none;
    z-index: 1;
}

#ui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}

.top-panel {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    padding: 10px;
    z-index: 20;
}

.resources {
    display: flex;
    gap: 15px;
    color: white;
    font-size: 16px;
}

.player-info {
    color: white;
    font-size: 16px;
}

.bottom-panel {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-around;
    pointer-events: auto;
    gap: 10px;
    z-index: 20;
}

.bottom-panel button {
    flex: 1;
    padding: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: 2px solid #444;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    pointer-events: auto;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    pointer-events: auto;
    width: 90%;
    max-width: 400px;
}

.modal-content {
    background: #2a2a2a;
    border-radius: 15px;
    padding: 20px;
    color: white;
}

.modal-content h2 {
    margin-bottom: 15px;
    text-align: center;
}

.building-list, .artifact-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.building-item, .artifact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #3a3a3a;
    border-radius: 10px;
    cursor: pointer;
}

.building-icon, .artifact-icon {
    font-size: 30px;
}

.chat-messages {
    height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
    padding: 10px;
    background: #1a1a1a;
    border-radius: 10px;
}

.message {
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 5px;
    color: white;
}

.message.mine {
    background: #4a90e2;
    margin-left: 20%;
}

.message.theirs {
    background: #666;
    margin-right: 20%;
}

.chat-input {
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    background: #1a1a1a;
    color: white;
    border: 1px solid #444;
    border-radius: 5px;
}

.chat-input button {
    padding: 10px 20px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
