
/* Common */

@font-face {
    font-family: en;
    src: url(Inconsolata.woff);
}

@font-face {
    font-family: sym;
    src: local("Lantinghei TC"), local("MingLiU_HKSCS");
    unicode-range: U+100-4DFF, U+A000-10FFFF;
}

@font-face {
    font-family: zh;
    src: local("Lantinghei TC"), local("MingLiU_HKSCS");
}

a {
    cursor: pointer;
    text-decoration: underline;
}

a.url {
    color: inherit;
}

html {
    font-family: en, sym, zh;
}

body {
    height: 100%;
    margin: 0;
    padding: 0;
    position: fixed;
    width: 100%;
}

input {
    border: 0;
    box-sizing: border-box;
    margin: 0;
}

ul {
    list-style-type: none;
    margin: 0;
    padding: 9px 0 0 20px;
}

.invisible {
    display: none;
}

.table_footer {
    border-top: 1px dashed #BBBBBB;
    bottom: 0;
    box-sizing: border-box;
    height: 35px;
    padding: 4px 8px;
    position: absolute;
    width: 100%;
}

.table_footer button {
    border: 0;
    height: 26px;
    font-size: 16px;
}

.table_footer .left {
    width: 6em;
}

.table_footer .right {
    float: right;
}

/* Function */

#buttons {
    border: 1px dashed #BBBBBB;
    bottom: 5px;
    left: 5px;
    overflow-y: hidden;
    padding: 3px;
    position: absolute;
    top: 5px;
    width: 62px;
}

#buttons button {
    border: 0;
    font-size: 20px;
    height: 62px;
    margin-top: 3px;
    padding: 0;
    width: 62px;
}

#connect.pressed {
    background-color: #BBFFBB;
}

#connect.pressing {
    background-color: #EECCAA;
}

#help {
    margin-top: 5px;
    text-align: center;
}

#help a {
    color: white;
    font-size: 12px;
}

#uptime {
    bottom: 7px;
    cursor: pointer;
    position: absolute;
    text-align: center;
    width: 62px;
}

#version {
    font-size: 14px;
    text-align: center;
}

/* Input */

#delay {
    bottom: 10px;
    position: absolute;
    right: 10px;
}

#form {
    bottom: 5px;
    height: 34px;
    left: 80px;
    position: absolute;
    right: 5px;
}

#input {
    font-size: 18px;
    height: 100%;
    padding: 5px;
    width: 100%;
}

/* Main */

#content {
    bottom: 5px;
    left: 5px;
    overflow: auto;
    position: absolute;
    right: 5px;
    top: 5px;
}

#main {
    border: 1px dashed #BBBBBB;
    bottom: 45px;
    left: 80px;
    overflow: hidden;
    position: absolute;
    right: 5px;
    top: 5px;
}

#message {
    bottom: 0;
    left: 0;
    line-height: 20px;
    position: absolute;
    white-space: pre-wrap;
    word-wrap: break-word;
}

#message::after {
    content: " ";
}

#notice {
    left: 5px;
    padding: 5px 10px;
    position: absolute;
    top: 5px;
    width: 9em;
    z-index: 1000000;
}

/* Macro */

#map_header, #macro_header, #setting_header {
    border-bottom: 1px dashed #BBBBBB;
    cursor: move;
    line-height: 32px;
    position: absolute;
    top: 0;
    width: 100%;
}

#macro_list {
    bottom: 0;
    left: 0;
    overflow-x: hidden;
    overflow-y: scroll;
    position: absolute;
    right: -50px;
    top: 0;
}

#macro_list input {
    margin: 0 0 1px 1px;
    height: 23px;
    padding: 4px;
}

#macro_list_wrapper {
    bottom: 40px;
    overflow: hidden;
    position: absolute;
    top: 64px;
    width: 100%;
}

#macro_table {
    background-color: #222222;
    border: 1px dashed #BBBBBB;
    height: 463px;
    position: fixed;
    visibility: hidden;
    width: 435px;
}

#map_table span, #macro_table span, #setting_table span {
    display: inline-block;
    text-align: center;
}

#macro_table .command {
    width: 250px;
}

#macro_table .key {
    width: 155px;
}

#macro_table .num {
    width: 25px;
}

#macro_table .title {
    line-height: 32px;
    position: absolute;
    top: 32px;
}

/* Map */

#map_anchor {
    border: 1px solid red;
    height: 27px;
    left: 186px;
    position: absolute;
    top: 220px;
    width: 29px;
}

#map_table {
    background-color: #222222;
    border: 1px dashed #BBBBBB;
    height: 436px;
    position: fixed;
    visibility: hidden;
    width: 400px;
}

#map_wrapper {
    bottom: 3px;
    left: 3px;
    overflow: hidden;
    position: absolute;
    right: 3px;
    top: 36px;
}

#map_wrapper div {
    left: 0;
    line-height: 18px;
    margin-left: 190px;
    margin-top: 190px;
    position: absolute;
    top: 0;
    white-space: pre;
}

#map_wrapper div a {
    text-decoration: none;
}

/* Monitor */

#monitor {
    background-color: #222222;
    border: 1px dashed #BBBBBB;
    cursor: move;
    padding: 5px 5px 7px 5px;
    position: fixed;
    visibility: hidden;
}

#monitor span {
    display: inline-block;
}

/* Setting */

#setting_table {
    background-color: #222222;
    border: 1px dashed #BBBBBB;
    height: 430px;
    position: fixed;
    visibility: hidden;
    width: 310px;
}

.color_header {
    border-right: 1px dashed #BBBBBB;
    left: 0;
    line-height: 190px;
    position: absolute;
    width: 60px;
}

.color_list {
    bottom: 0;
    left: 60px;
    line-height: 24px;
    position: absolute;
    right: 0;
    top: 0;
}

.color_setting {
    border-bottom: 1px dashed #BBBBBB;
    height: 190px;
    position: absolute;
    top: 72px;
    width: 100%;
}

#font {
    height: 24px;
    margin: 8px 0 0 80px;
    padding: 5px;
    width: 200px;
}

.font_header {
    border-right: 1px dashed #BBBBBB;
    left: 0;
    line-height: 39px;
    position: absolute;
    width: 60px;
}

.font_setting {
    border-bottom: 1px dashed #BBBBBB;
    height: 39px;
    position: absolute;
    top: 32px;
    width: 100%;
}

.other_setting {
    bottom: 36px;
    height: 130px;
    line-height: 22px;
    position: absolute;
    width: 100%;
}

.other_list input[type="checkbox"] {
    text-align: center;
    width: 23px;
}

#password, #username {
    font-size: 14px;
    width: 80px;
}

#username_w {
    margin-left: 23px;
}

/* Display */

.display_macro #macro, .display_setting #setting, .display_monitor #hp, .display_map #map, .display_channel #channel {
    background-color: #BBFFFF;
}

.display_macro #macro_table, .display_setting #setting_table, .display_monitor #monitor, .display_map #map_table {
    visibility: visible;
}

.frozen #lock {
    background-color: #FFBBBB;
}

.frozen #main {
    border-color: #BB0000;
}

.frozen #message {
    position: static;
}

.translucent #monitor, .translucent #map_table {
    background-color: rgba(68,68,68,0.5);
}

/* ANSI Color */

.N0 { color: rgb(  0,  0,  0); }
.N7 { color: rgb(229,229,229); }

.H1 { color: rgb(255,  0,  0); }
.H2 { color: rgb(  0,255,  0); }
.H3 { color: rgb(255,255,  0); }
.H5 { color: rgb(255,  0,255); }
.H6 { color: rgb(  0,255,255); }
.H7 { color: rgb(255,255,255); }

.B0 { background-color: rgb(0,0,0); }

.VGA .N1 { color: rgb(170,  0,  0); }
.VGA .N2 { color: rgb(  0,170,  0); }
.VGA .N3 { color: rgb(170, 85,  0); }
.VGA .N4 { color: rgb(  0,  0,170); }
.VGA .N5 { color: rgb(170,  0,170); }
.VGA .N6 { color: rgb(  0,170,170); }
.VGA .N7 { color: rgb(170,170,170); }

.VGA .H0 { color: rgb( 85, 85, 85); }
.VGA .H1 { color: rgb(255, 85, 85); }
.VGA .H2 { color: rgb( 85,255, 85); }
.VGA .H3 { color: rgb(255,255, 85); }
.VGA .H4 { color: rgb( 85, 85,255); }
.VGA .H5 { color: rgb(255, 85,255); }
.VGA .H6 { color: rgb( 85,255,255); }

.VGA .B1 { background-color: rgb(170,  0,  0); }
.VGA .B2 { background-color: rgb(  0,170,  0); }
.VGA .B3 { background-color: rgb(170, 85,  0); }
.VGA .B4 { background-color: rgb(  0,  0,170); }
.VGA .B5 { background-color: rgb(170,  0,170); }
.VGA .B6 { background-color: rgb(  0,170,170); }
.VGA .B7 { background-color: rgb(170,170,170); }

.XP .N1 { color: rgb(128,  0,  0); }
.XP .N2 { color: rgb(  0,128,  0); }
.XP .N3 { color: rgb(128,128,  0); }
.XP .N4 { color: rgb(  0,  0,128); }
.XP .N5 { color: rgb(128,  0,128); }
.XP .N6 { color: rgb(  0,128,128); }
.XP .N7 { color: rgb(192,192,192); }

.XP .H0 { color: rgb(128,128,128); }
.XP .H4 { color: rgb(  0,  0,255); }

.XP .B1 { background-color: rgb(128,  0,  0); }
.XP .B2 { background-color: rgb(  0,128,  0); }
.XP .B3 { background-color: rgb(128,128,  0); }
.XP .B4 { background-color: rgb(  0,  0,128); }
.XP .B5 { background-color: rgb(128,  0,128); }
.XP .B6 { background-color: rgb(  0,128,128); }
.XP .B7 { background-color: rgb(192,192,192); }

.Mac .N1 { color: rgb(194, 54, 33); }
.Mac .N2 { color: rgb( 37,188, 36); }
.Mac .N3 { color: rgb(173,173, 39); }
.Mac .N4 { color: rgb( 73, 46,225); }
.Mac .N5 { color: rgb(211, 56,211); }
.Mac .N6 { color: rgb( 51,187,200); }
.Mac .N7 { color: rgb(203,204,205); }

.Mac .H0 { color: rgb(129,131,131); }
.Mac .H1 { color: rgb(252, 57, 31); }
.Mac .H2 { color: rgb( 49,231, 34); }
.Mac .H3 { color: rgb(234,236, 35); }
.Mac .H4 { color: rgb( 88, 51,255); }
.Mac .H5 { color: rgb(249, 53,248); }
.Mac .H6 { color: rgb( 20,240,240); }
.Mac .H7 { color: rgb(233,235,235); }

.Mac .B1 { background-color: rgb(194, 54, 33); }
.Mac .B2 { background-color: rgb( 37,188, 36); }
.Mac .B3 { background-color: rgb(173,173, 39); }
.Mac .B4 { background-color: rgb( 73, 46,225); }
.Mac .B5 { background-color: rgb(211, 56,211); }
.Mac .B6 { background-color: rgb( 51,187,200); }
.Mac .B7 { background-color: rgb(203,204,205); }

.PuTTY .N1 { color: rgb(187,  0,  0); }
.PuTTY .N2 { color: rgb(  0,187,  0); }
.PuTTY .N3 { color: rgb(187,187,  0); }
.PuTTY .N4 { color: rgb(  0,  0,187); }
.PuTTY .N5 { color: rgb(187,  0,187); }
.PuTTY .N6 { color: rgb(  0,187,187); }
.PuTTY .N7 { color: rgb(187,187,187); }

.PuTTY .H0 { color: rgb( 85, 85, 85); }
.PuTTY .H1 { color: rgb(255, 85, 85); }
.PuTTY .H2 { color: rgb( 85,255, 85); }
.PuTTY .H3 { color: rgb(255,255, 85); }
.PuTTY .H4 { color: rgb( 85, 85,255); }
.PuTTY .H5 { color: rgb(255, 85,255); }
.PuTTY .H6 { color: rgb( 85,255,255); }

.PuTTY .B1 { background-color: rgb(187,  0,  0); }
.PuTTY .B2 { background-color: rgb(  0,187,  0); }
.PuTTY .B3 { background-color: rgb(187,187,  0); }
.PuTTY .B4 { background-color: rgb(  0,  0,187); }
.PuTTY .B5 { background-color: rgb(187,  0,187); }
.PuTTY .B6 { background-color: rgb(  0,187,187); }
.PuTTY .B7 { background-color: rgb(187,187,187); }

.mIRC .N1 { color: rgb(127,  0,  0); }
.mIRC .N2 { color: rgb(  0,147,  0); }
.mIRC .N3 { color: rgb(252,127,  0); }
.mIRC .N4 { color: rgb(  0,  0,127); }
.mIRC .N5 { color: rgb(156,  0,156); }
.mIRC .N6 { color: rgb(  0,147,147); }
.mIRC .N7 { color: rgb(210,210,210); }

.mIRC .H0 { color: rgb(127,127,127); }
.mIRC .H2 { color: rgb(  0,252,  0); }
.mIRC .H4 { color: rgb(  0,  0,252); }

.mIRC .B1 { background-color: rgb(127,  0,  0); }
.mIRC .B2 { background-color: rgb(  0,147,  0); }
.mIRC .B3 { background-color: rgb(252,127,  0); }
.mIRC .B4 { background-color: rgb(  0,  0,127); }
.mIRC .B5 { background-color: rgb(156,  0,156); }
.mIRC .B6 { background-color: rgb(  0,147,147); }
.mIRC .B7 { background-color: rgb(210,210,210); }

.XTerm .N1 { color: rgb(205,  0,  0); }
.XTerm .N2 { color: rgb(  0,205,  0); }
.XTerm .N3 { color: rgb(205,205,  0); }
.XTerm .N4 { color: rgb(  0,  0,238); }
.XTerm .N5 { color: rgb(205,  0,205); }
.XTerm .N6 { color: rgb(  0,205,205); }

.XTerm .H0 { color: rgb(127,127,127); }
.XTerm .H4 { color: rgb( 92, 92,255); }

.XTerm .B1 { background-color: rgb(205,  0,  0); }
.XTerm .B2 { background-color: rgb(  0,205,  0); }
.XTerm .B3 { background-color: rgb(205,205,  0); }
.XTerm .B4 { background-color: rgb(  0,  0,238); }
.XTerm .B5 { background-color: rgb(205,  0,205); }
.XTerm .B6 { background-color: rgb(  0,205,205); }
.XTerm .B7 { background-color: rgb(229,229,229); }

.Monochrome .N1 { color: rgb( 93, 93, 93); }
.Monochrome .N2 { color: rgb(126,126,126); }
.Monochrome .N3 { color: rgb(158,158,158); }
.Monochrome .N4 { color: rgb( 74, 74, 74); }
.Monochrome .N5 { color: rgb(120,120,120); }
.Monochrome .N6 { color: rgb(148,148,148); }
.Monochrome .N7 { color: rgb(204,204,204); }

.Monochrome .H0 { color: rgb( 85, 85, 85); }
.Monochrome .H1 { color: rgb(136,136,136); }
.Monochrome .H2 { color: rgb(185,185,185); }
.Monochrome .H3 { color: rgb(236,236,236); }
.Monochrome .H4 { color: rgb(104,104,104); }
.Monochrome .H5 { color: rgb(155,155,155); }
.Monochrome .H6 { color: rgb(204,204,204); }

.Monochrome .B1 { background-color: rgb( 93, 93, 93); }
.Monochrome .B2 { background-color: rgb(126,126,126); }
.Monochrome .B3 { background-color: rgb(158,158,158); }
.Monochrome .B4 { background-color: rgb( 74, 74, 74); }
.Monochrome .B5 { background-color: rgb(120,120,120); }
.Monochrome .B6 { background-color: rgb(148,148,148); }
.Monochrome .B7 { background-color: rgb(204,204,204); }

.Monochrome #map_anchor {
    border-color: rgb(136,136,136);
}

.Monochrome #connect.pressed,
.Monochrome #connect.pressing,
.Monochrome .display_macro #macro,
.Monochrome .display_setting #setting,
.Monochrome .display_monitor #hp,
.Monochrome .display_map #map,
.Monochrome .display_channel #channel,
.Monochrome .frozen #lock {
    background-color: rgb(255,255,255);
}

.Monochrome .frozen #main {
    border-color: rgb(255,255,255);
}

.I { font-style: italic; }

.K {
    animation: blink 1.5s steps(3, start) infinite;
    -webkit-animation: blink 1.5s steps(3, start) infinite;
}

@keyframes blink {
    to { visibility: hidden; }
}

@-webkit-keyframes blink {
    to { visibility: hidden; }
}

.U { text-decoration: underline; }

/* Cool Down */

#busy div {
    background-color: red;
}

#perform div {
    background-color: aqua;
}

.cooldown {
    bottom: 2px;
    left: 2px;
    position: absolute;
    right: 2px;
}

.cooldown div {
    animation-name: cooldown;
    animation-timing-function: linear;
    height: 3px;
    width: 0;
    -webkit-animation-name: cooldown;
    -webkit-animation-timing-function: linear;
}

@keyframes cooldown {
    from { width: 100%; }
    to   { width: 0; }
}

@-webkit-keyframes cooldown {
    from { width: 100%; }
    to   { width: 0; }
}

/* Responsive Web Design */

@media screen and (max-device-width: 768px) {
    #buttons {
        border: 0;
        padding: 0;
        width: 0;
    }

    #buttons button {
        font-size: 18px;
        height: 26px;
    }

    #connect {
        left: 8px;
        position: fixed;
        top: 5px;
    }

    #connect.pressed {
        display: none;
    }

    #hp {
        bottom: 48px;
        position: fixed;
        right: 8px;
    }

    #lock {
        position: fixed;
        right: 8px;
        top: 5px;
    }

    #form, #main {
        left: 5px;
    }

    #message {
        line-height: inherit;
    }
}

/* iPhone 6 Plus */

@media screen and (max-device-width: 414px) {
    html {
        font-size: 9px;
    }
}

/* iPhone 6 */

@media screen and (max-device-width: 375px) {
    html {
        font-size: 8px;
    }
}

/* iPhone */

@media screen and (max-device-width: 320px) {
    html {
        font-size: 7px;
    }
}
