@font-face {
    font-family: 'Coolvetica';
    src: url('../fonts/coolvetica.ttf');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'BLACKCHANCERY';
    src: url('../fonts/BLKCHCRY.ttf');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'MonsterratRegular';
    src: url('../fonts/Montserrat-Regular.ttf');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'MonsterratBold';
    src: url('../fonts/Montserrat-Bold.ttf');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'OpenSans';
    src: url('../fonts/OpenSans-VariableFont_wdthwght.ttf');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'RobotoRegular';
    src: url('../fonts/Roboto-Regular.ttf');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'SedanSCRegular';
    src: url('../fonts/SedanSC-Regular.ttf');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'CourgetteRegular';
    src: url('../fonts/Courgette-Regular.ttf');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'CaveatVariable';
    src: url('../fonts/Caveat-VariableFont_wght.ttf');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'CinzelDecorativeRegular';
    src: url('../fonts/CinzelDecorative-Regular.ttf');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'CinzelRegular';
    src: url('../fonts/Cinzel-Regular.ttf');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'CinzelMedium';
    src: url('../fonts/Cinzel-Medium.ttf');
    font-weight: normal;
    font-style: normal;
}

:root {
    color-scheme: only light;
}

/* Reset styles */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	vertical-align: baseline;
	background: transparent;
	font-family: 'Coolvetica', 'Helvetica';
}

body {
    cursor: url('../../files/gui/svg/cursor4.svg'), auto;
}

:focus {
    outline: 0;
}

input {
    font-family: 'Coolvetica', 'Helvetica';
}

#npcscriptfield,
#npcscriptfield div,
#npcscriptfield span {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
}

img {
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

/* Containers */
body {
    background: #000000;
}

#startscreen,
#generalmessage,
#deathscreen,
#reconnectscreen,
#errorscreen {
    position: absolute;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    z-index: 200;
}

.parchment-back {
    width: 844px;
    height: 364px;
    position: absolute;
    top: 55%;
    left: 50%;
    margin-left: -422px;
    margin-top: -182px;
    font-size: 20px;
    text-align: center;
}

#underconstruction {
    font-size: 24px;
    color: #fffff0;
    margin-left: 10px;
    margin-right: 10px;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 2px 0 #000, 1px 2px 0 #000;
}

#generalmessage,
#deathscreen,
#reconnectscreen,
#errorscreen {
    background-color: rgba(0, 0, 0, 0.25);
}

.parchment-replacer {
    position: absolute;
    left: 50%;
    top: 0;
    width: 692px;
    height: 364px;
    margin-left: -346px;
}

/* Logo */
#logo {
    position: absolute;
    background: url('../../files/gui/bbuilder_logosingle.png');
    height: 113px;
    width: 454px;
    top: -90px;
    left: 50%;
    margin-left: -229px;
    z-index: 3;
}

/* Play and revive buttons */
#playbutton {
    margin: 10px auto 10px auto;
}

#playbutton div {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 1;
    -moz-transition: 0.4s linear opacity;
    -webkit-transition: 0.4s linear opacity;
    -o-transition: 0.4s linear opacity;
    -ms-transition: 0.4s linear opacity;
    transition: 0.4s linear opacity;
}

#playbutton img {
    display: none;
}

#playbutton.loading img {
    display: block;
    position: absolute;
    left: 332px;
    top: 228px;
}

#respawnbutton {
    margin: 40px auto 0 auto;
    background: url(../../files/gui/revivebutton.png);
}

#reconnectbutton {
    margin: 40px auto 0 auto;
    background: url(../../files/gui/reconnectbutton.png);
}

.startbutton {
    background: url(../../files/gui/playbutton.png);
    width: 336px;
    height: 96px;
}

.startbutton:hover {
    background: url(../../files/gui/playbutton_active.png);
}

.startbutton.loading {
    background: none;
}

/* Game */
#gamecontainer {
    width: 100%;
    height: 100%;
    margin-left: auto;
    margin-right: auto;
    position: absolute;
    overflow: hidden;
}

#gamecontainer {
    -moz-transition: 0.5s opacity linear 0.25s;
    -webkit-transition: 0.5s opacity linear 0.25s;
    -o-transition: 0.5s opacity linear 0.25s;
    -ms-transition: 0.5s opacity linear 0.25s;
    transition: 0.5s opacity linear 0.25s;
}

canvas {
    position: absolute;
    image-rendering: optimizeSpeed;
    image-rendering: pixelated;
}

#canvas {
    width: 100%;
    height: 100%;
}

#background {
    background: #000;
}

#backgroundcontainer {
    display: inline-block;
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#background,
#foreground {
    margin: 0;
    padding: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    left: -32px;
    top: -32px;
}

#guilayer {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0px;
    top: 0px;
}

#entities {
    image-rendering: optimizeSpeed;
    image-rendering: pixelated;
    width: 100%;
    height: 100% !important;
    left: 0px;
    top: 0px;
}

#foreground {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    cursor: pointer;
}

#canvas,
#bar-container,
#minimap,
#minimapcanvas,
#foreground,
#background,
#gamecontainer,
#movementhelp,
#showvs,
#showvsclans,
#showvswinner,
#showvsclanwinner {
    -moz-user-select: none;
    -webkit-user-select: none;
    -o-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#bar-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

/* Minimap */
#minimap {
    position: fixed;
    width: 144px;
    height: 144px;
    opacity: 1;
    left: 6px;
    bottom: 0px;
    z-index: 2;
}

#minimapcanvas {
    image-rendering: optimizeSpeed;
    width: 144px;
    height: 144px;
}

#lightsbutton,
#hornbutton {
    display: none;
}

/* Chat */

#chatbox {
    background: rgba(0, 0, 0, 0.56);
    border-radius: 15px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    -webkit-backdrop-filter: blur(1.8px);
    backdrop-filter: blur(1.8px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: absolute;
    z-index: 100;
    height: 32px;
    width: 788px;
    max-width: 90%;
    left: 50px;
    top: 12px;
}

#chatbox input {
    font-size: 20px;
    color: #eee;
    background: none;
    width: 94%;
    border: 0;
    margin-left: 2%;
    padding: 2px 0;
}

#chatbox.bigchat {
    background: none;
    height: 72px;
    width: 100%;
    left: 0px;
    right: 0px;
    max-width: initial;
    top: 120px;
}

#chatbox.bigchat input {
    font-size: 56px;
    height: 72px;
    width: 100%;
    margin-left: initial;
    color: white;
    text-align: center;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 2px 0 #000, 1px 2px 0 #000;
}

/* Game GUI */
#coinscount {
    display: none;
    color: #ffffff;
    position: absolute;
    font-size: 16px;
    right: 287px;
    top: 20px;
    width: 120px;
    text-align: right;
    text-shadow: 2px 2px 0 #000000;
}

#movepad {
    background: url('../../files/gui/bbuilder_movepad.png') no-repeat bottom left;
    background-size: contain;
    image-rendering: -moz-crispt-edges;
    position: absolute;
}

#movepad {
    left: 0px;
    bottom: 0px;
    width: 300px;
    height: 300px;
    max-width: 45vh;
    max-height: 45vh;
}

#weaponpad {
    background: url('../../files/gui/bbuilder_weaponpad.png') no-repeat bottom right;
    background-size: contain;
    image-rendering: -moz-crispt-edges;
    position: absolute;
}

#weaponpad {
    right: 0px;
    bottom: 0px;
    width: 128px;
    height: 128px;
}

#bombbutton {
    background: url('../../files/gui/bbuilder_bombbutton.png') no-repeat bottom right;
    background-size: contain;
    image-rendering: -moz-crispt-edges;
    position: absolute;
}

#bombbutton {
    right: 0px;
    bottom: 120px;
    width: 96px;
    height: 96px;
    max-width: 30vh;
    max-height: 30vh;
}

.scrollable {
    overflow-y: scroll;
}

/* -webkit-overflow-scrolling: touch; */

/* Input placeholder color */
::-webkit-input-placeholder {
    color: #bbb;
}

:-moz-placeholder {
    color: #bbb;
    opacity: 1;
}

::-moz-placeholder {
    color: #bbb;
    opacity: 1;
}

:-ms-input-placeholder {
    color: #bbb;
}

::-ms-input-placeholder {
    color: #bbb;
}

/* Health bar */

#healthbar {
    display: none !important;
    height: 26px;
    width: 204px;
    left: 50%;
    margin-left: -102px;
    top: 4px;
    position: absolute;
    pointer-events: none;
}

#healthbarbar {
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('../../files/gui/bbuilder_healthbar.png');
    image-rendering: -webkit-optimize-contrast;
}

#hitpoints {
    width: 0px;
    height: 22px;
    top: 2px;
    left: 22px;
    position: absolute;
    background: #d83939;
    -moz-transition: 0.5s width ease;
    -webkit-transition: 0.5s width ease;
    -o-transition: 0.5s width ease;
    -ms-transition: 0.5s width ease;
    transition: 0.5s width ease;
    pointer-events: none;
}

/* AETHERFALL QUANTUM by Alic - Enhanced Tokyo Night theme with animations */
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
    background-color: #24283b;
    z-index: 1;
}

.ace_editor.ace_autocomplete .ace_line-hover {
    margin-top: -1px;
    background: rgba(171, 191, 254, 0.1);
    position: absolute;
    z-index: 2;
}

.ace_completion-meta {
    opacity: 0.5;
    margin: 0.9em;
}

.ace_completion-message {
    color: #7aa2f7;
}

.ace_editor.ace_autocomplete .ace_completion-highlight {
    color: #7aa2f7;
    text-shadow: 0 0 2px rgba(122, 162, 247, 0.4);
}

.ace_editor.ace_autocomplete {
    width: 300px;
    z-index: 200000;
    border: 1px #272727 solid;
    position: fixed;
    box-shadow: 2px 3px 15px rgba(0, 0, 0, 0.3);
    line-height: 1.4;
    background: rgba(24, 25, 38, 0.95);
    color: #d2d2d2;
    border-radius: 5px;
}

.ace-tm .ace_paren,
.ace-tm .ace_lparen {
    color: #7dcfff;
}

.ace-tm .ace_gutter {
    background: #16161e;
    color: rgb(91, 91, 91);
    border-right: 1px solid rgba(65, 72, 104, 0.2);
}

.ace-tm .ace_fold {
    background-color: #6b72e6;
}

.ace-tm {
    background-color: #16161e;
    color: #bb9af7;
}

.ace-tm .ace_cursor {
    color: #c0caf5;
    box-shadow: 0 0 3px #c0caf5;
}

.ace-tm .ace_storage,
.ace-tm .ace_keyword {
    color: #8c7cd8;
    font-weight: bold;
}

.ace-tm .ace_entity.ace_name.ace_function {
    color: #7aa2f7;
}

.ace-tm .ace_comment {
    color: #565f89;
    font-style: italic;
}

.ace-tm .ace_string {
    color: #9ece6a;
}

.ace-tm .ace_marker-layer .ace_selection {
    background: rgba(189, 199, 240, 0.2);
}

.ace-tm .ace_gutter-active-line {
    background-color: rgba(26, 27, 38, 0.5);
    color: white;
}

.ace-tm .ace_marker-layer .ace_selected-word {
    background: rgba(189, 199, 240, 0.11);
    border: 1px solid rgba(189, 199, 240, 0.11);
}

.ace-tm .ace_variable {
    color: #e0af68;
}

.ace-tm .ace_constant.ace_numeric {
    color: #ff9e64;
}

.ace-tm .ace_marker-layer .ace_active-line {
    background: rgba(134, 134, 134, 0.07);
}

.ace-tm .ace_print-margin {
    width: 1px;
    background: #1a1b26;
}

.ace-tm .ace_invisible {
    color: rgb(191, 191, 191);
}

.ace-tm .ace_constant {
    color: #ff9e64;
}

.ace-tm .ace_constant.ace_buildin {
    color: #bb9af7;
}

.ace-tm .ace_constant.ace_language {
    color: #7dcfff;
}

.ace-tm .ace_constant.ace_library {
    color: #73daca;
}

.ace-tm .ace_invalid {
    background-color: rgba(255, 0, 0, 0.1);
    color: #f7768e;
}

.ace-tm .ace_support.ace_function {
    color: #7aa2f7;
}

.ace-tm .ace_support.ace_constant {
    color: #cfc9c2;
}

.ace-tm .ace_support.ace_type,
.ace-tm .ace_support.ace_class {
    color: #73daca;
}

.ace-tm .ace_keyword.ace_operator {
    color: #89ddff;
}

.ace-tm .ace_comment.ace_doc {
    color: #565f89;
}

.ace-tm .ace_comment.ace_doc.ace_tag {
    color: #6b7089;
}

.ace-tm .ace_xml-pe {
    color: #c0caf5;
}

.ace-tm .ace_heading {
    color: #7aa2f7;
}

.ace-tm .ace_list {
    color: #bb9af7;
}

.ace-tm .ace_meta.ace_tag {
    color: #7aa2f7;
}

.ace-tm .ace_string.ace_regex {
    color: #b4f9f8;
}

.ace-tm.ace_multiselect .ace_selection.ace_start {
    box-shadow: 0 0 3px 0px #c0caf5;
}

.ace-tm .ace_marker-layer .ace_step {
    background: rgb(252, 255, 0);
}

.ace-tm .ace_marker-layer .ace_stack {
    background: rgb(164, 229, 101);
}

.ace-tm .ace_marker-layer .ace_bracket {
    margin: -1px 0 0 -1px;
    border: 1px solid rgba(169, 177, 214, 0.4);
}

.ace-tm .ace_string.ace_regexp {
    color: #b4f9f8;
}

.ace-tm .ace_indent-guide {
    background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAAXNSR0IArs4c6QAAAA9JREFUGFdjCIvv/M8AIgAURwR7QOrUYQAAAABJRU5ErkJggg==')
        right repeat-y;
}

.ace_scrollbar {
    contain: strict;
    position: absolute;
    right: 0;
    bottom: 0;
    cursor: default;
    z-index: 6;
}

.ace_scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.ace_scrollbar::-webkit-scrollbar-track {
    background: #16161e;
    border-radius: 3px;
}

.ace_scrollbar::-webkit-scrollbar-thumb {
    background: #414868;
    border-radius: 3px;
    box-shadow: 0 0 5px rgba(65, 72, 104, 0.3);
}

/* Quantum animations */
@keyframes cursorPulse {
    0% { opacity: 1; box-shadow: 0 0 3px #c0caf5; }
    50% { opacity: 0.7; box-shadow: 0 0 8px #c0caf5; }
    100% { opacity: 1; box-shadow: 0 0 3px #c0caf5; }
}

@keyframes selectionPulse {
    0% { background: rgba(189, 199, 240, 0.15); }
    50% { background: rgba(189, 199, 240, 0.25); }
    100% { background: rgba(189, 199, 240, 0.15); }
}

@keyframes syntaxGlow {
    0% { text-shadow: 0 0 1px currentColor; }
    50% { text-shadow: 0 0 3px currentColor; }
    100% { text-shadow: 0 0 1px currentColor; }
}

@keyframes bracketShimmer {
    0% { border-color: rgba(169, 177, 214, 0.3); }
    50% { border-color: rgba(169, 177, 214, 0.6); }
    100% { border-color: rgba(169, 177, 214, 0.3); }
}

@keyframes quantumFlicker {
    0% { opacity: 1; }
    95% { opacity: 1; }
    96% { opacity: 0.8; }
    97% { opacity: 1; }
    99% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* Apply animations */
.ace-tm .ace_cursor {
    animation: cursorPulse 1.5s infinite;
}

.ace-tm .ace_marker-layer .ace_selection {
    animation: selectionPulse 3s infinite;
}

.ace-tm .ace_keyword,
.ace-tm .ace_entity.ace_name.ace_function,
.ace-tm .ace_constant.ace_numeric,
.ace-tm .ace_string {
    animation: syntaxGlow 3s infinite;
}

.ace-tm .ace_marker-layer .ace_bracket {
    animation: bracketShimmer 2s infinite;
}

/* Quantum field effect */
.ace_editor::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(122, 162, 247, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 30% 40%, rgba(140, 124, 216, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 50% 60%, rgba(122, 162, 247, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 70% 80%, rgba(140, 124, 216, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 90% 10%, rgba(122, 162, 247, 0.03) 1px, transparent 1px);
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 10;
    opacity: 0.5;
    animation: quantumFlicker 10s infinite;
}

/* Subtle scanline effect */
.ace_editor::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(122, 162, 247, 0.1);
    z-index: 11;
    opacity: 0.5;
    animation: scanline 8s linear infinite;
    pointer-events: none;
}

@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(1000%); }
}

/* Align editor with header */
/* .ace_editor {
    top: 80px !important;
    height: calc(100% - 130px) !important;
} */