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

body {
    min-height: 100vh;
    background-color: #22313f;
    font-family: Arial, sans-serif;
}

#page-header {
    width: 100vw;
    height: 128px;
    background: transparent;
    color: #fff;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
}

#page-header img {
    height: 100%;
    width: auto;
    align-self: center;
}

#game-info {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: auto;
    margin-bottom: 0;
    position: absolute;
    bottom: 0;
    right: 0;
}

#resources {
    display: flex;
    flex-direction: row;
    gap: 40px;
    font-size: 1.5rem;
    align-items: center;
}

#resources img {
    height: 2em !important;
    width: auto;
    vertical-align: middle;
}

#resources span {
    white-space: nowrap;
}

.time-display {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.time-display img {
    transition: opacity 0.3s;
}

.time-display img:hover {
    opacity: 0.8;
}

#build-menu {
    display: flex;
    align-items: center;
    margin-left: 0px;
}

#main-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: 100vw;
    height: calc(100vh - 128px);
    overflow: hidden;
}

#canvas-container {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 16px;
    background-color: transparent;
}

#gameCanvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    background-color: #055b15;
}

#game-ui {
    width: 140px;
    min-width: 140px;
    max-width: 200px;
    height: 100%;
    padding: 32px 20px 20px 20px;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 32px;
    background-color: transparent;
}

button {
    padding: 10px 0;
    background-color: #3498db;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

#build-tower {
    width: 120px;
    height: auto;
    display: block;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s;
}

#build-tower:hover {
    transform: scale(1.05);
}

#build-tower img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

#game-mask {
    position: fixed;
    z-index: 9999;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}
#game-mask:not(.mask-visible) {
    opacity: 0;
    pointer-events: none;
}
.mask-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
}
.mask-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 12px;
}
.mask-title {
    color: #eaff5a;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 8px;
    letter-spacing: 4px;
}
.mask-desc {
    color: #fff;
    font-size: 1.5rem;
    letter-spacing: 2px;
}
#start-game-btn {
    margin-top: 32px;
    background: #baff5a;
    color: #222;
    font-size: 1.5rem;
    border: none;
    border-radius: 32px;
    padding: 12px 64px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: background 0.2s;
}
#start-game-btn:hover {
    background: #eaff5a;
}