:root {
            --chestnut-dark: #8B4513;
            --chestnut-medium: #A0522D;
            --chestnut-light: #CD853F;
            --chestnut-pale: #F4E4BC;
            --chestnut-cream: #FFF8DC;
            --kyiv-gold: #FFD700;
            --kyiv-blue: #0057B8;
            --text-primary: #2C1810;
            --text-secondary: #5D4037;
            --text-muted: #8D6E63;
            --bg-primary: #FFFFFF;
            --bg-secondary: #FFF8F0;
            --bg-tertiary: #F5F5DC;
            --border-color: #DDD0C0;
            --hover-color: #D4AF37;
            --shadow-light: rgba(139, 69, 19, 0.1);
            --shadow-medium: rgba(139, 69, 19, 0.2);
            --gradient-primary: linear-gradient(135deg, var(--chestnut-light), var(--chestnut-medium));
            --gradient-secondary: linear-gradient(135deg, var(--chestnut-pale), var(--chestnut-cream));
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
            background: var(--gradient-secondary);
            color: var(--text-primary);
            line-height: 1.6;
            font-size: 14px;
            min-height: 100vh;
        }

        /* Современные скроллбары */
        ::-webkit-scrollbar {
            width: 8px;
        }

        ::-webkit-scrollbar-track {
            background: var(--bg-tertiary);
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb {
            background: var(--chestnut-medium);
            border-radius: 4px;
            transition: background 0.3s ease;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: var(--chestnut-dark);
        }

        /* SVG иконки как CSS */
        .icon {
            display: inline-block;
            width: 20px;
            height: 20px;
            vertical-align: middle;
            margin-right: 8px;
            fill: currentColor;
        }

        .icon-forum::before {
            content: "";
            display: inline-block;
            width: 20px;
            height: 20px;
            margin-right: 8px;
            background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23A0522D'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E") no-repeat center;
            background-size: contain;
        }

        .icon-topic::before {
            content: "";
            display: inline-block;
            width: 20px;
            height: 20px;
            margin-right: 8px;
            background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23A0522D'%3E%3Cpath d='M9 11H7v6h2v-6zm4 0h-2v6h2v-6zm4 0h-2v6h2v-6zm2.5-9H19v2h-1.5v17.5c0 .83-.67 1.5-1.5 1.5h-9c-.83 0-1.5-.67-1.5-1.5V4H4.5C3.67 4 3 3.33 3 2.5S3.67 1 4.5 1h15c.83 0 1.5.67 1.5 1.5S20.33 4 19.5 4z'/%3E%3C/svg%3E") no-repeat center;
            background-size: contain;
        }

        .icon-user::before {
            content: "";
            display: inline-block;
            width: 20px;
            height: 20px;
            margin-right: 8px;
            background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23A0522D'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E") no-repeat center;
            background-size: contain;
        }

        /* Типографика */
        .maintitle, h1, h2 {
            font-family: 'Georgia', 'Times New Roman', serif;
            font-weight: 700;
            font-size: 24px;
            color: var(--chestnut-dark);
            text-decoration: none;
            line-height: 1.3;
            margin-bottom: 16px;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
        }

        /* Ссылки */
        a {
            color: var(--chestnut-medium);
            text-decoration: none;
            transition: all 0.3s ease;
            position: relative;
        }

        a:hover {
            color: var(--kyiv-gold);
            transform: translateY(-1px);
        }

        a::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 0;
            height: 2px;
            background: var(--kyiv-gold);
            transition: width 0.3s ease;
        }

        a:hover::after {
            width: 100%;
        }

        /* Основная структура */
        .bodyline {
            background: var(--bg-primary);
            border-radius: 12px;
            box-shadow: 0 10px 30px var(--shadow-light);
            overflow: hidden;
            margin: 20px auto;
            max-width: 1200px;
        }

        .forumline {
            background: var(--bg-primary);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            margin: 10px 0;
            overflow: hidden;
            box-shadow: 0 4px 12px var(--shadow-light);
            transition: all 0.3s ease;
        }

        .forumline:hover {
            box-shadow: 0 6px 20px var(--shadow-medium);
            transform: translateY(-2px);
        }

        /* Строки таблицы */
        td.row1 {
            background: var(--bg-primary);
            border-bottom: 1px solid var(--border-color);
            padding: 12px 16px;
            transition: background 0.3s ease;
        }

        td.row2 {
            background: var(--bg-secondary);
            border-bottom: 1px solid var(--border-color);
            padding: 12px 16px;
            transition: background 0.3s ease;
        }

        td.row3 {
            background: var(--bg-tertiary);
            border-bottom: 1px solid var(--border-color);
            padding: 12px 16px;
            transition: background 0.3s ease;
        }

        tr:hover td.row1,
        tr:hover td.row2,
        tr:hover td.row3 {
            background: var(--chestnut-pale);
            transform: scale(1.01);
        }

        /* Заголовки */
        th {
            background: var(--gradient-primary);
            color: var(--chestnut-cream);
            font-size: 14px;
            font-weight: 600;
            padding: 16px;
            text-align: left;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            border: none;
            position: relative;
            overflow: hidden;
        }

        th::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.5s ease;
        }

        th:hover::before {
            left: 100%;
        }

        /* Категории */
        td.cat, td.catHead, td.catSides, td.catLeft, td.catRight, td.catBottom {
            background: var(--gradient-primary);
            color: var(--chestnut-cream);
            border: none;
            padding: 12px 16px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .cattitle {
            font-weight: 700;
            font-size: 16px;
            color: var(--chestnut-cream);
            letter-spacing: 1px;
        }

        a.cattitle {
            color: var(--chestnut-cream);
        }

        a.cattitle:hover {
            color: var(--kyiv-gold);
        }

        /* Ссылки форума */
        .forumlink {
            font-weight: 600;
            font-size: 15px;
            color: var(--chestnut-dark);
            display: flex;
            align-items: center;
        }

        a.forumlink {
            color: var(--chestnut-dark);
        }

        a.forumlink:hover {
            color: var(--kyiv-gold);
        }

        /* Навигация */
        .nav {
            font-weight: 600;
            font-size: 14px;
            color: var(--text-primary);
            background: var(--bg-tertiary);
            padding: 12px 16px;
            border-radius: 8px;
            margin: 10px 0;
            display: flex;
            align-items: center;
            flex-wrap: wrap;
        }

        .nav a {
            margin-right: 16px;
            padding: 6px 12px;
            border-radius: 6px;
            background: var(--bg-primary);
            border: 1px solid var(--border-color);
            transition: all 0.3s ease;
        }

        .nav a:hover {
            background: var(--chestnut-light);
            color: var(--chestnut-cream);
            transform: translateY(-2px);
        }

        /* Топики */
        .topictitle {
            font-weight: 600;
            font-size: 14px;
            color: var(--text-primary);
            display: flex;
            align-items: center;
        }

        a.topictitle {
            color: var(--chestnut-medium);
        }

        a.topictitle:visited {
            color: var(--text-muted);
        }

        a.topictitle:hover {
            color: var(--kyiv-gold);
        }

        /* Пользователи */
        .name {
            font-size: 14px;
            color: var(--text-primary);
            font-weight: 600;
        }

        .postdetails {
            font-size: 12px;
            color: var(--text-muted);
            margin-top: 4px;
        }

        /* Сообщения */
        .postbody {
            font-size: 14px;
            line-height: 1.7;
            color: var(--text-primary);
            padding: 16px;

            margin: 12px 0;
        }

        /* Код и цитаты */
        .code {
            font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
            font-size: 13px;
            color: var(--chestnut-dark);
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            border-left: 4px solid var(--chestnut-medium);
            padding: 16px;
            margin: 12px 0;
            border-radius: 6px;
            overflow-x: auto;
        }

        .quote {
            font-style: italic;
            color: var(--text-secondary);
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-left: 4px solid var(--kyiv-gold);
            padding: 16px;
            margin: 12px 0;
            border-radius: 6px;
            position: relative;
        }

        .quote::before {
            content: '"';
            font-size: 48px;
            color: var(--kyiv-gold);
            position: absolute;
            top: -10px;
            left: 16px;
            opacity: 0.3;
        }

        /* Формы */
        input, textarea, select {
            color: var(--text-primary);
            font-family: inherit;
            font-size: 14px;
            background: var(--bg-primary);
            border: 2px solid var(--border-color);
            border-radius: 6px;
            padding: 12px;
            transition: all 0.3s ease;
        }

        input:focus, textarea:focus, select:focus {
            outline: none;
            border-color: var(--chestnut-medium);
            box-shadow: 0 0 0 3px rgba(160, 82, 45, 0.1);
        }

        input.button {
            background: var(--gradient-primary);
            color: var(--chestnut-cream);
            border: none;
            padding: 12px 24px;
            font-weight: 600;
            cursor: pointer;
            border-radius: 6px;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        input.button:hover {
            background: var(--chestnut-dark);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px var(--shadow-medium);
        }

        /* Современные кнопки навигации */
        .pgbutt a {
            font-family: inherit;
            padding: 8px 16px;
            text-decoration: none;
            border: 2px solid var(--chestnut-medium);
            background: var(--bg-primary);
            color: var(--chestnut-medium);
            margin: 4px;
            border-radius: 25px;
            transition: all 0.3s ease;
            font-weight: 600;
            display: inline-block;
        }

        .pgbutt a:hover {
            background: var(--chestnut-medium);
            color: var(--chestnut-cream);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px var(--shadow-medium);
        }

        /* QR код */
        #qr img {
            width: 40px;
            height: 40px;
            position: fixed;
            right: 20px;
            top: 20px;
            border: 2px solid var(--chestnut-medium);
            border-radius: 8px;
            padding: 4px;
            background: var(--bg-primary);
            transition: all 0.3s ease;
            z-index: 1000;
        }

        #qr img:hover {
            width: 200px;
            height: 200px;
            z-index: 1001;
            padding: 8px;
            box-shadow: 0 10px 30px var(--shadow-medium);
        }

        /* Аватары */
        .guestavatar {
            width: 120px;
            height: 120px;
            text-align: center;
            background: var(--gradient-primary);
            color: var(--chestnut-cream);
            font-size: 48px;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            position: relative;
            box-shadow: 0 4px 12px var(--shadow-medium);
            transition: all 0.3s ease;
        }

        .guestavatar:hover {
            transform: scale(1.05);
            box-shadow: 0 6px 20px var(--shadow-medium);
        }

        /* Админ меню */
        #nav8 {
            background: var(--bg-primary);
            border-radius: 8px;
            box-shadow: 0 4px 12px var(--shadow-light);
            overflow: hidden;
        }

        #nav8 a {
            padding: 12px 20px;
            transition: all 0.3s ease;
            color: var(--text-primary);
        }

        #nav8 td:hover, #nav8 li:hover {
            background: var(--chestnut-light);
            color: var(--chestnut-cream);
        }

        /* Прогресс бар */
        #cssbar-wrapper {
            width: 300px;
            height: 20px;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 1000;
        }

        #cssbar-border {
            border: 2px solid var(--chestnut-medium);
            border-radius: 10px;
            height: 100%;
            width: 100%;
            padding: 2px;
            background: var(--bg-primary);
            box-shadow: 0 4px 12px var(--shadow-medium);
        }

        #cssbar-whitespace {
            overflow: hidden;
            height: 100%;
            width: 100%;
            border-radius: 8px;
            background: var(--bg-tertiary);
        }

        #cssbar-line {
            background: var(--gradient-primary);
            height: 100%;
            width: 100%;
            border-radius: 8px;
            animation: cssbar-slide 2s ease-in-out infinite;
        }

        @keyframes cssbar-slide {
            0% { transform: translateX(-100%); }
            50% { transform: translateX(0%); }
            100% { transform: translateX(100%); }
        }

        /* Адаптивность */
        @media (max-width: 768px) {
            .bodyline {
                margin: 10px;
                border-radius: 8px;
            }

            th, td {
                padding: 8px 12px;
            }

            .maintitle, h1, h2 {
                font-size: 20px;
            }

            .nav {
                flex-direction: column;
                align-items: flex-start;
            }

            .nav a {
                margin-bottom: 8px;
                margin-right: 0;
            }

            .guestavatar {
                width: 80px;
                height: 80px;
                font-size: 32px;
            }
        }

        /* Темная тема (опционально) */
        @media (prefers-color-scheme: dark) {
            :root {
                --bg-primary: #2C1810;
                --bg-secondary: #3D251A;
                --bg-tertiary: #4A2C1F;
                --text-primary: #F4E4BC;
                --text-secondary: #E0D0B0;
                --text-muted: #C0A080;
                --border-color: #5D4037;
                --shadow-light: rgba(0, 0, 0, 0.3);
                --shadow-medium: rgba(0, 0, 0, 0.5);
            }
        }

        /* Дополнительные украшения */
        .forumline::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 2px;
            background: var(--gradient-primary);
            transition: left 0.5s ease;
        }

        .forumline:hover::before {
            left: 100%;
        }