html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: 'Google Sans Code', monospace;
    background: linear-gradient(135deg, #1a1a2e, #2d1b4e);
}

body {
    display: flex;
    flex-direction: column;
}

/* Canvas editors (tileEditor, mapEditor, etc.) add this class to body */
body.canvas-editor {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

#main-canvas {
    flex: 1;
    display: block;
    width: 100%;
}

.banner {
    display: grid;
    grid-template-columns: 1fr 4fr 1fr;
    width: 100%;
    background: #1e1e1e;
    border-bottom: 2px solid #c9a84c;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    align-items: center;
}

.banner > div {
    padding: 16px 20px;
    text-align: center;
}

.banner h1, .banner h3 {
    color: #c9a84c;
    margin: 0;
}

#pagetitle a {
    color: inherit;
    text-decoration: none;
}

#pagetitle a:hover {
    text-decoration: none;
}

#toprightbox a {
    color: #c9a84c;
    text-decoration: none;
    font-size: 0.95rem;
}

#toprightbox a:hover {
    text-decoration: underline;
}

#user-display {
    color: #c9a84c;
    font-size: 0.95rem;
}

#toprightbox a#logout-link {
    color: #a67fd8;
    font-size: 0.8rem;
    text-decoration: none;
    transition: color 0.2s;
}

#toprightbox a#logout-link:hover {
    color: #c9a84c;
}


.linkbar {
    display: flex;
    justify-content: space-evenly;
    background: #1a1a1a;
    border-bottom: 1px solid #4a2d7a;
    padding: 0;
    overflow: visible;
    position: relative;
    z-index: 50;
}

.dropdown {
    position: relative;
    display: flex;
    align-items: stretch;
}

.dropdown-label {
    display: flex;
    align-items: center;
    color: #cccccc;
    padding: 10px 20px;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    cursor: default;
    user-select: none;
    white-space: nowrap;
}

.dropdown:hover .dropdown-label {
    color: #c9a84c;
    border-bottom-color: #c9a84c;
}

.dropdown-menu {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 0;
    background: #1a1a1a;
    border: 1px solid #4a2d7a;
    border-top: none;
    min-width: 160px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    transition: opacity 0.15s, visibility 0.15s;
}

.dropdown:hover .dropdown-menu,
.dropdown.open .dropdown-menu {
    visibility: visible;
    opacity: 1;
}

.dropdown-menu a {
    color: #cccccc;
    text-decoration: none;
    padding: 9px 20px;
    font-size: 0.9rem;
    border-left: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    color: #c9a84c;
    border-left-color: #c9a84c;
    background: #222;
}

/* Right-align the last dropdown so long items don't overflow off the right edge */
.linkbar .dropdown:last-child .dropdown-menu {
    left: auto;
    right: 0;
}

