BODY {
    font-size: 14px;
    font-family: 'Inter', 'Segoe UI', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    background: 
        linear-gradient(135deg, #0057b7 0%, #ffd700 100%),
        linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.1) 75%);
    background-size: 100% 100%, 60px 60px;
    background-attachment: fixed;
    margin: 0;
    padding: 12px;
    color: #2c3e50;
    line-height: 1.6;
    min-height: 100vh;
}

/* Украинская символика в фоне */
BODY:before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="40" fill="rgba(255,215,0,0.05)">🌻</text></svg>') repeat,
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="30" fill="rgba(0,87,183,0.03)">🇺🇦</text></svg>') repeat;
    background-size: 120px 120px, 200px 200px;
    background-position: 0 0, 60px 60px;
    pointer-events: none;
    z-index: -1;
}

FONT, TH, TD, P {
    font-family: 'Inter', 'Segoe UI', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #2c3e50;
}

TD {
    font-size: 13px;
    color: #2c3e50;
}

P {
    font-size: 14px;
    line-height: 1.7;
    color: #34495e;
}

/* === ССЫЛКИ === */
A:link, A:active {
    color: #0057b7;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

A:link:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0057b7, #ffd700);
    transition: width 0.3s ease;
}

A:hover:after {
    width: 100%;
}

A:visited {
    color: #6c5ce7;
    text-decoration: none;
}

A:hover {
    color: #ffd700;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transform: translateY(-1px);
}

A.postlink {
    color: #0057b7;
    text-decoration: none;
    font-weight: 600;
}

A.postlink:hover {
    color: #ffd700;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* === ЗАГОЛОВКИ ТЕМ === */
.topictitle {
    font-weight: 700;
    font-size: 15px;
    color: #0057b7;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    line-height: 1.4;
}

A.topictitle:link, A.topictitle:active {
    color: #0057b7;
    text-decoration: none;
}

A.topictitle:visited {
    color: #6c5ce7;
}

A.topictitle:hover {
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transform: translateY(-1px);
}

/* === ОСНОВНЫЕ КОНТЕЙНЕРЫ === */
.bodyline {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 16px;
    box-shadow: 
        0 20px 40px rgba(0, 87, 183, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.bodyline:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0057b7 0%, #ffd700 50%, #0057b7 100%);
    background-size: 200% 100%;
    animation: patriotic-flow 3s ease-in-out infinite;
}

@keyframes patriotic-flow {
    0%, 100% { background-position: -200% 0; }
    50% { background-position: 200% 0; }
}

.forumline {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 87, 183, 0.1);
    border-radius: 12px;
    border-collapse: separate;
    margin: 8px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(5px);
}

/* === КАТЕГОРИИ - УКРАИНСКИЙ ФЛАГ === */
TD.cat, TD.catHead, TD.catSides, TD.catLeft, TD.catRight, TD.catBottom {
    background: linear-gradient(135deg, #0057b7 0%, #003f82 50%, #0057b7 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 13px;
    height: 40px;
    text-indent: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

TD.cat:after, TD.catHead:after, TD.catSides:after,
TD.catLeft:after, TD.catRight:after, TD.catBottom:after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    clip-path: polygon(20% 0%, 100% 0%, 100% 100%, 0% 100%);
}

TD.cat:before, TD.catHead:before, TD.catSides:before,
TD.catLeft:before, TD.catRight:before, TD.catBottom:before {
    content: '🇺🇦';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    z-index: 2;
}

/* === ШАПКА ТАБЛИЦ === */
TH {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    color: #0057b7;
    font-size: 12px;
    font-weight: 700;
    height: 36px;
    text-align: left;
    padding: 0 20px;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: relative;
}

TH:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #0057b7, transparent);
}

/* === СТРОКИ ТАБЛИЦ === */
.row1 {
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(0, 87, 183, 0.08);
    transition: all 0.3s ease;
}

.row1:hover {
    background: rgba(0, 87, 183, 0.05);
    transform: translateX(4px);
    box-shadow: -4px 0 0 #ffd700;
}

.row2 {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(0, 87, 183, 0.08);
    transition: all 0.3s ease;
}

.row2:hover {
    background: rgba(255, 215, 0, 0.08);
    transform: translateX(4px);
    box-shadow: -4px 0 0 #0057b7;
}

.row3 {
    background: rgba(233, 236, 239, 0.8);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(0, 87, 183, 0.08);
}

TD.spacerow {
    background: linear-gradient(90deg, #0057b7, #ffd700, #0057b7);
    height: 3px;
}

.alt1, .alt1Active {
    background: rgba(248, 249, 250, 0.9);
}

.alt2, .alt2Active {
    background: rgba(255, 255, 255, 0.9);
}

/* === ЗАГОЛОВКИ === */
.maintitle, H1 {
    color: #0057b7;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 32px;
    font-weight: 900;
    text-decoration: none;
    text-shadow: 0 3px 6px rgba(0, 87, 183, 0.2);
    position: relative;
    padding-left: 60px;
    line-height: 1.2;
}

.maintitle:before, H1:before {
    content: '🌐';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 40px;
    background: linear-gradient(135deg, #0057b7, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.maintitle:after, H1:after {
    content: 'Каталог України';
    position: absolute;
    bottom: -24px;
    left: 60px;
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.subtitle, H2 {
    color: #ffd700;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    background: linear-gradient(135deg, #0057b7, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    padding-left: 24px;
}

.subtitle:before, H2:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #0057b7, #ffd700);
    border-radius: 50%;
}

/* === НАВИГАЦИЯ === */
.nav {
    font-weight: 700;
    font-size: 14px;
    color: #0057b7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.topnav {
    background: linear-gradient(180deg, rgba(0, 87, 183, 0.9) 0%, rgba(0, 63, 130, 0.9) 100%);
    backdrop-filter: blur(10px);
    border: none;
    font-size: 13px;
    color: #ffffff;
    height: 40px;
    box-shadow: 0 2px 10px rgba(0, 87, 183, 0.3);
}

.navbar {
    font-size: 13px;
    color: #0057b7;
    font-weight: 600;
    background: rgba(248, 249, 250, 0.9);
    backdrop-filter: blur(5px);
    padding: 12px 16px;
    border-radius: 8px;
    margin: 8px 0;
    border-left: 4px solid #ffd700;
}

.navbar a {
    color: #0057b7;
    text-decoration: none;
    font-weight: 700;
    position: relative;
}

.navbar a:hover {
    color: #ffd700;
}

/* === СООБЩЕНИЯ === */
.postbody {
    font-size: 15px;
    line-height: 1.8;
    color: #2c3e50;
    padding: 16px;
}

.postdetails {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

.name {
    font-weight: 800;
    font-size: 15px;
    color: #0057b7;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.smallfont {
    font-size: 12px;
    color: #6c757d;
}

.time {
    color: #6c757d;
    font-size: 12px;
    font-style: italic;
}

/* === ЦИТАТЫ И КОД === */
.quote {
    background: 
        linear-gradient(135deg, rgba(0, 87, 183, 0.05) 0%, rgba(255, 215, 0, 0.05) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="60" fill="rgba(0,87,183,0.02)">"</text></svg>') no-repeat top left;
    border: none;
    border-left: 6px solid #0057b7;
    border-radius: 0 12px 12px 0;
    font-size: 14px;
    color: #2c3e50;
    line-height: 1.7;
    padding: 20px 24px;
    margin: 16px 0;
    position: relative;
    backdrop-filter: blur(5px);
}

.quote:before {
    content: '💬';
    position: absolute;
    top: -8px;
    left: -12px;
    background: #0057b7;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(0, 87, 183, 0.3);
}

.code {
    background: #1a1a1a;
    border: 2px solid #0057b7;
    border-radius: 12px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', monospace;
    color: #ffd700;
    font-size: 14px;
    padding: 20px 24px;
    overflow-x: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.code:before {
    content: '</> Ukrainian Web';
    position: absolute;
    top: 8px;
    right: 12px;
    color: #6c757d;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code_td, .php_td, .q_td, .quote_td {
    font-size: 14px;
    color: #2c3e50;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

.code_table, .php_table, .q_table, .quote_table {
    border: 2px solid rgba(0, 87, 183, 0.2);
    border-radius: 12px;
    font-size: 14px;
    width: 95%;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

/* === ФОРМЫ === */
FORM {
    display: inline;
}

INPUT, SELECT, TEXTAREA {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 14px;
    color: #2c3e50;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(0, 87, 183, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

INPUT:focus, SELECT:focus, TEXTAREA:focus {
    outline: none;
    border-color: #0057b7;
    box-shadow: 0 0 0 4px rgba(0, 87, 183, 0.1);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 1);
}

INPUT.post, TEXTAREA.post {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(0, 87, 183, 0.2);
    color: #2c3e50;
}

INPUT.button, INPUT.liteoption, .fakebut {
    background: linear-gradient(135deg, #0057b7 0%, #003f82 100%);
    border: none;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    border-radius: 12px;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: relative;
    overflow: hidden;
}

INPUT.button:before, INPUT.liteoption:before, .fakebut:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

INPUT.button:hover:before, INPUT.liteoption:hover:before, .fakebut:hover:before {
    left: 100%;
}

INPUT.button:hover, INPUT.liteoption:hover, .fakebut:hover {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #0057b7;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 87, 183, 0.3);
}

INPUT.catbutton {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border: none;
    color: #0057b7;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    text-transform: uppercase;
}

INPUT.mainoption {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    border-radius: 12px;
    text-transform: uppercase;
}

/* === РАЗДЕЛИТЕЛИ === */
HR {
    border: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, #0057b7, #ffd700, #0057b7, transparent);
    position: relative;
    margin: 24px 0;
}

HR:after {
    content: '🌻';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(0, 87, 183, 0.2);
}

/* === ВСПОМОГАТЕЛЬНЫЕ КЛАССЫ === */
.gensmall {
    font-size: 12px;
    color: #6c757d;
}

TD.genmed, .genmed {
    font-size: 14px;
    color: #2c3e50;
}

.explaintitle {
    font-weight: 800;
    font-size: 14px;
    color: #0057b7;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.helpline {
    background: rgba(248, 249, 250, 0.9);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 87, 183, 0.1);
    font-size: 13px;
    border-radius: 8px;
}

.errorline {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    color: #ffffff;
    border-radius: 8px;
    font-weight: 600;
}

/* === МОДЕРАТОРЫ И АДМИНЫ === */
.admin {
    color: #dc3545;
    font-weight: 800;
    font-size: 14px;
    text-shadow: 0 1px 3px rgba(220, 53, 69, 0.2);
}

A.admin, A.admin:visited {
    color: #dc3545;
    text-decoration: none;
}

A.admin:hover {
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.mod {
    color: #28a745;
    font-weight: 800;
    font-size: 14px;
    text-shadow: 0 1px 3px rgba(40, 167, 69, 0.2);
}

A.mod, A.mod:visited {
    color: #28a745;
    text-decoration: none;
}

A.mod:hover {
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

/* === ИЗОБРАЖЕНИЯ === */
IMG {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

IMG:hover {
    transform: scale(1.02);
}

/* === КОПИРАЙТ === */
.copyright {
    font-size: 12px;
    color: #6c757d;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    text-align: center;
    padding: 16px;
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 8px;
    margin-top: 24px;
}

A.copyright {
    color: #0057b7;
    text-decoration: none;
    font-weight: 600;
}

A.copyright:hover {
    color: #ffd700;
}

/* === КНОПКИ-ССЫЛКИ === */
.pgbutt a {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 13px;
    color: #ffffff;
    text-decoration: none;
    background: linear-gradient(135deg, rgba(0, 87, 183, 0.9) 0%, rgba(0, 63, 130, 0.9) 100%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 16px;
    margin: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pgbutt a:hover {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #0057b7;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    border-color: rgba(0, 87, 183, 0.3);
}

A.but, A.but:visited {
    color: #2c3e50;
    text-decoration: none;
}

A.but:hover {
    color: #0057b7;
}

/* === QR-CODE === */
#qr img {
    width: 45px;
    height: 45px;
    position: fixed;
    right: 24px;
    top: 24px;
    border: 3px solid #0057b7;
    border-radius: 12px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(0, 87, 183, 0.2);
}

#qr img:hover {
    width: 220px;
    height: 220px;
    z-index: 100;
    padding: 8px;
    box-shadow: 0 20px 60px rgba(0, 87, 183, 0.3);
    transform: scale(1.02);
}

/* === АВАТАР ПО УМОЛЧАНИЮ === */
.guestavatar {
    width: 120px;
    height: 120px;
    text-align: center;
    background: 
        linear-gradient(135deg, #0057b7 0%, #ffd700 50%, #0057b7 100%),
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), transparent);
    color: #ffffff;
    font-size: 48px;
    font-weight: 900;
    display: table-cell;
    border-radius: 20px;
    border: 4px solid rgba(255, 255, 255, 0.8);
    vertical-align: middle;
    box-shadow: 0 10px 30px rgba(0, 87, 183, 0.3);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}

/* === НАВИГАЦИОННОЕ МЕНЮ === */
#nav8, #nav8 ul, #nav8 li {
    margin: 0;
    padding: 0;
    border: 0;
}

#nav8, #nav8 ul {
    background: linear-gradient(135deg, rgba(0, 87, 183, 0.95) 0%, rgba(0, 63, 130, 0.95) 100%);
    backdrop-filter: blur(15px);
}

#nav8 {
    border: none;
    border-radius: 12px;
    border-spacing: 0;
    position: relative;
    z-index: 50;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 87, 183, 0.3);
    overflow: hidden;
}

#nav8:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ffd700, #0057b7, #ffd700);
    background-size: 200% 100%;
    animation: patriotic-flow 3s linear infinite;
}

#nav8 ul {
    position: absolute;
    display: none;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 87, 183, 0.2);
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 87, 183, 0.2);
}

#nav8 td:hover ul {
    display: block;
}

#nav8 ul li {
    list-style: none;
}

#nav8 .right {
    direction: rtl;
}