/* --- СТАНДАРТНЫЙ ФАЙЛ СТИЛЕЙ (БЕЗ CLS-ФИКСОВ) --- */
/* --- ИСПРАВЛЕНИЕ: Убраны рамки и тени, добавлено скругление углов --- */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f0f2f5; 
    color: #333;
    line-height: 1.6;
}

.site-wrapper-kometa {
    max-width: 1200px; 
    margin: 0 auto;
    background-color: #ffffff; 
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

/* --- Хедер --- */
.header-kometa {
    background-color: #1a1a1a; 
    color: #ffffff;
    padding: 10px 20px; 
}

.header-kometa-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1160px; 
    margin: 0 auto;
    gap: 20px; 
}

.logo-kometa {
    font-size: 1.8em;
    font-weight: bold;
    text-decoration: none;
    flex-shrink: 0; 
}
.logo-kometa:hover {
    opacity: 0.85; 
}

.search-kometa-wrapper {
    display: flex;
    align-items: center;
    flex-grow: 1; 
    max-width: 600px; 
    background-color: #333; 
    border-radius: 5px;
    overflow: hidden; 
    position: relative; 
}
.search-kometa-wrapper[data-main-link] {
    cursor: pointer;
}

.search-kometa-input {
    flex-grow: 1; 
    padding: 8px 12px;
    border: none;
    background-color: transparent; 
    color: #e0e0e0;
    font-size: 1em;
    outline: none; 
    cursor: text;
}
.search-kometa-input::placeholder {
    color: #888;
    opacity: 1; 
}

.search-kometa-btn {
    background-color: #444; 
    border: none;
    color: #ccc;
    font-size: 1.2em;
    cursor: pointer;
    padding: 8px 12px;
    transition: background-color 0.2s;
    flex-shrink: 0; 
}
.search-kometa-btn:hover {
    background-color: #555;
    color: #fff;
}


.auth-buttons-kometa {
    display: flex;
    gap: 10px;
    flex-shrink: 0; 
}

.btn-kometa {
    padding: 10px 25px; 
    text-decoration: none;
    font-weight: bold;
    transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    text-align: center;
    display: inline-block;
    border: 1px solid transparent; 
    position: relative; 
    color: #fff; 
}
.btn-kometa:hover {
    opacity: 0.85;
}

div[data-type="text"] a.btn-kometa {
    padding: 10px 20px !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    font-weight: bold !important;
    display: inline-block !important;
    text-align: center !important;
    cursor: pointer !important;
}
div[data-type="text"] a.btn-kometa:hover {
    opacity: 0.85;
}


.btn-kometa-login {
    background-color: #333; 
    color: #fff;
    border-color: #444;
    border-radius: 4px; 
}

.btn-kometa-reg {
    background-color: #ff007f; 
    color: #fff;
    border-color: #ff007f;
    border-radius: 4px; 
}

.btn-kometa-rhombus {
    background-color: #ff007f; 
    color: #ffffff; 
    padding: 15px 35px; 
    clip-path: polygon(20px 0%, calc(100% - 20px) 0%, 100% 50%, calc(100% - 20px) 100%, 20px 100%, 0% 50%);
    border: none; 
    text-transform: uppercase;
    font-size: 1em; 
}
.btn-kometa-rhombus:hover {
    opacity: 0.9;
    transform: scale(1.05); 
}

.btn-kometa-skewed {
    background-color: #ff007f; 
    color: #ffffff;             
    padding: 12px 30px;       
    text-transform: uppercase;
    font-size: 1em;
    border: none;               
    position: relative;         
    clip-path: polygon(5% 0%, 100% 0%, 95% 100%, 0% 100%); 
}
.btn-kometa-skewed:hover {
    opacity: 0.9;
    transform: scale(1.03); 
}


/* --- Основной контент и сайдбар --- */
.main-kometa-container {
    display: flex;
    padding: 20px;
    gap: 20px;
}

.main-content-kometa-wrapper {
    flex: 3; 
    background-color: #fff; 
    padding: 0; 
    min-width: 0;
}

article.main-content-kometa {
    padding: 20px; 
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.main-content-kometa h1 {
    font-size: 2em;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.main-content-kometa h2 {
    font-size: 1.6em;
    margin-top: 30px;
    margin-bottom: 15px;
}
.main-content-kometa h3 {
    font-size: 1.3em;
    margin-top: 25px;
    margin-bottom: 10px;
}
.main-content-kometa h4 {
    font-size: 1.1em;
    margin-top: 20px;
    margin-bottom: 8px;
    font-weight: bold;
}

.main-content-kometa p {
    margin-bottom: 1em;
    word-wrap: break-word;
}

.main-content-kometa img#banner-kometa-img {
    max-width: 100%;
    height: auto;
    border-radius: 22px; /* ИЗМЕНЕНО: увеличен радиус скругления */
}

.main-content-kometa table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
}
.main-content-kometa th, 
.main-content-kometa td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
    vertical-align: top;
}
.main-content-kometa th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.main-content-kometa ul,
.main-content-kometa ol {
    padding-left: 25px; 
    margin-bottom: 1em;
    word-wrap: break-word;
}

.main-content-kometa ul {
    list-style: none; 
}

.main-content-kometa ul li {
    position: relative; 
    padding-left: 20px; 
    margin-bottom: 0.5em;
}

.main-content-kometa ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.35em; 
    width: 8px; 
    height: 8px; 
    background-color: #007bff; 
    transform: rotate(45deg); 
    border-radius: 1px; 
}

.main-content-kometa ul.custom-color-list li::before {
    background-color: #28a745; 
}

.main-content-kometa ol li {
    margin-bottom: 0.5em;
}

/* --- Правый сайдбар --- */
.sidebar-kometa {
    flex: 1; 
    padding: 20px;
    background-color: #f8f9fa; 
    border: 1px solid #e9ecef;
    border-radius: 5px;
    position: sticky;
    top: 20px; 
    align-self: flex-start; 
    max-height: calc(100vh - 40px); 
    overflow-y: auto; 
    min-width: 200px;
}

.sidebar-kometa h3 {
    font-size: 1.3em;
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

.sidebar-nav-kometa ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.sidebar-nav-kometa li {
    margin-bottom: 8px;
}

.sidebar-nav-kometa li a {
    text-decoration: none;
    color: #007bff; 
    display: block;
    padding: 5px 0;
    border-radius: 3px;
    transition: background-color 0.2s, color 0.2s;
    word-break: break-word;
}
.sidebar-nav-kometa li a:hover {
    color: #0056b3;
    background-color: #e9ecef;
    padding-left: 5px; 
}

.sidebar-kometa img {
    max-width: 100%;
    height: auto;
    border-radius: 20px; /* ИЗМЕНЕНО: увеличен радиус скругления */
}
.editable[data-type="image-link"][data-content-id="sidebar-image-kometa-img"] {
    display: block; 
    margin-top: 20px;
}

/* --- Футер --- */
.footer-kometa {
    background-color: #1a1a1a;
    color: #ccc;
    padding: 20px;
    text-align: center; 
}
.footer-kometa-container {
    max-width: 1160px;
    margin: 0 auto;
}

.footer-kometa p {
    margin: 0;
    font-size: 0.9em;
}


/* Адаптивность */
@media (max-width: 992px) {
    .main-kometa-container {
        flex-direction: column; 
    }
    .sidebar-kometa {
        position: static; 
        max-height: none;
        overflow-y: visible;
        margin-top: 20px;
        width: auto;
    }
    .btn-kometa-rhombus {
        padding: 12px 30px;
        clip-path: polygon(15px 0%, calc(100% - 15px) 0%, 100% 50%, calc(100% - 15px) 100%, 15px 100%, 0% 50%);
    }
    .btn-kometa-skewed {
        padding: 10px 25px;
        clip-path: polygon(4% 0%, 100% 0%, 96% 100%, 0% 100%);
    }
}

@media (max-width: 768px) {
    .header-kometa-container {
        flex-direction: column;
        gap: 15px;
    }
    .search-kometa-wrapper { 
        width: 100%; 
        max-width: none; 
    }
    .auth-buttons-kometa {
        width: 100%;
        justify-content: space-around;
    }
    .main-kometa-container {
        padding: 15px;
    }
    .main-content-kometa, .sidebar-kometa {
        padding: 15px;
    }
    .main-content-kometa h1 { font-size: 1.8em; }
    .main-content-kometa h2 { font-size: 1.4em; }

    .main-content-kometa ul li {
        padding-left: 18px; 
    }
    .main-content-kometa ul li::before {
        width: 7px;
        height: 7px;
        top: 0.4em;
    }
    .btn-kometa-rhombus {
        padding: 10px 25px;
        font-size: 0.9em;
        clip-path: polygon(10px 0%, calc(100% - 10px) 0%, 100% 50%, calc(100% - 10px) 100%, 10px 100%, 0% 50%);
    }
     .btn-kometa-skewed {
        padding: 8px 20px;
        font-size: 0.9em;
        clip-path: polygon(3% 0%, 100% 0%, 97% 100%, 0% 100%);
    }

    .main-content-kometa table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        border-spacing: 0;
    }
    .main-content-kometa th,
    .main-content-kometa td {
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .btn-kometa {
        padding: 8px 15px;
        font-size: 0.9em;
    }
    .logo-kometa {
        font-size: 1.5em;
    }
     .main-content-kometa h1 { font-size: 1.6em; }
    .main-content-kometa h2 { font-size: 1.3em; }
}