:root {
    --bg-color: #1e1e1e;
    --container-bg: #2d2d2d;
    --text-color: #ffffff;
    --control-bg: #333;
    --button-bg: #555;
    --button-hover: #666;
    --button-active: #444;
    --highlight-color: #007bff;
    --border-radius: 10px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    --transition-duration: 0.3s;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    /* font-family: 'Arial', sans-serif; */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

.container {
    display: flex;
    flex-direction: column;
    height: 95vh;
    width: 95vw;
    max-width: 1200px;
    padding: 10px;
    background-color: var(--container-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.controls {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    justify-content: center;
    flex-wrap: wrap;
    background-color: var(--control-bg);
    padding: 8px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

button {
    padding: 8px 16px;
    background-color: var(--button-bg);
    color: var(--text-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color var(--transition-duration) ease,
                transform 0.2s ease,
                box-shadow var(--transition-duration) ease;
    font-size: 14px;
}

button:hover {
    background-color: var(--button-hover);
    transform: scale(1.05);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

button:active {
    background-color: var(--button-active);
    transform: scale(0.95);
    box-shadow: none;
}

#createAlliance {
    background-color: rgba(65, 124, 206, 0.3);
}

.canvas-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: var(--container-bg);
    border-radius: var(--border-radius);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

canvas {
    image-rendering: pixelated;
}
#pixelCanvas{
    cursor: crosshair;
}

.info {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
    background-color: var(--control-bg);
    padding: 10px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.info p {
    margin: 5px 0;
}

.panelUser {
    position: fixed;
    z-index: 800;
    padding: 15px;
    left: 20px;
    bottom: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    pointer-events: none;
}

.panelUser p {
    line-height: 1.6;
}

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    background-color: var(--container-bg);
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #555;
    width: 80%;
    max-width: 600px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: var(--text-color);
    text-decoration: none;
    cursor: pointer;
}

#cellInfo {
    font-size: smaller;
    width: 60%;
    height: 100%;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    overflow: auto;
}

#pactUI {
    font-size: smaller;
    width: 60%;
    height: 100%;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    overflow: auto;
}

#marketUI {
    font-size: smaller;
    width: 60%;
    height: 100%;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    overflow: auto;
}

#chatContainer {
    position: absolute;
    bottom: 0;
    right: 0;
}

@media (max-width: 576px) {
    #cellInfo, #pactUI, #marketUI {
        font-size: x-small;
        width: 100%;
    }
    .container {
        width: 98vw;
        height: 98vh;
        padding: 5px;
        border-radius: 5px;
    }

    button {
        padding: 8px 12px;
        font-size: 12px;
    }

    .info {
        font-size: 12px;
        padding: 8px;
        border-radius: 5px;
    }

    .panelUser {
        left: 5px;
        bottom: 5px;
        padding: 8px;
        border-radius: 5px;
        font-size: 6px;
    }

    .modal-content {
        margin: 15% auto;
        padding: 10px;
        width: 90%;
        border-radius: 5px;
    }
}

@media (min-width: 577px) and (max-width: 992px) {

    .container {
        width: 95vw;
        height: 95vh;
    }

    .controls {
        justify-content: space-around;
    }

    button {
        font-size: 13px;
    }

    .info {
        font-size: 13px;
    }
}

@media (min-width: 993px) {

    .container {
        width: 90vw;
        height: 90vh;
    }

    button {
        font-size: 14px;
    }

    .info {
        font-size: 14px;
    }

    .panelUser {
        font-size: 12px;
    }
}

#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    z-index: 1000;
    pointer-events: none;
}

.notification {
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.5s forwards, slideOut 0.5s forwards 3s;
    position: relative;
    pointer-events: auto;
}

.notification button {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}