/* Global */
:root {
    --primary: #42a5f5;
    --secondary: #fafafa;
    --dark-bg: #0a0a1a;
    --panel-bg: #161b1d;
    --text-main: #e0e0ff;
    --text-dim: #a0a0ff;
    --text-forms: #fafafa;
    --color1: #161b1d;
    --color2: #21282b;
    --color3: #2e363a;
    --color4: #3a4449;
    --color_green: #2eb700;
    --color_red: #f11a36;
    --font1: 'Rajdhani', sans-serif;
    --font2: 'Orbitron', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

body {
    background: #161616;
    color: var(--secondary);
    font-family: var(--font1);
    font-size: clamp(12px, 2.5vw, 17px);
    line-height: 1.6;
    min-height: 100vh;
}

.bg-container {
    max-width: 1350px;
    margin: 0 auto;
    backdrop-filter: blur(30px);
    background: var(--color1);
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--secondary) !important;
}

li {
    list-style: none;
}

.link-watch {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    background: transparent;
    border: 0;
}

textarea {
    box-sizing: border-box;
}

textarea, button, input, form {
    border-radius: 4px;
}

input {
    color: var(--text-forms);
}

.navbtn,
input.bbcodes {
    background: var(--color1);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: clamp(10px, 2.5vw, 13px);
}

.navbtn:hover,
input.bbcodes:hover {
    box-shadow: 0 0 10px var(--primary);
}

input[type="checkbox"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid var(--color4);
    border-radius: 3px;
    background: var(--color1);
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
}

input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: clamp(10px, 2.5vw, 12px);
    font-weight: bold;
}

.comment-input input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 247, 255, 0.3);
    border-radius: 4px;
    padding: 8px 12px;
    color: var(--text-main);
    font-family: inherit;
    transition: all 0.3s;
    flex-grow: 1;
    max-width: 300px;
}

.comment-input input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.3);
}

select {
    width: 100%;
    padding: 8px 12px;
    background: var(--color1);
    border: 1px solid var(--color3);
    border-radius: 4px;
    color: var(--secondary);
    font-family: inherit;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2342a5f5'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

.mass_comments_action select {
    width: auto;
}

.icon {
    font-style: inherit;
}

/* Таблицы */
table {
    border-radius: 8px;
    font-family: var(--font1);
}

table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
}

th,
tr.theading {
    color: white;
    background-color: #42a5f575;
}

tr {
    border: 0;
}

tr:nth-of-type(odd) {
    background-color: var(--color2);
}

tr:nth-of-type(even) {
    background-color: var(--color3);
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    grid-column: 1 / -1;
}

.pagination a, 
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 35px;
    padding: 0 18px;
    margin: 0;
    border: 1px solid var(--color3);
    border-radius: 4px;
    color: var(--secondary);
    text-decoration: none;
    font-size: clamp(10px, 2.5vw, 14px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pagination a {
    background: var(--color1);
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.2);
    transform: translateY(-1px);
}

.pagination span.current {
    background: rgba(0, 247, 255, 0.2);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: bold;
    box-shadow: 0 0 15px rgba(0, 247, 255, 0.3);
}

.pagination a {
    padding: 0 18px;
    font-family: var(--font2);
    letter-spacing: 1px;
}

.pagination a.prev:before, 
.pagination a.next:after {
    content: '';
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 247, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.pagination a.next:after {
    transform: translateX(100%);
}

.pagination a.prev:hover:before, 
.pagination a.next:hover:after {
    transform: translateX(0);
}

.pagination .page-separator {
    border: none;
    color: var(--text-dim);
    pointer-events: none;
    background: transparent;
}

.comments-pagination span.current {
    animation: pulse-glow 2s infinite;
}

/* Анимация для активной страницы */
@keyframes pulse-glow {
    0% { box-shadow: 0 0 5px rgba(0, 247, 255, 0.3); }
    50% { box-shadow: 0 0 15px rgba(0, 247, 255, 0.5); }
    100% { box-shadow: 0 0 5px rgba(0, 247, 255, 0.3); }
}

/* Стилизация AJAX */
.ui-dialog {
    background: var(--color1) !important;
    border: 1px solid var(--color3) !important;
    border-radius: 6px !important;
    font-family: 'Rajdhani', sans-serif !important;
    color: var(--secondary) !important;
    overflow: hidden !important;
}

.ui-dialog-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color2) !important;
    border-bottom: 1px solid var(--color3) !important;
    color: var(--secondary) !important;
    font-family: 'Orbitron', sans-serif !important;
    padding: 12px 15px !important;
    border-radius: 0 !important;
}

.ui-dialog-titlebar:hover {
    cursor: move;
}

.ui-dialog-title {
    font-weight: bold !important;
    text-shadow: 0 0 5px var(--primary) !important;
}

.ui-button {
    background: var(--color1) !important;
    border: 1px solid var(--primary) !important;
    color: var(--primary) !important;
    border-radius: 4px !important;
    padding: 8px 15px !important;
    font-family: 'Rajdhani', sans-serif !important;
    transition: all 0.3s !important;
    cursor: pointer;
}

.ui-button:hover {
    box-shadow: 0 0 10px var(--primary) !important;
}

.ui-dialog-content {
    padding: 20px !important;
    line-height: 1.6 !important;
    background: var(--color2) !important;
}

.ui-dialog-content p {
    margin-bottom: 15px !important;
}

#dle-promt-text {
    background: var(--color1) !important;
    border: 1px solid var(--color3) !important;
    color: var(--secondary) !important;
    padding: 10px 15px !important;
    border-radius: 4px !important;
    font-family: 'Rajdhani', sans-serif !important;
    transition: all 0.3s !important;
}

#dle-promt-text:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.3) !important;
    outline: none !important;
}

.ui-dialog-buttonpane {
    background: var(--color2) !important;
    border-top: 1px solid var(--color3) !important;
    padding: 15px !important;
}

.ui-dialog-buttonset {
    display: flex !important;
    gap: 10px !important;
    justify-content: flex-end !important;
}

.ui-button:last-child {
    background: var(--primary) !important;
    color: #000 !important;
    font-weight: bold !important;
}

.ui-button:last-child:hover {
    box-shadow: 0 0 15px var(--primary) !important;
}

.ui-button-icon-only .ui-icon {
    filter: invert(77%) sepia(47%) saturate(7495%) hue-rotate(155deg) brightness(103%) contrast(104%) !important;
}

/*
#twofactor_response {
    margin-top: 15px !important;
    padding: 10px !important;
    border-radius: 4px !important;
    background: rgba(255, 51, 102, 0.1) !important;
    border: 1px solid rgba(255, 51, 102, 0.3) !important;
}
*/

/* Анимации */
.ui-dialog {
    animation: fadeIn 0.3s ease !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Стилизация кнопки "Редактировать" */
a[onclick*="dropdownmenu"], .edit_btn a {
    display: inline-block;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: clamp(10px, 2.5vw, 13px);
    text-decoration: none;
    transition: all 0.3s;
    font-family: var(--font1);
    cursor: pointer;
}

a[onclick*="dropdownmenu"]:hover, .edit_btn a:hover {
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.3);
}

/* Стилизация выпадающего меню */
#dropmenudiv {
    margin-top: 5px;
    background: var(--panel-bg) !important;
    border: 1px solid var(--primary) !important;
    border-radius: 6px !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3) !important;
    padding: 5px 0 !important;
    animation: fadeIn 0.2s ease-out !important;
    overflow: hidden !important;
    min-width: 170px !important;
}

#dropmenudiv a {
    display: block !important;
    padding: 8px 15px !important;
    color: var(--text-main) !important;
    text-decoration: none !important;
    font-size: clamp(10px, 2.5vw, 13px); !important;
    transition: all 0.2s !important;
    border-left: 3px solid transparent !important;
    font-family: 'Rajdhani', sans-serif !important;
}

#dropmenudiv a:hover {
    background: rgba(0, 247, 255, 0.1) !important;
    color: var(--primary) !important;
}

#dropmenudiv a:not(:last-child) {
    border-bottom: 1px solid rgba(0, 247, 255, 0.1) !important;
}

/* Анимация появления */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Эффекты для опасных действий */
#dropmenudiv a[onclick*="dle_news_delete"],
#dropmenudiv a[onclick*="sendNotice"] {
    color: #ff3366 !important;
}

#dropmenudiv a[onclick*="dle_news_delete"]:hover,
#dropmenudiv a[onclick*="sendNotice"]:hover {
    background: rgba(255, 51, 102, 0.1) !important;
}