/* Подключение локального шрифта Minecraft из корня сайта */
@font-face {
    font-family: 'Minecraft';
    src: url('minecraft.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Minecraft', sans-serif;
}

body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: #002266;
    background-image: 
        radial-gradient(circle at 15% 25%, rgba(0, 102, 255, 0.6) 0%, transparent 20%),
        radial-gradient(circle at 85% 15%, rgba(0, 80, 255, 0.7) 0%, transparent 15%),
        radial-gradient(circle at 12% 78%, rgba(0, 110, 255, 0.6) 0%, transparent 18%),
        radial-gradient(circle at 88% 80%, rgba(0, 90, 255, 0.5) 0%, transparent 22%),
        radial-gradient(circle at 50% 50%, rgba(0, 40, 150, 0.8) 0%, transparent 60%),
        radial-gradient(circle at 60% 30%, rgba(0, 130, 255, 0.4) 0%, transparent 10%);
    background-size: cover;
    background-position: center;
    color: #ffffff;
}

.app-container {
    display: flex;
    width: 100%;
    height: 100%;
    padding: 25px;
    gap: 25px;
}

.main-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    overflow-y: auto;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.server-header h1 {
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.server-header p {
    font-size: 1.15rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
}

/* Блок создания новости */
.news-creator-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: fadeIn 0.3s ease-out;
}

.news-creator-box h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
}

#news-text {
    width: 100%;
    height: 90px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 14px;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    resize: none;
    outline: none;
    letter-spacing: 0.5px;
}

#news-text:focus {
    border-color: rgba(0, 130, 255, 0.8);
}

/* Блок подсказок */
.upload-hints {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(0, 102, 255, 0.1);
    border-left: 4px solid #0066ff;
    padding: 12px 16px;
    border-radius: 4px 10px 10px 4px;
}

.upload-hints span {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

.creator-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.creator-controls-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-upload-btn input[type="file"] {
    display: none;
}

.file-upload-btn {
    display: inline-block;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
}

.file-upload-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Кастомный выбор тега со скруглением */
.tag-selector {
    padding: 11px 40px 11px 16px;
    background-color: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    outline: none;
    cursor: pointer;
    
    /* Отключение дефолтных стилей для применения скругления */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    /* Аккуратная SVG стрелочка */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23ffffff' viewBox='0 0 16 16'><path d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/></svg>");
    background-repeat: no-repeat;
    background-position: calc(100% - 14px) center;
    
    transition: border-color 0.2s, background-color 0.2s;
}

.tag-selector:focus, .tag-selector:hover {
    border-color: rgba(0, 130, 255, 0.8);
    background-color: rgba(0, 0, 0, 0.5);
}

.tag-selector option {
    background: #001a4d;
    color: #fff;
    padding: 10px;
    border-radius: 12px;
}

#publish-btn {
    padding: 12px 26px;
    background: #0066ff;
    border: 2px solid #0088ff;
    border-radius: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}

#publish-btn:hover {
    background: #0055dd;
    box-shadow: 0 0 15px rgba(0, 102, 255, 0.5);
}

/* Предпросмотр медиа */
#file-preview-container {
    position: relative;
    display: inline-block;
    max-width: 300px;
    margin-top: 5px;
    border-radius: 12px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.15);
}

#media-preview-zone img {
    max-width: 100%;
    max-height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

#media-preview-zone audio {
    width: 250px;
    height: 32px;
}

.remove-preview-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff3333;
    border: 2px solid #ff6666;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hidden {
    display: none !important;
}

/* Лента новостей */
.news-feed {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.feed-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.news-card {
    background: rgba(255, 255, 255, 0.02);
    border: 2px solid rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: fadeIn 0.4s ease-out;
}

.news-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.news-meta {
    display: flex;
    gap: 14px;
    align-items: center;
}

/* Общий бейдж тегов */
.news-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Цвета для конкретных тегов */
.tag-update {
    background: rgba(0, 102, 255, 0.2);
    border: 2px solid #0066ff;
    color: #3399ff;
}

.tag-news {
    background: rgba(0, 204, 102, 0.15);
    border: 2px solid #00cc66;
    color: #55ff99;
}

.tag-danger {
    background: rgba(255, 51, 51, 0.15);
    border: 2px solid #ff3333;
    color: #ff6666;
}

.news-date {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
}

.news-content {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.7;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.news-attached-media-img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.news-attached-audio {
    width: 100%;
    max-width: 500px;
    outline: none;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
}

.delete-news-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.delete-news-btn:hover {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.15);
    transform: scale(1.1);
}

/* Правая панель */
.right-sidebar {
    width: 320px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 35px 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.sidebar-title {
    font-size: 1.7rem;
    font-weight: 700;
    text-align: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
    color: #ffffff;
    margin-bottom: 25px;
}

.button-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-button {
    width: 100%;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s ease;
}

.nav-button:hover {
    background: rgba(0, 130, 255, 0.25);
    border-color: #0066ff;
    box-shadow: 0 0 15px rgba(0, 130, 255, 0.4);
    transform: translateX(-4px);
}

.nav-button.active {
    background: #0066ff;
    border-color: #0088ff;
    box-shadow: 0 0 20px rgba(0, 102, 255, 0.5);
}

/* Авторизация */
.sidebar-auth {
    margin-top: auto;
    padding-top: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.login-trigger-btn {
    width: 100%;
    padding: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background 0.2s;
}

.login-trigger-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

.auth-menu {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: fadeIn 0.25s ease;
}

.auth-menu h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
}

.auth-menu input {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-weight: 700;
    outline: none;
    font-size: 0.95rem;
}

.auth-menu input:focus {
    border-color: #0066ff;
}

.auth-actions {
    display: flex;
    gap: 10px;
}

.auth-cancel {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #eee;
    font-weight: 700;
    cursor: pointer;
}

.auth-submit {
    flex: 1;
    padding: 10px;
    background: #0066ff;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}

.admin-logged {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 200, 100, 0.15);
    border: 2px solid #00cc66;
    padding: 14px 15px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #55ff99;
}

.logout-btn {
    background: transparent;
    border: none;
    color: #ff5555;
    font-weight: 700;
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.main-content::-webkit-scrollbar {
    width: 8px;
}
.main-content::-webkit-scrollbar-track {
    background: transparent;
}
.main-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}