html {
    position: relative;
    min-height: 100%;
}

:root {
    --dd-bg: #171b23;
    --dd-bg-elev-1: #232a36;
    --dd-bg-elev-2: #2f3746;
    --dd-border: #5c677a;
    --dd-text: #E0E0E0;
    --dd-text-muted: #c8c8c8;
    --dd-link: #86b8ff;
    --dd-link-hover: #b2d3ff;
    --dd-primary: #3d82f6;
    --dd-primary-hover: #2f71df;
    --dd-success: #41c38a;
    --dd-danger: #ff5d73;
    --dd-warning: #f9bb45;
    --dd-shadow: 0 12px 24px rgba(10, 18, 34, 0.32);
}

body {
    background: radial-gradient(circle at top, #2a303b 0%, #1d232d 45%, #141922 100%);
    color: var(--dd-text);
}

a {
    color: var(--dd-link);
}

a:hover,
a:focus {
    color: var(--dd-link-hover);
}

.text-muted {
    color: var(--dd-text-muted);
}

hr {
    border-top-color: rgba(159, 178, 207, 0.2);
}

.defense,
.tower {
    width: 35px;
    height: 35px;
    cursor: pointer;
}

.beam {
    width: auto;
    height: auto;
}

.defense-placeholder {
    height: 35px;
    display: inline-block;
    vertical-align: top;
    text-align: center;
    line-height: 35px;
    padding: 0;
}

#canvas > img {
    max-width: 1024px;
}

.tower-container {
    position: relative;
    display: inline-block;
}

.placed > img {
    max-height: 100%;
}

.placed:hover + .menu,
.tower-container.placed:hover .menu,
.menu:hover {
    display: block;
    transition-delay: 0s;
}

.tower-container.placed::before {
    content: '';
    position: absolute;
    left: 0;
    top: -16px;
    width: 100%;
    height: 24px;
}

.menu {
    height: 20px;
    display: none;
    z-index: 20;
    cursor: pointer;
    position: absolute;
    top: -20px;
    left: 11px;
    transition: 0.2s 1s;
}

.aura {
    width: 100px;
    height: 100px;
    line-height: 100px;
    opacity: 0.8;
}

.trap {
    width: 45px;
    height: 45px;
    line-height: 45px;
}

.pool {
    opacity: 1;
}

.description {
    background-color: var(--dd-bg-elev-2);
    border: 1px solid var(--dd-border);
    color: var(--dd-text);
}

.arrow.placed {
    width: 80px;
    height: 80px;
    line-height: 80px;
}

.disablecheckbox {
    width: 64px;
    height: 64px;
    line-height: 64px;
}

.pagination > li > a,
.pagination > li > span,
.pagination a {
    color: var(--dd-text-muted);
    background: var(--dd-bg-elev-1);
    border-color: var(--dd-border);
    transition: background-color .3s;
}

.pagination > .active > a,
.pagination > .active > a:focus,
.pagination > .active > a:hover,
.pagination a.active {
    background-color: var(--dd-primary);
    border-color: var(--dd-primary);
    color: #E0E0E0;
}

.pagination > li > a:hover,
.pagination > li > span:hover,
.pagination a:hover:not(.active) {
    background-color: var(--dd-bg-elev-2);
    color: #E0E0E0;
}

.ddmap {
    width: 1024px;
    height: 1024px;
}



.build-editor-scale-tools-inline {
    margin-top: 6px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
}

.build-editor-scale-label {
    margin: 0;
    font-weight: 600;
}

.build-editor-scale-toggle-inline {
    margin: 0;
    font-weight: 600;
}

#mapscaleadjustment {
    width: 110px;
}

.build-editor-arrow-tools-inline {
    margin-top: 8px;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
}

.build-editor-arrow-toggle-inline {
    margin: 0;
    font-weight: 600;
}

#arrowmodecolor {
    width: 130px;
    display: inline-block;
    height: 26px;
    padding: 2px 6px;
}

.facing-arrow-linked {
    opacity: 0.95;
    pointer-events: none;
}

.facing-arrow-linked .menu {
    display: none !important;
}

.facing-arrow-linked .placed {
    z-index: 1;
}
.first-box,
.second-box,
.third-box,
.fourth-box {
    padding: 35px;
    border-radius: 8px;
}

.first-box {
    background: #22795b;
}

.second-box {
    background: #2a5ca6;
}

.third-box {
    background: #904364;
}

.fourth-box {
    background: #2f6f7f;
}

.portfolio-item {
    margin-bottom: 25px;
}

#toTop-right,
#toTop-left,
#toTop-center {
    display: none;
    text-decoration: none;
    position: fixed;
    outline: none;
}

#toTop-right {
    bottom: 20px;
    right: 20px;
}

#toTop-left {
    bottom: 20px;
    left: 20px;
}

#toTop-center {
    bottom: 10px;
    left: 50%;
    margin-left: -20px;
}

.dropbtn {
    color: #E0E0E0;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--dd-bg-elev-1);
    border: 1px solid var(--dd-border);
    box-shadow: var(--dd-shadow);
    z-index: 1;
}

.dropdown-content a {
    color: var(--dd-text);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .dropbtn {
    background-color: var(--dd-bg-elev-2);
}

.panel-shadow {
    box-shadow: var(--dd-shadow);
}

.panel,
.well,
.thumbnail,
.jumbotron,
.modal-content,
.popover,
.list-group-item,
.panel-white {
    border-color: var(--dd-border);
    background: var(--dd-bg-elev-1);
    color: var(--dd-text);
    box-shadow: var(--dd-shadow);
}

.panel a,
.well a,
.thumbnail a,
.jumbotron a {
    color: #a9ceff;
}

.panel a:hover,
.well a:hover,
.thumbnail a:hover,
.jumbotron a:hover {
    color: #d4e7ff;
}

.panel-default > .panel-heading,
.panel-white .panel-heading,
.modal-header,
.modal-footer,
.panel-footer,
.panel-white .panel-footer {
    border-color: var(--dd-border);
    background: var(--dd-bg-elev-2);
    color: var(--dd-text);
}

.table {
    color: var(--dd-text);
}

.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
    border-top-color: rgba(159, 178, 207, 0.22);
}

.table > thead > tr > th {
    border-bottom-color: rgba(159, 178, 207, 0.3);
    color: #d2def0;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(16, 26, 43, 0.68);
}

.table-hover > tbody > tr:hover {
    background-color: rgba(29, 46, 73, 0.78);
}

.form-control,
.input-group-addon,
select,
textarea {
    background: #1b2029;
    border-color: var(--dd-border);
    color: var(--dd-text);
}

.form-control:focus,
select:focus,
textarea:focus {
    border-color: #8d9ab3;
    box-shadow: 0 0 0 2px rgba(141, 154, 179, 0.25);
}

.form-control::-webkit-input-placeholder {
    color: #9ea7b9;
}

.form-control::-moz-placeholder {
    color: #9ea7b9;
}

.form-control:-ms-input-placeholder {
    color: #9ea7b9;
}

.btn-default {
    background: #2a4265;
    border-color: var(--dd-border);
    color: #d8e6ff;
}

.btn-default:hover,
.btn-default:focus {
    background: #36537f;
    border-color: #47699a;
    color: #fff;
}

.btn-primary {
    background: var(--dd-primary);
    border-color: var(--dd-primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    background: var(--dd-primary-hover);
    border-color: var(--dd-primary-hover);
}

.btn-success {
    background: #2da56e;
    border-color: #2da56e;
}

.btn-danger {
    background: #cc4b5f;
    border-color: #cc4b5f;
}

.alert {
    border-width: 1px;
}

.alert-success {
    color: #d8ffe8;
    background-color: rgba(41, 119, 83, 0.45);
    border-color: rgba(66, 188, 132, 0.4);
}

.alert-info {
    color: #d5eaff;
    background-color: rgba(28, 84, 143, 0.45);
    border-color: rgba(91, 170, 247, 0.35);
}

.alert-warning {
    color: #fff3d2;
    background-color: rgba(140, 105, 41, 0.45);
    border-color: rgba(243, 184, 75, 0.38);
}

.alert-danger {
    color: #ffd9df;
    background-color: rgba(137, 48, 66, 0.5);
    border-color: rgba(230, 107, 133, 0.35);
}

.navbar-inverse {
    background-color: rgba(24, 30, 41, 0.95);
    border-color: #3f4c63;
    box-shadow: 0 8px 20px rgba(9, 16, 30, 0.35);
}

.navbar-inverse .navbar-brand,
.navbar-inverse .navbar-nav > li > a {
    height: 50px;
    padding-top: 15px;
    padding-bottom: 15px;
    line-height: 20px;
    color: #fff;
}


.navbar-inverse .navbar-brand:hover,
.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .open > a:hover,
.navbar-inverse .navbar-nav > .open > a:focus,
.navbar-inverse .navbar-nav > .active > a,
.navbar-inverse .navbar-nav > .active > a:hover,
.navbar-inverse .navbar-nav > .active > a:focus {
    background-color: rgba(76, 88, 112, 0.65);
    color: #E0E0E0;
}

.navbar-inverse .dropdown-menu {
    background: #2a3344;
    border-color: var(--dd-border);
}

.navbar-inverse .dropdown-menu > li > a {
    color: #d6e3f8;
}

.navbar-inverse .dropdown-menu > li > a:hover,
.navbar-inverse .dropdown-menu > li > a:focus {
    background: #3c485f;
    color: #E0E0E0;
}

.navbar-inverse .navbar-nav.navbar-right > li > a.steam-login-link {
    display: flex;
    align-items: center;
    height: 50px;
    padding-top: 0;
    padding-bottom: 0;
}

.navbar-inverse .navbar-nav.navbar-right > li > a.steam-login-link > img,
.navbar-inverse .navbar-nav.navbar-right > li > a > img.steam-login-image {
    display: block;
    margin: 0;
    max-height: 30px;
    width: auto;
    vertical-align: middle;
}

.navbar.navbar-fixed-top {
    margin-bottom: 0;
}

.list-group {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--dd-border);
    box-shadow: var(--dd-shadow);
}

.list-group-item {
    background: var(--dd-bg-elev-1);
    color: var(--dd-text);
    border-color: rgba(182, 200, 228, 0.2);
}

a.list-group-item,
button.list-group-item {
    color: var(--dd-text);
}

a.list-group-item:hover,
a.list-group-item:focus,
button.list-group-item:hover,
button.list-group-item:focus {
    background: var(--dd-bg-elev-2);
    color: #E0E0E0;
}

.page-header {
    border-bottom-color: rgba(182, 200, 228, 0.3);
}

.page-header small {
    color: #bdd0ec;
}

.portfolio-item > a {
    display: block;
    padding: 12px;
    border: 1px solid var(--dd-border);
    border-radius: 10px;
    background: var(--dd-bg-elev-1);
    box-shadow: var(--dd-shadow);
    color: #d8e6fb;
    text-decoration: none;
}

.portfolio-item > a:hover,
.portfolio-item > a:focus {
    background: var(--dd-bg-elev-2);
    color: #E0E0E0;
}

.portfolio-item .img-responsive {
    margin-top: 10px;
    border-radius: 8px;
    background: rgba(12, 23, 40, 0.25);
    border: 1px solid rgba(182, 200, 228, 0.2);
}

.post .post-heading {
    height: 95px;
    padding: 20px 15px;
}

.post .post-heading .avatar {
    width: 60px;
    height: 60px;
    display: block;
    margin-right: 15px;
}

.post .post-heading .meta .title {
    margin-bottom: 0;
}

.post .post-heading .meta .title a {
    color: var(--dd-link);
}

.post .post-heading .meta .title a:hover {
    color: var(--dd-link-hover);
}

.post .post-heading .meta .time {
    margin-top: 8px;
    color: var(--dd-text-muted);
}

.post .post-image .image {
    width: 100%;
    height: auto;
}

.post .post-description {
    padding: 15px;
}

.post .post-description p {
    font-size: 14px;
}

.post .post-description .stats {
    margin-top: 20px;
}

.post .post-description .stats .stat-item {
    display: inline-block;
    margin-right: 15px;
}

.post .post-description .stats .stat-item .icon {
    margin-right: 8px;
}

.post .post-footer {
    border-top: 1px solid var(--dd-border);
    padding: 15px;
}

.post .post-footer .input-group-addon a {
    color: #c5d4ea;
}

.post .post-footer .comments-list {
    padding: 0;
    margin-top: 20px;
    list-style-type: none;
}

.post .post-footer .comments-list .comment {
    display: block;
    width: 100%;
    margin: 20px 0;
}

.post .post-footer .comments-list .comment .avatar {
    width: 35px;
    height: 35px;
}

.post .post-footer .comments-list .comment .comment-heading {
    display: block;
    width: 100%;
}

.post .post-footer .comments-list .comment .comment-heading .user {
    font-size: 14px;
    font-weight: bold;
    display: inline;
    margin-top: 0;
    margin-right: 10px;
}

.post .post-footer .comments-list .comment .comment-heading .time {
    font-size: 12px;
    color: #8fa2bf;
    margin-top: 0;
    display: inline;
}

.post .post-footer .comments-list .comment .comment-body {
    margin-left: 50px;
}

.post .post-footer .comments-list .comment > .comments-list {
    margin-left: 50px;
}

.disabledlink {
    pointer-events: none;
    cursor: not-allowed;
}

.vote-selected {
    cursor: pointer !important;
    opacity: 1;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2) inset, 0 0 10px rgba(255, 255, 255, 0.14);
}

#upvote.vote-selected,
.js-upvote.vote-selected {
    background-color: #5cb85c;
    border-color: #4cae4c;
    color: #fff;
}

.js-downvote.vote-selected {
    background-color: #d9534f;
    border-color: #d43f3a;
    color: #fff;
}

/* Page-level polish for dark redesign */

.notifications-page .container,
.new-list-page .container,
.my-builds-page .container {
    margin-top: 0;
}

.notifications-page .alert {
    border-radius: 8px;
    box-shadow: var(--dd-shadow);
}

.notifications-page .alert .alert-link,
.notifications-page .alert a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}

.notifications-page .alert .alert-link:hover,
.notifications-page .alert .alert-link:focus,
.notifications-page .alert a:hover,
.notifications-page .alert a:focus {
    color: #fff;
    text-decoration: underline;
}

.new-list-page .grid-toolbar,
.my-builds-page .grid-toolbar {
    border-radius: 8px;
}
.contact-page .container,
.maps-page .container,
.list-page-shell .container {
    margin-top: 0;
}

.contact-page h1,
.maps-page .page-header,
.list-page-shell .list-page-title {
    letter-spacing: 0.2px;
}

.contact-page .row.text-center {
    margin-top: 14px;
}

.contact-page-wrap {
    margin-top: 16px;
    margin-bottom: 32px;
}

.contact-page .contact-hero {
    margin-bottom: 20px;
    padding: 24px 20px;
    border: 1px solid rgba(182, 200, 228, 0.24);
    border-radius: 10px;
    background: linear-gradient(180deg, #3a414e 0%, #343a46 100%);
    box-shadow: 0 12px 24px rgba(9, 16, 30, 0.3);
}

.contact-page .contact-hero h1 {
    margin-top: 0;
    margin-bottom: 8px;
}

.contact-page .contact-hero p {
    margin: 0 auto;
    max-width: 720px;
    color: #dce8fa;
    font-size: 16px;
    line-height: 1.55;
}

.contact-page .contact-channel-grid {
    margin-bottom: 14px;
}

.contact-page .contact-channel-grid > div {
    margin-bottom: 16px;
}

.contact-page .contact-channel {
    display: block;
    min-height: 230px;
    padding: 18px 16px;
    border: 1px solid rgba(182, 200, 228, 0.22);
    border-radius: 10px;
    background: linear-gradient(180deg, #3a404b 0%, #323741 100%);
    box-shadow: var(--dd-shadow);
    color: inherit;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.contact-page .contact-channel:hover,
.contact-page .contact-channel:focus {
    color: inherit;
    text-decoration: none;
    transform: translateY(-3px);
    border-color: rgba(200, 217, 243, 0.42);
    box-shadow: 0 14px 28px rgba(9, 16, 30, 0.35);
}

.contact-page .contact-channel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: 58px;
    height: 58px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: rgba(9, 16, 30, 0.42);
    font-size: 34px;
}

.contact-page .contact-channel-icon img {
    width: 34px;
    height: 34px;
}

.contact-page .contact-channel h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 22px;
}

.contact-page .contact-channel p {
    margin: 0;
    color: #dce8fa;
    line-height: 1.45;
}

.contact-page .contact-note {
    padding: 18px 22px;
    border: 1px solid rgba(182, 200, 228, 0.2);
    border-radius: 10px;
    background: rgba(30, 38, 51, 0.82);
}

.contact-page .contact-note h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 24px;
}

.contact-page .contact-note ul {
    margin-bottom: 0;
    padding-left: 20px;
    color: #dce8fa;
}

.contact-page .contact-note li {
    margin-bottom: 6px;
}

.contact-page .contact-note li:last-child {
    margin-bottom: 0;
}

@media (max-width: 767px) {
    .contact-page .contact-hero {
        padding: 20px 16px;
    }

    .contact-page .contact-hero p {
        font-size: 15px;
    }

    .contact-page .contact-channel {
        min-height: 0;
    }
}

.maps-page .list-group {
    margin-bottom: 28px;
}

.maps-page .list-group-item {
    font-weight: 600;
}

.maps-page .page-header {
    margin-top: 15px;
    margin-bottom: 16px;
}

.maps-page .portfolio-item > a {
    min-height: 238px;
}

.maps-page .portfolio-item {
    margin-bottom: 18px;
}

.maps-page .portfolio-item .img-responsive {
    max-height: 170px;
    margin-left: 0;
    margin-right: 0;
    object-fit: contain;
}

.build-editor-page .row {
    margin-bottom: 8px;
}

.build-editor-page .nav-tabs {
    border-bottom-color: rgba(182, 200, 228, 0.22);
    margin-top: 8px;
}

.build-editor-page .nav-tabs > li > a {
    color: #dce8fa;
    background: #2f394c;
    border: 1px solid #4a576e;
    margin-right: 5px;
    padding: 10px 16px;
}

.build-editor-page .nav-tabs > li > a:hover,
.build-editor-page .nav-tabs > li > a:focus,
.build-editor-page .nav-tabs > li.active > a,
.build-editor-page .nav-tabs > li.active > a:hover,
.build-editor-page .nav-tabs > li.active > a:focus {
    color: #E0E0E0;
    background: #3a465c;
    border-color: #58657d;
}

.build-editor-page .tab-content {
    border: 1px solid #435067;
    background: rgba(35, 42, 55, 0.78);
    border-radius: 0 0 8px 8px;
    padding: 12px 10px 16px;
}

.build-editor-page .canvas {
    padding: 12px;
    border: 1px solid #435067;
    border-radius: 8px;
    background: rgba(28, 34, 46, 0.65);
    box-shadow: var(--dd-shadow);
    overflow-x: auto;
}

.build-editor-page .panel-heading {
    font-weight: 700;
}

.build-editor-page .panel-heading label {
    margin-bottom: 0;
    font-weight: 600;
    color: #cfe0f8;
}

.build-editor-page .front-tower,
.build-editor-page .back-tower {
    margin-left: 5px;
    padding: 2px 8px;
    border: 1px solid #58657d;
    border-radius: 4px;
    background: #434e63;
    color: #eef5ff;
    font-size: 12px;
}

.build-editor-page .front-tower:hover,
.build-editor-page .back-tower:hover {
    background: #55627a;
}

.build-editor-page .radio-inline,
.build-editor-page .checkbox {
    color: #d4e3f9;
}

.build-editor-page .table caption {
    color: #cfe0f8;
}

.build-editor-page .btn {
    box-shadow: 0 4px 10px rgba(9, 16, 30, 0.22);
}

.build-editor-page .cke_chrome {
    border-color: #4a576e !important;
    box-shadow: var(--dd-shadow);
}

.build-editor-page .cke_top,
.build-editor-page .cke_bottom {
    background: #313b4e !important;
    border-color: #4a576e !important;
}

.build-editor-page .cke_contents {
    background: #252b37;
}

.maps-page .map-card-link {
    display: block;
    text-align: center;
}

.maps-page .map-card-name {
    display: block;
    margin-bottom: 10px;
    color: #E0E0E0;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}

.maps-page .map-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding: 0 2px;
    gap: 8px;
}

.maps-page .map-card-du {
    color: #d0d4dd;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.maps-page .map-card-builds {
    display: inline-block;
    padding: 2px 9px;
    border: 1px solid #5b6578;
    border-radius: 999px;
    background: rgba(58, 66, 82, 0.7);
    color: #E0E0E0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.maps-page .map-card-builds:hover,
.maps-page .map-card-builds:focus {
    color: #fff;
    border-color: #778196;
    background: rgba(74, 84, 102, 0.85);
    text-decoration: none;
}

.build-editor-page h1,
.build-editor-page h2,
.build-editor-page h3,
.build-editor-page h4,
.build-editor-page h5,
.build-editor-page label,
.build-editor-page .nav-tabs > li > a,
.build-editor-page .panel,
.build-editor-page .panel-heading,
.build-editor-page .panel-body,
.build-editor-page .text-center {
    color: #E0E0E0;
}

.build-editor-page #curDU,
.build-editor-page #curMU,
.build-editor-page #maxDU,
.build-editor-page #maxMU {
    color: #E0E0E0;
}

.build-editor-page .panel,
.build-editor-page .panel-default > .panel-heading {
    background: #303642;
    border-color: #5d677b;
}

.build-editor-page .tab-content {
    border-color: #4c566a;
    background: rgba(46, 52, 64, 0.85);
}

.build-editor-page .canvas {
    background: rgba(52, 59, 71, 0.78);
    border-color: #596378;
}

.build-editor-page .ddmap {
    background: rgba(35, 40, 49, 0.4);
    border-radius: 6px;
}

.build-editor-page .disablecheckbox {
    border-radius: 4px;
    background: rgba(36, 42, 53, 0.58);
}

.build-editor-page .cke_chrome {
    border-color: #5b6578 !important;
    background: #303745 !important;
}

.build-editor-page .cke_top,
.build-editor-page .cke_bottom,
.build-editor-page .cke_toolgroup,
.build-editor-page .cke_combo_button,
.build-editor-page .cke_button {
    background: #394152 !important;
    border-color: #596176 !important;
}

.build-editor-page .cke_button_icon {
    filter: brightness(0) invert(0.92);
}

.build-editor-page .cke_button:hover,
.build-editor-page .cke_button:focus,
.build-editor-page .cke_button_on,
.build-editor-page .cke_combo_button:hover,
.build-editor-page .cke_combo_button:focus {
    background: #4b5569 !important;
    border-color: #6c768a !important;
}

.build-editor-page .cke_button:hover .cke_button_icon,
.build-editor-page .cke_button:focus .cke_button_icon,
.build-editor-page .cke_button_on .cke_button_icon {
    filter: brightness(0) invert(1);
}

.build-editor-page .cke_combo_text,
.build-editor-page .cke_combo_open,
.build-editor-page .cke_toolgroup a.cke_button,
.build-editor-page .cke_toolgroup .cke_button_label {
    color: #E0E0E0 !important;
}

/* Build editor UX polish */
.build-editor-page .build-editor-header-row {
    margin: 4px 0 10px;
    padding: 10px 8px 8px;
    border: 1px solid #556074;
    border-radius: 8px;
    background: linear-gradient(180deg, #313846 0%, #2d3441 100%);
}

.build-editor-page .build-editor-map-meta h3,
.build-editor-page .build-editor-author-meta h3,
.build-editor-page .build-editor-resource-meta h3 {
    margin-top: 8px;
    margin-bottom: 6px;
    font-size: 18px;
    font-weight: 600;
}

.build-editor-page .build-editor-title {
    margin-top: 4px;
    margin-bottom: 4px;
    font-size: 22px;
    line-height: 1.3;
}

.build-editor-page .build-editor-resources {
    display: inline-block;
    padding: 5px 10px;
    border: 1px solid #5f697d;
    border-radius: 6px;
    background: rgba(45, 52, 64, 0.8);
}

.build-editor-page .resource-divider {
    margin: 0 9px;
    color: #9ca6ba;
}

.build-editor-page .build-editor-map-toggle-icon {
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
}

.build-editor-page .build-editor-map-toggle-icon img,
.build-editor-page img.build-editor-map-toggle-icon {
    height: 20px;
    width: auto;
}

.build-editor-page .build-editor-map-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    margin-bottom: 0;
    padding: 4px 10px;
    border: 1px solid #7f8aa2;
    border-radius: 6px;
    background: rgba(68, 82, 106, 0.7);
    box-shadow: inset 0 0 0 1px rgba(22, 28, 39, 0.45), 0 0 0 1px rgba(125, 143, 177, 0.2);
    font-size: 13px;
    font-weight: 600;
    color: #edf5ff;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.build-editor-page .build-editor-map-toggle-label:hover {
    background: rgba(80, 96, 124, 0.8);
    border-color: #95a8ca;
}

.build-editor-page .build-editor-map-toggle-label.is-active {
    background: rgba(72, 109, 164, 0.85);
    border-color: #a9c8ff;
    box-shadow: inset 0 0 0 1px rgba(19, 45, 82, 0.45), 0 0 10px rgba(96, 148, 230, 0.35);
}

.build-editor-page .build-editor-map-toggle-label input[type="checkbox"] {
    margin: 0;
    transform: scale(1.1);
}

.build-editor-page .build-editor-tabs-row {
    margin-bottom: 8px;
}

.build-editor-page .build-editor-tabs {
    display: flex;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: thin;
}

.build-editor-page .build-editor-tabs > li {
    float: none;
    display: inline-block;
}

.build-editor-page .build-editor-tabs > li > a {
    border-radius: 4px 4px 0 0;
}

.build-editor-page .build-editor-tabs > li.waves-separator {
    width: 1px;
    height: 24px;
    margin: 0 10px;
    background: #5f697d;
    opacity: 0.8;
}

.build-editor-page .build-editor-tabs > li.waves-separator > a {
    display: none;
}

.build-editor-page .build-editor-canvas-col {
    padding-right: 10px;
}

.build-editor-page .build-editor-sidebar-col {
    padding-left: 10px;
}

.build-editor-page .canvas {
    min-height: clamp(520px, 72vh, 980px);
    background: #303642;
    border-color: #556074;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.build-editor-page .canvas-content {
    position: relative;
    display: inline-block;
    transform-origin: top left;
}

.build-editor-page .tower-container.defense img,
.build-editor-page .tower-container.placed img {
    -webkit-user-drag: none;
    user-select: none;
}

.build-editor-page .tower-container.touch-dragging {
    opacity: 0.92;
}

.build-editor-page .canvas.thumbnail-capture {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    min-height: 0;
    text-align: left;
}

.build-editor-page .canvas.thumbnail-capture .ddmap {
    background: transparent;
    border-radius: 0;
}

.build-editor-page .canvas.thumbnail-capture .canvas-content {
    zoom: 1 !important;
    transform: none !important;
    transform-origin: top left !important;
    display: block;
    width: auto !important;
    margin: 0 !important;
}

.build-editor-page .build-editor-sidebar-col .panel {
    margin-bottom: 12px;
}


.build-editor-page .hero-pool-grid {
    display: flex;
    flex-wrap: wrap;
    margin-left: -6px;
    margin-right: -6px;
}

.build-editor-page .hero-pool-grid .hero-pool-item {
    width: 100%;
    padding-left: 6px;
    padding-right: 6px;
    margin-bottom: 12px;
}

.build-editor-page .hero-pool-grid .hero-pool-item.hero-pool-item-wide {
    width: 100%;
}


.build-editor-page .hero-pool-grid .hero-pool-item:not(.hero-pool-item-monk):not(.hero-pool-item-huntress):not(.hero-pool-item-arrow) .panel-body {
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.build-editor-page .hero-pool-grid .hero-pool-item:not(.hero-pool-item-monk):not(.hero-pool-item-huntress):not(.hero-pool-item-arrow) .defense-placeholder {
    float: none;
    width: auto;
    margin: 0;
    height: 40px;
    line-height: 40px;
    flex: 0 0 auto;
}

.build-editor-page .hero-pool-grid .hero-pool-item:not(.hero-pool-item-monk):not(.hero-pool-item-huntress):not(.hero-pool-item-arrow) .tower.pool {
    width: 38px;
    height: 38px;
}

@media (min-width: 1200px) {
    .build-editor-page .hero-pool-grid .hero-pool-item {
        width: 50%;
    }

    .build-editor-page .hero-pool-grid .hero-pool-item.hero-pool-item-wide {
        width: 100%;
    }
}

@media (min-width: 1600px) {
    .build-editor-page .hero-pool-grid .hero-pool-item {
        width: 33.3333%;
    }

    .build-editor-page .hero-pool-grid .hero-pool-item.hero-pool-item-wide {
        width: 66.6666%;
    }
}

@media (min-width: 2560px) {
    .build-editor-page .hero-pool-grid .hero-pool-item {
        width: 25%;
    }

    .build-editor-page .hero-pool-grid .hero-pool-item.hero-pool-item-wide {
        width: 50%;
    }
}

@media (min-width: 1600px) {
    .build-editor-page .hero-pool-grid .hero-pool-item.hero-pool-item-monk {
        width: 66.6666%;
    }

    .build-editor-page .hero-pool-item-monk .panel-body {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }

    .build-editor-page .hero-pool-item-monk .defense-placeholder {
        float: none;
        width: auto;
        margin: 0;
        padding-left: 0;
        padding-right: 0;
        min-height: 0;
        flex: 0 0 auto;
    }
}

@media (min-width: 2560px) {
    .build-editor-page .hero-pool-grid .hero-pool-item.hero-pool-item-monk {
        width: 75%;
    }

    .build-editor-page .hero-pool-item-monk .panel-body {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: flex-start;
    }
}

.build-editor-page .tower-filter-help {
    margin-bottom: 10px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.build-editor-page .tower-filter-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.build-editor-page .tower-filter-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: 50px;
    height: 50px;
    border: 1px solid #566074;
    border-radius: 7px;
    background: rgba(41, 48, 60, 0.9);
    overflow: hidden;
    cursor: pointer;
}

.build-editor-page .tower-filter-icon .disableckbx {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.build-editor-page .tower-filter-icon .disablecheckbox {
    width: 40px;
    height: 40px;
    background: none;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.build-editor-page .tower-filter-icon .disableckbx:checked + .disablecheckbox {
    filter: grayscale(0.85) brightness(0.7);
    transform: scale(0.95);
}

.build-editor-page .build-details-panel .details-group {
    margin-bottom: 12px;
}

.build-editor-page .build-details-panel .details-group:last-child {
    margin-bottom: 0;
}

.build-editor-page .build-details-panel .detail-highlight {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 20px;
}

.build-editor-page .build-details-panel .more-builds-link {
    margin-top: 14px;
    margin-bottom: 0;
    padding-top: 10px;
    border-top: 1px solid #556074;
}

.build-editor-page .build-editor-description-row {
    margin-top: 8px;
}

.build-editor-page .build-editor-description-inline {
    margin-top: 10px;
}

.build-editor-page .build-editor-description-inline .panel {
    margin-bottom: 0;
}

.build-editor-page .build-description-panel {
    margin-top: 0;
}

.build-editor-page .build-description-body {
    line-height: 1.7;
}

.build-editor-page .description-content p {
    margin-bottom: 12px;
}

.build-editor-page .comments-pane-container {
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 1199px) {
    .build-editor-page .build-editor-title {
        font-size: 20px;
    }

    .build-editor-page .build-editor-map-meta h3,
    .build-editor-page .build-editor-author-meta h3,
    .build-editor-page .build-editor-resource-meta h3 {
        font-size: 17px;
    }
}

@media (max-width: 991px) {
    .build-editor-page .build-editor-canvas-col,
    .build-editor-page .build-editor-sidebar-col {
        padding-left: 15px;
        padding-right: 15px;
    }

    .build-editor-page .canvas {
        min-height: 460px;
        padding: 8px;
    }

    .build-editor-page .build-editor-tabs > li.waves-separator {
        display: none;
    }
}


@media (max-width: 1199px) {
    .build-editor-page .build-editor-header-row {
        padding: 12px 10px;
    }

    .build-editor-page .build-editor-map-meta,
    .build-editor-page .build-editor-title-col,
    .build-editor-page .build-editor-author-meta,
    .build-editor-page .build-editor-resource-meta {
        margin-bottom: 10px;
    }
}

@media (max-width: 767px) {
    .build-editor-page .build-editor-header-row {
        margin-left: 0;
        margin-right: 0;
    }

    .build-editor-page .build-editor-map-meta h3,
    .build-editor-page .build-editor-author-meta h3,
    .build-editor-page .build-editor-resource-meta h3 {
        font-size: 15px;
    }

    .build-editor-page .build-editor-title-col label,
    .build-editor-page .build-editor-author-meta label {
        display: block;
        margin-bottom: 4px;
    }

    .build-editor-page .build-editor-scale-tools-inline,
    .build-editor-page .build-editor-arrow-tools-inline {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }
}

@media (min-width: 1920px) {
    .build-editor-page .canvas {
        min-height: clamp(760px, 78vh, 1400px);
    }

    .build-editor-page .build-editor-sidebar-col .panel {
        margin-bottom: 14px;
    }
}

@media (min-width: 3000px) {
    .build-editor-page {
        font-size: 16px;
    }

    .build-editor-page .build-editor-title {
        font-size: 28px;
    }

    .build-editor-page .build-editor-map-meta h3,
    .build-editor-page .build-editor-author-meta h3,
    .build-editor-page .build-editor-resource-meta h3 {
        font-size: 22px;
    }

    .build-editor-page .canvas {
        min-height: clamp(900px, 80vh, 1700px);
    }
}


.build-editor-page .canvas.viewer-canvas {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
}

.build-editor-page .canvas-content.viewer-canvas-content {

    margin-left: 0;
    margin-right: 0;
}

.build-editor-page .build-editor-canvas-col {
    padding-right: 6px;
}

.build-editor-page .build-editor-sidebar-col {
    padding-left: 6px;
}

.build-editor-page .tower-container.hint-marker {
    cursor: zoom-in;
}

.build-editor-page .tower-container.hint-marker .hint-click-label {
    position: absolute;
    left: 50%;
    top: -24px;
    transform: translateX(-50%);
    z-index: 40;
    font-size: 10px;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 10px;
    background: rgba(17, 34, 56, 0.9);
    border: 1px solid rgba(88, 162, 216, 0.75);
    color: #d9ecff;
    white-space: nowrap;
    pointer-events: auto;
    cursor: zoom-in;
}

.build-editor-page .tower-container.hint-marker.active-hint-marker .hint-click-label {
    background: rgba(23, 86, 132, 0.95);
    border-color: rgba(120, 221, 255, 0.9);
}

.build-editor-page .tower-container.hint-marker.active-hint-marker > .placed > img,
.build-editor-page .tower-container.hint-marker.active-hint-marker > img.placed {
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.45), 0 0 8px rgba(56, 189, 248, 0.2);
    border-radius: 50%;
}


.build-editor-page .tower-container.nearby-hint-tower > .placed > img,
.build-editor-page .tower-container.nearby-hint-tower > img.placed {
    box-shadow: 0 0 0 1px rgba(129, 216, 255, 0.45), 0 0 8px rgba(129, 216, 255, 0.2);
    border-radius: 50%;
}

.build-editor-page .hint-nearby-overlay {
    position: absolute;
    z-index: 12;
    min-width: 260px;
    max-width: 340px;
    max-height: 220px;
    overflow-y: auto;
    overflow-x: hidden;
    background: rgba(20, 28, 43, 0.92);
    border: 1px solid rgba(123, 144, 173, 0.6);
    border-radius: 8px;
    padding: 8px 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    pointer-events: auto;
}

.build-editor-page .hint-nearby-overlay ol {
    margin: 0;
    padding-left: 18px;
}

.build-editor-page .hint-nearby-overlay li {
    margin-bottom: 4px;
    font-size: 9px;
    color: #d6e0f2;
    white-space: nowrap;
}

.build-editor-page .hint-distance-tag {
    display: inline-block;
    margin-left: 6px;
    font-size: 9px;
    color: rgba(188, 209, 236, 0.95);
}

.build-editor-page .hint-focus-panel .panel-body {
    padding: 12px;
}

.build-editor-page .hint-nearby-list {
    margin: 0;
    padding-left: 18px;
    max-height: 260px;
    overflow-y: auto;
}

.build-editor-page .hint-nearby-list li {
    margin-bottom: 6px;
}

.hint-zoom-out-tip {
    position: fixed;
    z-index: 2140;
    display: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.2;
    background: rgba(9, 16, 28, 0.92);
    border: 1px solid rgba(102, 190, 255, 0.7);
    color: #d7ecff;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.build-editor-page .hint-reset-notice {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 14;
    display: none;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.2;
    background: rgba(9, 16, 28, 0.92);
    border: 1px solid rgba(102, 190, 255, 0.7);
    color: #d7ecff;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.build-editor-page .tower-container.highlight-placed-tower > .placed > img,
.build-editor-page .tower-container.highlight-placed-tower > img.placed {
    filter: drop-shadow(0 0 7px rgba(141, 199, 255, 0.92)) drop-shadow(0 0 14px rgba(141, 199, 255, 0.55));
}


.list-page-shell .liked-filter-group {
    margin-bottom: 0;
}

.list-page-shell .liked-filter-group-side {
    margin-top: 0;
}

.list-page-shell .liked-filter-control {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid rgba(182, 200, 228, 0.28);
    border-radius: 8px;
    background: rgba(37, 44, 57, 0.5);
    color: #d8e6fa;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    cursor: pointer;
}

.list-page-shell .liked-filter-control input[type="checkbox"] {
    margin: 0;
    position: static;
    cursor: pointer;
}

.list-page-shell .hero-filter-row {
    margin-top: 6px;
}

.list-page-shell .hero-filter-wrap {
    margin-bottom: 12px;
    padding: 12px 14px 10px;
    border: 1px solid rgba(182, 200, 228, 0.2);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(56, 64, 78, 0.7) 0%, rgba(37, 44, 57, 0.78) 100%);
}

.list-page-shell .hero-filter-header {
    margin-bottom: 8px;
}

.list-page-shell .hero-filter-header label {
    margin-bottom: 0;
    font-weight: 600;
    color: #e7f1ff;
}

.list-page-shell .hero-filter-header .hero-filter-title-note {
    margin-left: 8px;
    color: #9db9df;
    font-size: 11px;
    font-weight: normal;
}

.list-page-shell .hero-filter-clear {
    padding: 1px 0;
    color: #bcd1ec;
    text-decoration: none;
}

.list-page-shell .hero-filter-clear:hover,
.list-page-shell .hero-filter-clear:focus {
    color: #ffffff;
    text-decoration: none;
}

.list-page-shell .hero-exclude-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.list-page-shell .hero-exclude-item {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(196, 214, 238, 0.34);
    border-radius: 50%;
    background: rgba(93, 112, 139, 0.28);
    overflow: hidden;
    transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
}

.list-page-shell .hero-exclude-item:hover,
.list-page-shell .hero-exclude-item:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.62);
    transform: translateY(-1px) scale(1.04);
}

.list-page-shell .hero-exclude-item img {
    width: 100%;
    height: 100%;
    display: block;
}

.list-page-shell .hero-exclude-item.is-excluded {
    opacity: 0.48;
    filter: grayscale(0.95) brightness(0.55);
    border-color: rgba(0, 0, 0, 0.55);
}

.list-page-shell .hero-exclude-item.is-included {
    opacity: 1;
    border-color: rgba(90, 190, 255, 0.95);
    box-shadow: 0 0 0 2px rgba(90, 190, 255, 0.25), 0 0 10px rgba(90, 190, 255, 0.32);
    transform: scale(1.05);
}

.list-page-shell .hero-filter-help {
    margin-top: 8px;
    margin-bottom: 0;
    color: #c7d8f1;
    font-size: 12px;
}


@media (max-width: 991px) {
    .list-page-shell .liked-filter-group-side {
        margin-top: 8px;
    }
}
