:root {
    color-scheme: dark;
}

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

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    padding: 0;
    background-color: #0b1118;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    color: #d7dde7;
    line-height: 1.6;
}

h1 {
    font-size: 26px;
    color: #f2f6ff;
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #142030, #0f1621);
    border: 1px solid #1f2b3b;
    border-left: 4px solid #4aa3ff;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

h2 {
    font-size: 20px;
    color: #cfe4ff;
    font-weight: 700;
    margin-top: 26px;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: #121c2a;
    border: 1px solid #1f2b3b;
    border-left: 3px solid #5bb6ff;
    border-radius: 8px;
}

h3 {
    font-size: 18px;
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #e6edf7;
}

h4 {
    font-size: 16px;
    color: #ffb36b;
    font-weight: 700;
    margin: 14px 0 10px;
}

h5 {
    font-size: 14px;
    color: #9fb2c9;
    font-weight: 700;
    margin: 6px 0 12px;
}

p {
    font-size: 16px;
    color: #d7dde7;
    margin: 0 0 16px;
    line-height: 1.7;
}

li {
    margin-bottom: 6px;
    line-height: 1.6;
}

a {
    color: #6db6ff;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #9ed0ff;
    text-decoration: underline;
}

a:visited {
    color: #6db6ff;
}

a.underline,
a.underline:visited {
    text-decoration: underline;
}

a.ml,
a.ml:visited {
    display: block;
    color: #d7dde7;
    font-weight: 600;
    padding: 9px 12px 9px 14px;
    border-left: 3px solid #2d5b8c;
    margin: 6px 0;
    background-color: #121c2a;
    border-radius: 0 6px 6px 0;
    transition: all 0.2s ease;
    text-decoration: none;
}

a.ml:hover {
    color: #ffffff;
    border-left-color: #6db6ff;
    background-color: #182437;
    transform: translateX(4px);
}

.mh {
    font-size: 14px;
    color: #ffffff;
    background-color: #142132;
    font-weight: 700;
    padding: 8px 12px;
    margin: 12px 0 8px;
    border: 1px solid #1f2b3b;
    border-radius: 6px;
}

.mi {
    background-color: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

.mi:hover {
    background-color: transparent;
}

.bb1 {
    border: 1px solid #1f2b3b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    background-color: #0f1621;
}

.logo {
    background-color: #0c1522;
    padding: 14px;
    text-align: center;
    border-bottom: 1px solid #1f2b3b;
}

.logo img {
    border-radius: 10px;
    background: #101b2a;
    padding: 6px;
}

.header {
    background: linear-gradient(135deg, #101b2a, #0b1118);
    color: white;
    padding: 20px 16px;
    text-align: center;
    border-bottom: 1px solid #1f2b3b;
    font-size: 22px;
    font-weight: 700;
    position: relative;
}

.header img {
    display: none;
}

.header .header-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.header h1 {
    margin: 0;
    font-size: 28px;
    color: #f2f6ff;
    font-weight: 700;
    letter-spacing: 1px;
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
}

.header p {
    margin: 0;
    font-size: 16px;
    color: #9fb2c9;
    font-style: italic;
}

.menubar {
    padding: 20px 0;
    background-color: #0c131d;
    border-right: 1px solid #1f2b3b;
    width: 186px;
}

.tdcontent {
    background-color: #0f1621;
    padding: 26px;
    border-bottom: none;
    font-size: 16px;
}

.tdcontent > p,
.tdcontent > ul,
.tdcontent > table,
.tdcontent > div {
    background: #0d1724;
    border: 1px solid #1f2b3b;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.tdcontent ul {
    padding-left: 20px;
}

.tdcontent table {
    margin-bottom: 20px;
    width: 100%;
    border-collapse: collapse;
    background: #0d1724;
}

.tdcontent table td,
.tdcontent table th {
    border: 1px solid #203043;
    padding: 10px;
    color: #d7dde7;
}

.tdcontent table tr:nth-child(even) td {
    background: #101c2a;
}

.footer {
    padding: 14px;
    font-size: 13px;
    color: #9fb2c9;
    background-color: #0b1118;
    text-align: center;
    border-top: 1px solid #1f2b3b;
}

.footer a {
    color: #cfe4ff;
    text-decoration: underline;
    font-size: 13px;
}

.footer a:hover {
    color: #9ed0ff;
}

.bt1 {
    font-size: 18px;
    color: #6db6ff;
    font-weight: 700;
}

.mas {
    background-color: #0d1724;
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    border: 1px solid #1f2b3b;
}

.hide { display: none; }
.show { display: block; }
.ubtop { margin-top: 16px; }

a.ubtext,
a.ubtext:visited,
a.ubtext:hover {
    color: #d7dde7;
}

.outerwrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.centercol {
    flex: 1;
    min-width: 320px;
    display: block;
    float: none;
    margin: 0;
}

.leftcol, .rightcol {
    display: none;
}

@media screen and (min-width: 1400px) {
    .leftcol {
        display: block;
        width: 180px;
        padding: 10px;
    }
    .rightcol {
        display: block;
        width: 180px;
        padding: 10px;
        position: sticky;
        top: 20px;
        align-self: flex-start;
    }
}

.cc_container {
    background: #111a26;
    color: #d7dde7;
    border: 1px solid #1f2b3b;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    font-family: "Segoe UI", sans-serif;
    font-size: 14px;
    padding: 12px 16px;
    z-index: 9001;
}

.cc_container .cc_btn {
    background-color: #6db6ff;
    color: #0b1118;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cc_container .cc_btn:hover {
    background-color: #9ed0ff;
}

.cc_container a {
    color: #9ed0ff;
    font-weight: 700;
}

@keyframes slideUp {
    from { transform: translateY(40px); }
    to { transform: translateY(0); }
}

.cc_container {
    animation: slideUp 0.6s ease-out;
}

.header-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #172435;
    color: #e6f0ff;
    border: 1px solid #2b4463;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
    background: #22314a;
}

.theme-icon {
    font-size: 16px;
    line-height: 1;
}

.theme-icon-sun {
    display: inline-flex;
}

.theme-icon-moon {
    display: none;
}

body.theme-light .theme-icon-sun {
    display: none;
}

body.theme-light .theme-icon-moon {
    display: inline-flex;
}

.corner-download,
.corner-download:visited {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9500;
    background: #2a74c9;
    color: #ffffff;
    font-weight: 700;
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
    border: 1px solid #3b84d4;
    text-decoration: none;
    letter-spacing: 0.4px;
    font-size: 16px;
}

body.theme-light .corner-download,
body.theme-light .corner-download:visited {
    color: #000000;
}

.corner-download:hover {
    background: #3b84d4;
    color: #ffffff;
    text-decoration: none;
}

@media screen and (max-width: 720px) {
    .corner-download,
    .corner-download:visited {
        right: 12px;
        bottom: 12px;
        padding: 12px 16px;
        font-size: 15px;
    }

    .header-actions {
        top: 12px;
        right: 12px;
    }

    .theme-toggle {
        padding: 5px 8px;
        font-size: 13px;
    }

    .theme-icon {
        font-size: 14px;
    }
}

body.theme-light {
    color-scheme: light;
    background-color: #f4f7fb;
    color: #1d2a3b;
}

body.theme-light h1 {
    color: #102136;
    background: #ffffff;
    border-color: #d5dce6;
    border-left-color: #2a74c9;
    box-shadow: 0 12px 24px rgba(26, 46, 80, 0.12);
}

body.theme-light h2 {
    color: #12324d;
    background: #f7f9fc;
    border-color: #d5dce6;
    border-left-color: #3b84d4;
}

body.theme-light h3 {
    color: #102136;
}

body.theme-light h4 {
    color: #b85f14;
}

body.theme-light h5 {
    color: #4d5f78;
}

body.theme-light p,
body.theme-light li,
body.theme-light .tdcontent table td,
body.theme-light .tdcontent table th {
    color: #1d2a3b;
}

body.theme-light a,
body.theme-light a:visited {
    color: #1f6fd1;
}

body.theme-light a:hover {
    color: #1559a8;
}

body.theme-light .bb1 {
    border-color: #d5dce6;
    background-color: #ffffff;
    box-shadow: 0 16px 32px rgba(26, 46, 80, 0.12);
}

body.theme-light .logo {
    background-color: #f0f4f9;
    border-bottom-color: #d5dce6;
}

body.theme-light .header {
    background: linear-gradient(135deg, #f7f9fc, #e9f0f7);
    color: #1d2a3b;
    border-bottom-color: #d5dce6;
}

body.theme-light .header p {
    color: #4d5f78;
}

body.theme-light .menubar {
    background-color: #f2f6fb;
    border-right-color: #d5dce6;
}

body.theme-light .mh {
    background-color: #e6eef8;
    color: #1d2a3b;
    border-color: #d5dce6;
}

body.theme-light a.ml,
body.theme-light a.ml:visited {
    color: #1d2a3b;
    background-color: #ffffff;
    border-left-color: #2a74c9;
}

body.theme-light a.ml:hover {
    color: #0f1e30;
    background-color: #eef3f8;
}

body.theme-light .tdcontent {
    background-color: #ffffff;
}

body.theme-light .tdcontent > p,
body.theme-light .tdcontent > ul,
body.theme-light .tdcontent > table,
body.theme-light .tdcontent > div {
    background: #f7f9fc;
    border-color: #d5dce6;
    box-shadow: 0 12px 24px rgba(26, 46, 80, 0.08);
}

body.theme-light .tdcontent table {
    background: #ffffff;
}

body.theme-light .tdcontent table td,
body.theme-light .tdcontent table th {
    border-color: #d5dce6;
}

body.theme-light .tdcontent table tr:nth-child(even) td {
    background: #eef3f8;
}

body.theme-light .footer {
    background-color: #f2f6fb;
    color: #4d5f78;
    border-top-color: #d5dce6;
}

body.theme-light .footer a {
    color: #1f6fd1;
}

body.theme-light .theme-toggle {
    background: #ffffff;
    color: #1d2a3b;
    border-color: #c7d3e3;
    box-shadow: 0 8px 18px rgba(20, 40, 70, 0.12);
}

body.theme-light .theme-toggle:hover {
    background: #f1f6fb;
}
