/* Базовая тёмная тема */
@font-face {
    font-family: 'PS3';
    src: URL('/static/PS3.ttf') format('truetype');
}
:root {
    --bg-color: #121212;
    --header-bg: #1e1e1e;
    --footer-bg: #1a1a1a;
    --text-color: #e0e0e0;
    --accent-color: #0d6efd;
    --danger-color: #dc3545;
    --border-color: #2c2c2c;
    --transition: 0.3s ease;
}

body {
    background: linear-gradient(0deg,#1f1e1d 0%,#1f1e1d 80%,#242422 100%);
    background-color: #1f1e1d;
    background-position: 0 60px;
    background-repeat: repeat-x;
    overflow-y: scroll;
    color: #e0e0e0;
    font-family: "Segoe UI", sans-serif;
    line-height: 1;
    margin: 0;
    padding: 0;
    text-align: center;
}

/* Шапка */
#hat {
background: url("/static/globalheader_bg.jpg");
background-size:contain;
padding: 1rem 2rem;
display: grid;
border-bottom: 1px solid var(--border-color);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
position: sticky;
top: 0;
z-index: 1000;
grid-template-columns: 10% 67% 10% 3% 3% 8%;
height:43px;
}

#hat a {
color: var(--text-color);
text-decoration: none;
font-weight: bold;
position: relative;
top:30%;
transition: color var(--transition);
height: 20px;
}
.home {
    grid-column: 1;
}
.home::before {
    font-family: PS3;
    content: "e ";
    font-size:60px;
    top: -22px;
    left: -30px;
    position:absolute;
}
.reg {
    grid-column: 3;
}
.login {
    grid-column:6;
}
.reg:before {
    font-family: PS3;
    content: "s ";
}
.login:before {
    font-family: PS3;
    content: "b ";
}
.inbox {
    grid-column: 4;
    grid-row: 1;
}
.send {
    grid-column: 5;
    grid-row: 1;
}
hr {
    border: none;
    border-top: 3px double #333;
    color: #333;
    overflow: visible;
    text-align: left;
    align-self: left
    height: 5px;
}
.links {
    height: 100%;
    width: 80px;
    position: absolute;
    top: 0;
    left: 0;
    background-color: #262626;
    border-right: 1px solid #525252;
    overflow-x: hidden;
    padding-top: 20px;
    width:200px;
    z-index:999;
}
.links > ul {
    padding-left:0;
    display: block;
    margin-top:50%;
}
a {
    color: #688ba8;
    text-decoration:none;

}
.links a:before {
    font-family: PS3;
    content: "z ";
}
a:visited {
    color: #55557f;
}
.title {
    text-align:left;
    color:white;

}

.login {
    grid-column: 6;
}
#hat a::after {
content: "";
position: absolute;
width: 0%;
height: 2px;
left: 0;
bottom: -2px;
transition: text-shadow 0.3s ease;
background: var(--accent-color);
}
.main {
    margin-left: 250px;
}
#hat a:hover {
transition: text-shadow 0.3s ease;
text-shadow: 0 0 5px #ffffff;
}

#hat a:hover::after {
text-shadow: 0 0 5px #ffffff;
transition: text-shadow 0.3s ease;
}


/* Контент */
body > *:not(header):not(footer) {
    flex: 1;
    padding: 2rem;
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    padding: 1rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    position: fixed;
    display:block;
    color: #aaa;
    bottom:0;
    z-index:1000;
}

/* Формы */
form {
    max-width: 500px;
    margin: 0 auto;
    background: #1c1c1c;
    padding: 2rem;
    border-radius: 2px;
    transition: transform var(--transition), box-shadow var(--transition);
    display: grid;
    grid-auto-rows: 30px 30px 30px 30px;
}

.ifnot {
    .ifnot {
        color: #9a9996;
    }   color: #9a9996;
}
.ifnot a {
    color: #9a9996;
}
form select, form textarea, form button, input, button {
    background: linear-gradient(to bottom,#242424 0%,#141414 60%);
    border: 1px solid #a2a9b1;
    border-radius: 2px;
    border-color: #666666;
    color:#f2f2f2;
    line-height: 1.5em;
}

form input:focus, form select:focus, form textarea:focus {
    outline: none;
}



/* Адаптивность */
@media (max-width: 768px) {
    #hat {
    flex-direction: column;
    align-items: flex-end;
    }

    body > *:not(header):not(footer) {
        padding: 1rem;
    }

    form {
        padding: 1.5rem;
    }
}

/* Общий стиль для заголовков h1-h5 */
h1, h2, h3, h4, h5 {
    padding-left: 12px;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    transition: border-color 0.3s ease, color 0.3s ease;
}


p {
    margin: 0.1rem 0;
    line-height: 1.4;
}

/* === Контейнер редактора === */
#editor-container {
width: 95%;
position: relative;
margin-bottom: 2em;
text-align: left;
}

#editor {
position: absolute;
width: 100%;
height: 100em;
background-color: #1e1e1e;
border: 1px solid #333;
overflow: auto;
position: inherit;
}

/* === Мобильная адаптация для редактора === */
@media (max-width: 768px) {
    #editor-container {
    height: auto;
    min-height: 70vh;
    margin-bottom: 1.5em;
    }

    #editor {
    position: relative;
    height: 60vh;
    font-size: 0.95rem;
    }
}
.list {
    display: table;
    border: 1px solid #525252;
    background-color: #3A3A3A;
    padding: 8px 8px 5px 8px;
    font-size: 95%;
}
li {
    list-style-image: none;
    list-style: none;
    list-style-type: none;
}
h1, h2, h3, h4, h5, h6, p, hp {
    text-align: left;
    color: #b9b7b5;
    padding-right: 20%;
}
#tight-block {
margin: 0;
padding: 0;
line-height: 1;
font-size: 1rem;
}
.wikiimg {
    position: absolute;
    top: 10%;
    right: 1%;
    display: flex;
    flex-direction: column;
    flex-direction: 10px;
}
.wikiimg > p {
    margin-bottom: 60px;
}
.articlelist {
    text-align:left;
    font-size: 30px;
}
.articlelist > div > a:before {
    font-family: PS3;
    content: "[ ";
}
#data {
    height: 50px;
    display:block;
}
stub {

}
