/* Author Kamaliev E. 2026 */
/* ------- Fonts ------- */
@font-face { font-family: 'Cuprum'; src: url('/css/Cuprum-Regular.ttf'); font-weight: normal; font-style: normal; }
/* ------- Reset ------- */
*, *::before, *::after { box-sizing: border-box; }
/* ------- Body ------- */
body { background-color: #0f0f0f; color: #bec4cb; font-family: 'Cuprum', sans-serif; max-width: 1300px; margin: 0 auto; padding: 5px; overflow-wrap: anywhere; word-break: normal; }
grid { display: grid; grid-template-areas: "header header header" "left main right" "footer footer footer"; grid-template-columns: 250px minmax(0, 1fr) 250px; grid-template-rows: auto 1fr auto; min-height: 90vh; max-width: 1300px; }
a { color: #bec4cb; text-decoration: none; overflow-wrap: anywhere; }
a:hover { color: #2ab158; }
p { text-align: justify; margin: auto; }
h3 { text-align: center; margin: auto; padding-bottom: 10px; }
header { grid-area: header; }
main { grid-area: main; background-color: #1d1d1d; padding: 10px; margin: 5px; min-width: 0; overflow-wrap: anywhere; }
footer { grid-area: footer; background-color: #1d1d1d; padding: 10px; margin: 5px; min-width: 0; overflow-wrap: anywhere; }
left { grid-area: left; background-color: #1d1d1d; padding: 10px; margin: 5px; min-width: 0; overflow-wrap: anywhere; }
right { grid-area: right; background-color: #1d1d1d; padding: 10px; margin: 5px; min-width: 0; overflow-wrap: anywhere; }
::-moz-selection { color: black; background: #81df67; }
::selection { color: black; background: #81df67; }
/* ------- DIV элементы ------- */
.logo { grid-area: logo; background-color: #1d1d1d; padding: 10px; margin: 5px 5px 10px 5px; width: fit-content; }
.nav { grid-area: nav; background-color: #1d1d1d; padding: 10px; margin: 5px; text-align: center; }
.link-logo { color: #bec4cb; font-size: x-large; }
.logo:hover { color: #2ab158; background: rgba(33, 172, 61, 0.18); border-color: transparent; }
.link-nav { color: #bec4cb; background: #39393999; border: 0.5px solid #39393999; padding: 10px; display: inline-table; margin: 2px auto; }
.link-nav:hover { color: #2ab158; background: rgba(33, 172, 61, 0.18); border: 0.5px solid #2ab158; padding: 10px; }
.link-menu { color: #bec4cb; background: #39393999; border: 0.5px solid #39393999; padding: 5px; display: grid; margin: 5px auto; }
.link-menu:hover { color: #2ab158; background: rgba(33, 172, 61, 0.18); border: 0.5px solid #2ab158; }
.link-page { color: #bec4cb; background: #39393999; border: 0.5px solid #01010100; padding: 10px; display: inline-table; margin: 2px; padding-inline: 14px; }
.link-page:hover { color: #2ab158; background: rgba(33, 172, 61, 0.18); border: 0.5px solid #2ab158; padding: 10px; display: inline-table; margin: 2px; padding-inline: 14px; }
.userstat { margin: 5px 0; padding: 5px; background-color: #2d2d2d; hyphens: auto; text-align: justify; border: 0.5px solid #2d2d2d; overflow-wrap: anywhere; }
.userstat:hover { color: #2ab158; background: rgba(33, 172, 61, 0.18); border: 0.5px solid #2ab158; }
.footer { text-align: center; display: grid; }
/* ------- Заметки ------- */
.message-container { margin: 5px 0; padding: 5px; border: 1px solid #bec4cb; background-color: #2d2d2d; hyphens: auto; text-align: justify; overflow-wrap: anywhere; }
.message-id { margin: 5px 0; padding: 5px; border: 1px solid #bec4cb; display: inline-block; cursor: not-allowed; }
.message-author { margin: 5px 0; padding: 5px; border: 1px solid #bec4cb; display: inline-block; cursor: not-allowed; }
.message-date { margin: 5px 0; padding: 5px; border: 1px solid #bec4cb; display: inline-block; cursor: not-allowed; }
.upload-files-container { margin: 10px 0; padding: 10px; border: 1px dashed #ddd; border-radius: 4px; min-height: 0px; }
.buttons-center { display: block; cursor: not-allowed; text-align: center; }
.file-preview { margin: 5px 0; padding: 5px; border: 1px solid #bec4cb; background-color: #2d2d2d; hyphens: auto; text-align: justify; overflow-wrap: anywhere; }
.attached-file { margin: 1px; padding: 1px; border: 1px solid #bec4cb; hyphens: auto; text-align: justify; display: table; overflow-wrap: anywhere; }
.attached-video { margin: 10px 0; border: 1px solid #ddd; border-radius: 4px; padding: 5px; background-color: black; }
.attached-video video { max-width: 100%; max-height: 400px; display: block; margin: 0 auto; }
.preview-item { display: inline-block; margin: 5px; padding: 5px 10px; background-color: #e9ecef; border-radius: 4px; font-size: 12px; }
.preview-item.video { background-color: #d1ecf1; border-left: 3px solid #17a2b8; }
.preview-item.image { background-color: #d4edda; border-left: 3px solid #28a745; }
.preview-item.file { background-color: #f8d7da; border-left: 3px solid #dc3545; }
.remove-preview { cursor: pointer; margin-left: 5px; color: #dc3545; font-weight: bold; }
#action_result .progress-container { margin: 10px auto; max-width: 300px; }
#action_result .progress-bar { height: 20px; background-color: #e0e0e0; border-radius: 10px; overflow: hidden; position: relative; margin-bottom: 5px; }
#action_result .progress-fill { height: 100%; background: linear-gradient(90deg, #4CAF50, #8BC34A); border-radius: 10px; width: 0%; transition: width 0.3s ease; position: relative; }
#action_result .progress-text { text-align: center; font-size: 14px; color: #333; margin-top: 5px; }
#action_result .file-info { font-size: 12px; color: #666; text-align: center; margin-top: 2px; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.7; } 100% { opacity: 1; } }
.loading-button { animation: pulse 1s infinite; }
/* ------- Кнопки, формы, фото ------- */
iframe { width: 100%; min-width: 0; min-height: 300px; }
code { user-select: all; overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap; }
input { color: #bec4cb; background: #39393999; border-color: transparent; padding: 5px; display: inline-table; margin: 2px auto; outline: none; font-family: 'Cuprum', sans-serif; font-size: initial; min-width: 0; }
textarea { color: #bec4cb; background: #39393999; border-color: transparent; padding: 5px 0px 5px 0px; display: inline-table; margin: 2px auto 2px auto; outline: none; width: 100%; min-width: 0; font-family: 'Cuprum', sans-serif; font-size: initial; }
button { color: #bec4cb; background: #39393999; border: 2px solid; border-color: transparent; padding: 5px; display: inline-table; margin: 2px auto; font-family: 'Cuprum', sans-serif; font-size: inherit; }
button:hover { color: #2ab158; background: rgba(33, 172, 61, 0.18); border-color: transparent; cursor: pointer; }
button:active { border-color: #2ab158; }
img { max-width: 100%; }
video { width: 100%; max-width: 100%; min-width: 0; }
.full-size-img { max-width: 100%; }
.full-textarea { resize: vertical; overflow-y: hidden; min-height: 100px; }
.PIN { max-width: 60px; }
.delete-note { max-width: 70px; }
/* The switch - the box around the slider */
.switch { position: absolute; display: inline-block; width: 58px; height: 32px; margin: 2px; outline: none; }
.switch input { opacity: 0; width: 0; height: 0; border: 1px solid #bec4cb; outline: none; }
.slider { position: absolute; content: ""; cursor: pointer; top: 0px; left: 0; right: 0; bottom: 0; transition: .4s; outline: none; background-color: #39393999; }
.slider:before { position: absolute; content: ""; height: 23px; width: 24px; left: 5px; bottom: 4px; background-color: #bec4cb; -webkit-transition: .8s; transition: .4s; outline: none; }
input:checked + .slider { background-color: #2ab158; outline: none; }
input:focus + .slider { box-shadow: 0 0 0px #2196F3; outline: none; }
input:checked + .slider:before { -webkit-transform: translateX(24px); -ms-transform: translateX(24px); transform: translateX(24px); outline: none; }
/* Администратор панель */
.tab { display: flex; flex-wrap: wrap; }
.tab > input[type="radio"] { display: none; }
.tab-content { display: none; width: 100%; margin-top: 1rem; min-width: 0; }
#tab-btn-1:checked~#content-1,
#tab-btn-2:checked~#content-2,
#tab-btn-3:checked~#content-3,
#tab-btn-4:checked~#content-4 { display: block; }
.tab > label { display: block; padding: 0.5rem 1rem; cursor: pointer; transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out; text-decoration: none; border: 1px solid #bec4cb; margin-right: 5px; background: 0 0; }
.tab > input[type="radio"]:checked + label { color: #2ab158; background: rgba(33, 172, 61, 0.18); border: 1px solid #2ab158; }
/* Адаптивность для мобильных устройств */
@media (max-width: 1024px) { grid { grid-template-areas: "header header" "left main" "right right" "footer footer"; grid-template-columns: 250px minmax(0, 1fr); } }
@media (max-width: 768px) { grid { grid-template-areas: "header" "main" "left" "right" "footer"; grid-template-columns: minmax(0, 1fr); } }
/* Гелерея фото плитки */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 3px; margin: 0 auto 30px; min-width: 0; }
.gallery-item { position: relative; aspect-ratio: 1; overflow: hidden; cursor: pointer; background-color: #1a1a1a; min-width: 0; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; display: block; }
.gallery-item:hover img { transform: scale(1.05); }
.modal { display: none; position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.95); z-index: 1000; justify-content: center; align-items: center; touch-action: none; overflow: hidden; }
.modal.active { display: flex; }
.modal-content { position: relative; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.modal-image-container { position: relative; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; touch-action: none; user-select: none; -webkit-user-select: none; }
.modal-image-container.draggable { cursor: grab; }
.modal-image-container.dragging { cursor: grabbing; }
.modal-image { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center center; user-select: none; -webkit-user-drag: none; pointer-events: none; will-change: transform; }
.nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, 0.1); border: none; color: white; font-size: 2rem; width: 50px; height: 50px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; z-index: 1001; }
.nav-btn:hover { background: rgba(255, 255, 255, 0.2); }
.prev-btn { left: 20px; }
.next-btn { right: 20px; }
.close-btn { position: absolute; top: 20px; right: 20px; background: rgba(255, 255, 255, 0.1); border: none; color: white; font-size: 2rem; width: 50px; height: 50px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; z-index: 1001; }
.close-btn:hover { background: rgba(255, 255, 255, 0.2); }
.image-counter { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); background: rgba(255, 255, 255, 0.1); padding: 8px 16px; color: white; font-size: 0.9rem; z-index: 1001; }
.zoom-controls { position: absolute; bottom: 20px; right: 20px; display: flex; gap: 10px; z-index: 1001; }
.zoom-btn { background: rgba(255, 255, 255, 0.1); border: none; color: white; font-size: 1.2rem; width: 40px; height: 40px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.zoom-btn:hover { background: rgba(255, 255, 255, 0.2); }
@media (max-width: 768px) { .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; } .nav-btn { width: 40px; height: 40px; font-size: 1.5rem; } .prev-btn { left: 10px; } .next-btn { right: 10px; } .close-btn { top: 10px; right: 10px; width: 40px; height: 40px; font-size: 1.5rem; } .zoom-controls { bottom: 10px; right: 10px; } .zoom-btn { width: 35px; height: 35px; font-size: 1rem; } .image-counter { bottom: 10px; font-size: 0.8rem; padding: 6px 12px; } }
@media (max-width: 480px) { .gallery { grid-template-columns: repeat(2, 1fr); gap: 3px; } }