body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    margin: 0;
    padding: 0;
}

#topblock {
    background-color: #2c3e50;
    color: white;
    padding: 10px 20px;
    text-align: right;
}

#donntu a {
    color: #ecf0f1;
    text-decoration: none;
    margin-left: 15px;
    font-weight: bold;
}

#donntu a:hover {
    color: #1abc9c;
}

#header {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 20px;
    border-bottom: 3px solid #1abc9c;
}

#photomag img {
    border-radius: 10px;
    border: 3px solid #2c3e50;
}

#headertext {
    margin-left: 30px;
}

.hdr {
    margin: 5px 0;
    color: #2c3e50;
}

.hdr a {
    color: #2980b9;
    text-decoration: none;
}

.hdr a:hover {
    color: #1abc9c;
}

#middleblock {
    margin: 20px;
}

#menu {
    width: auto;
    background-color: #2c3e50;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.button {
    display: inline-block;
    padding: 12px 25px;
    margin: 0 5px 10px 5px;
    text-align: center;
    background-color: #34495e;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s;
    min-width: 150px;
}

.button:hover {
    background-color: #1abc9c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.button.colorfix {
    background-color: #1abc9c;
}

.button.colorfix:hover {
    background-color: #16a085;
}

.button.color {
    background-color: #2980b9;
}

.button.color:hover {
    background-color: #1abc9c;
}

#maintext {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#maintext h1 {
    text-align: center;
    margin: 20px 0 30px 0;
    color: #2c3e50;
    font-size: 2em;
}

#maintext h2 {
    color: #2c3e50;
    border-bottom: 2px solid #1abc9c;
    padding-bottom: 10px;
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.5em;
}

#maintext h3 {
    color: #2c3e50;
    border-left: 4px solid #2980b9;
    padding-left: 15px;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.2em;
}

#maintext p {
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: justify;
}

.content {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px 20px 20px 40px;
    margin: 25px 0;
}

.ct1 {
    margin: 10px 0;
    line-height: 1.5;
    font-size: 1.1em;
}

.ct1 a {
    color: #2980b9;
    text-decoration: none;
    font-weight: bold;
}

.ct1 a:hover {
    color: #1abc9c;
    text-decoration: underline;
}

#maintext ul:not(.content) {
    background-color: #f8f9fa;
    padding: 15px 20px 15px 40px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #1abc9c;
}

#resume {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

#maintext ul li, #maintext ol li, #maintext tr.odd {
    margin: 10px 0;
    line-height: 1.6;
}

#maintext tr.odd {
    display: table-row;
    border-bottom: 1px solid #e0e0e0;
}

#maintext tr.odd:last-child {
    border-bottom: none;
}

#maintext tr.odd td {
    padding: 15px;
    vertical-align: top;
}

#maintext tr.odd td.c1 {
    font-weight: 600;
    color: #2c3e50;
    width: 15%;
    background-color: #f8f9fa;
    text-align: center;
}

#maintext tr.odd td.c2 {
    color: #333;
    width: 70%;
    text-align: left;
    vertical-align: middle;
    border-left: 4px solid #2c3e50;
}

#maintext tr.odd td.c2 ol,
#maintext tr.odd td.c2 ul {
    margin: 15px 0;
    padding-left: 25px;
}

#maintext tr.odd td.c2 li {
    margin: 8px 0;
    line-height: 1.5;
}

.img {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.img img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.imgcaption {
    text-align: center !important;
    font-style: italic;
    color: #666;
    margin-top: 15px;
    font-size: 0.9em;
}

/* ОБЩИЕ СТИЛИ ДЛЯ ВСЕХ ССЫЛОК В КОНТЕНТЕ */
/*#content a {
    color: #2980b9;
    text-decoration: none;
}

#content a:hover {
    color: #1abc9c;
    text-decoration: underline;
}*/

/* СПЕЦИАЛЬНЫЙ СТИЛЬ ДЛЯ ССЫЛОК В ИСТОЧНИКАХ */
.lib p a.istochnik {
    font-weight: normal !important;
    font-size: 1em !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    display: inline !important;
    line-height: 1.6 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
}

.reference {
    color: #2980b9;
    text-decoration: none;
    font-weight: normal;
}

.reference:hover {
    color: #1abc9c;
    text-decoration: underline;
}

#content ol {
    background-color: #f8f9fa;
    padding: 20px 20px 20px 40px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #2c3e50;
}

#content ol li {
    margin: 10px 0;
    line-height: 1.6;
}

#content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 20px;
}

.article_name {
    color: #2c3e50;
    font-size: 1.8em;
    text-align: center;
    margin-bottom: 15px;
    border-bottom: 2px solid #1abc9c;
    padding-bottom: 10px;
}

.article_author {
    color: #2c3e50;
    font-size: 1.2em;
    text-align: center;
    margin-bottom: 10px;
}

.article_university {
    color: #666;
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 20px;
    font-style: italic;
}

.article_source {
    color: #555;
    font-size: 0.95em;
    text-align: center;
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f0f4f8;
    border-radius: 5px;
    border-left: 3px solid #2980b9;
}

#content h4 {
    color: #2c3e50;
    border-left: 4px solid #2980b9;
    padding-left: 15px;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.non_scientific {
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: justify;
}

#content ul[style*="list-style: none"] li {
    margin: 8px 0;
    padding-left: 20px;
    position: relative;
}

#content ul[style*="list-style: none"] li span {
    position: absolute;
    left: 0;
    color: #1abc9c;
    font-weight: bold;
}

#content .img {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ddd;
}

#content .img img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#content .imgcaption {
    text-align: center !important;
    font-style: italic;
    color: #666;
    margin-top: 15px;
    font-size: 0.9em;
}

.literatura {
    font-style: italic;
    color: #2c3e50;
}

q {
    font-style: italic;
    color: #666;
    quotes: "«" "»" "‹" "›";
}

a[name] {
    display: block;
    visibility: hidden;
    position: relative;
    top: -20px;
}

#maintext hr {
    border: none;
    height: 2px;
    background-color: #1abc9c;
    margin: 40px 0;
}

#menub {
    text-align: center;
    background-color: #2c3e50;
    padding: 15px;
    border-top: 3px solid #1abc9c;
    margin-top: 30px;
}

.mitemb {
    color: white;
    text-decoration: none;
    margin: 0 20px;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 5px;
    transition: all 0.3s;
    display: inline-block;
}

.mitemb:hover {
    background-color: #1abc9c;
    transform: translateY(-2px);
}

#maintext:has(.lib) > h1:first-of-type,
.scientific-works-page #maintext > h1:first-of-type {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 40px;
    padding-bottom: 15px;
    border-bottom: 3px solid #1abc9c;
    position: relative;
}

#maintext:has(.lib) > h1:first-of-type::after,
.scientific-works-page #maintext > h1:first-of-type::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #1abc9c, #2980b9);
}

#maintext:has(.lib) > h2,
.scientific-works-page #maintext > h2 {
    color: #2c3e50;
    background: linear-gradient(90deg, #f8f9fa, #ffffff);
    padding: 20px 25px;
    border-radius: 10px;
    margin: 40px 0 25px 0;
    border-left: 6px solid #2980b9;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    font-size: 1.6em;
    border-bottom: none !important;
}

#maintext:has(.lib) > ol[start="2"],
.scientific-works-page #maintext > ol[start="2"] {
    counter-reset: publication-counter 1 !important;
}

#maintext ol > li.lib {
    counter-increment: publication-counter;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 30px 30px 30px 80px;
    margin: 25px 0;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    transition: all 0.3s ease;
    overflow: visible;
    list-style-type: none !important;
}

#maintext:has(.lib) ol > li.lib:hover,
.scientific-works-page #maintext ol > li.lib:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
    border-color: #1abc9c;
}

#maintext:has(.lib) ol > li.lib::before,
.scientific-works-page #maintext ol > li.lib::before {
    content: counter(publication-counter) !important;
    position: absolute;
    top: 50%;
    left: 25px;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.3em;
    box-shadow: 0 4px 10px rgba(26, 188, 156, 0.3);
    z-index: 10;
}

#maintext:has(.lib) .lib a,
.scientific-works-page #maintext .lib a {
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25em;
    display: block;
    margin-bottom: 15px;
    line-height: 1.4;
    transition: color 0.3s;
    padding-right: 20px;
}

a:hover {
    color: #800080;
}

#maintext:has(.lib) ol > li.lib:not(:last-child),
.scientific-works-page #maintext ol > li.lib:not(:last-child) {
    border-bottom: 1px dashed #e1e8ed;
    padding-bottom: 30px;
    margin-bottom: 30px;
}

.cat {
    color: #2c3e50;
    font-weight: 700;
    display: inline-block;
    min-width: 100px;
    position: relative;
}

.cat::after {
    content: ':';
    margin-right: 10px;
}

.lib p {
    margin: 18px 0;
    line-height: 1.7;
    color: #444;
    padding-left: 10px;
    border-left: 3px solid transparent;
    transition: border-color 0.3s;
}

.lib:hover p {
    border-left-color: #1abc9c;
}