/* Основные стили в стиле AntiRaidBot */
:root {
    --space-orange: linear-gradient(135deg, #ff7e00 0%, #ff3c00 100%);
    --space-dark: #0a0e17;
    --space-light: #1a2138;
    --discord-blurple: #5865F2;
    --discord-dark: #36393F;
}

* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--space-dark);
    color: white;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.title-font {
    font-family: 'Orbitron', sans-serif;
}

.space-gradient {
    background: var(--space-orange);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Звезды */
#stars-container {
    background: transparent;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle var(--duration) infinite ease-in-out;
    opacity: 0;
}

@keyframes twinkle {
    0%, 100% { opacity: 0; }
    50% { opacity: var(--opacity); }
}

/* Навигация */
.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.nav-link:hover {
    color: #ff7e00;
}

/* Градиентные имена пользователей */
.username {
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.username-user {
    color: rgba(255, 255, 255, 0.9);
}

.username-admin {
    background: linear-gradient(135deg, #ff4e50, #f9d423);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.username-owner {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-discord {
    background: linear-gradient(135deg, #5865F2, #4752C4);
    color: white;
}

.btn-discord:hover {
    box-shadow: 0 10px 15px rgba(88, 101, 242, 0.3);
}

.btn-logout {
    background: linear-gradient(135deg, #ED4245, #C23131);
    color: white;
}

.btn-primary {
    background: linear-gradient(135deg, #ff7e00 0%, #ff3c00 100%);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 10px 15px rgba(255, 126, 0, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ED4245, #C23131);
    color: white;
}

.btn-admin {
    background: linear-gradient(135deg, #ff7e00 0%, #ff3c00 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #FAA61A, #e0940f);
    color: white;
}

.btn-action {
    background: linear-gradient(135deg, #3BA55C, #2d8a47);
    color: white;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Основной контент */
.main {
    flex: 1;
    padding: 2rem 0;
}

.page-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ff7e00 0%, #ff3c00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Карточки в стиле сайта */
.space-card {
    background: rgba(26, 33, 56, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 126, 0, 0.2);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.space-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 126, 0, 0.3);
    border-color: rgba(255, 126, 0, 0.5);
}

/* Список категорий */
.categories-list {
    display: grid;
    gap: 1.5rem;
}

.category-card {
    background: rgba(26, 33, 56, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 126, 0, 0.2);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 126, 0, 0.3);
    border-color: rgba(255, 126, 0, 0.5);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.75rem;
}

.category-name a {
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    transition: color 0.3s;
}

.category-name a:hover {
    color: #ff7e00;
}

.category-description {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.category-stats {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-admins {
    background: linear-gradient(135deg, #ED4245, #C23131);
    color: white;
}

.badge-admin {
    background: linear-gradient(135deg, #ff4e50, #f9d423);
    color: white;
}

.badge-owner {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    color: white;
}

/* Список тем */
.topics-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.topic-card {
    background: rgba(26, 33, 56, 0.7);
    border-radius: 0.75rem;
    padding: 1.25rem;
    border: 1px solid rgba(255, 126, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.topic-card:hover {
    border-color: rgba(255, 126, 0, 0.5);
    transform: translateY(-2px);
}

.topic-card.topic-locked {
    opacity: 0.7;
    border-left: 3px solid #ED4245;
}

.topic-card.topic-pinned {
    border-left: 3px solid #FAA61A;
}

.topic-main {
    flex: 1;
}

.topic-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.topic-title a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.topic-title a:hover {
    color: #ff7e00;
}

.topic-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.topic-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Просмотр темы */
.topic-view {
    max-width: 100%;
}

.topic-header {
    margin-bottom: 2rem;
}

.back-link {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 1rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: #ff7e00;
}

.topic-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Список сообщений */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.post-card {
    background: rgba(26, 33, 56, 0.7);
    border-radius: 0.75rem;
    padding: 1.25rem;
    border: 1px solid rgba(255, 126, 0, 0.2);
}

.post-card:hover {
    border-color: rgba(255, 126, 0, 0.4);
}

.post-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.post-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

.post-content {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.post-content p {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.post-actions {
    display: flex;
    justify-content: flex-end;
}

/* Форма ответа */
.reply-form {
    background: rgba(26, 33, 56, 0.7);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 126, 0, 0.2);
}

.reply-form h3 {
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Формы */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(255, 126, 0, 0.3);
    border-radius: 0.5rem;
    background-color: rgba(10, 14, 23, 0.8);
    color: white;
    font-size: 0.9rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #ff7e00;
    box-shadow: 0 0 10px rgba(255, 126, 0, 0.2);
}

.form-group textarea {
    resize: vertical;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(26, 33, 56, 0.95);
    margin: 10% auto;
    padding: 2rem;
    border-radius: 1rem;
    width: 90%;
    max-width: 500px;
    position: relative;
    border: 1px solid rgba(255, 126, 0, 0.3);
    box-shadow: 0 20px 50px rgba(255, 126, 0, 0.2);
}

.modal-close {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: white;
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
}

/* Админ панель */
.admin-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.admin-section {
    background: rgba(26, 33, 56, 0.7);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 126, 0, 0.2);
}

.admin-section h2 {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Orbitron', sans-serif;
}

.categories-admin-list,
.users-admin-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.admin-item {
    background: rgba(10, 14, 23, 0.6);
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 126, 0, 0.15);
}

.admin-item-info {
    flex: 1;
}

.admin-item-info p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin: 0.25rem 0;
}

.admin-item-info small {
    color: rgba(255, 255, 255, 0.4);
}

.admin-item-actions {
    display: flex;
    gap: 0.5rem;
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(26, 33, 56, 0.5);
    border-radius: 0.75rem;
}

/* Info box */
.info-box {
    background: rgba(26, 33, 56, 0.7);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 126, 0, 0.2);
}

/* Иконки */
.pin-icon,
.lock-icon {
    margin-right: 0.25rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .topic-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .topic-stats {
        align-items: flex-start;
    }
    
    .admin-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .modal-content {
        margin: 20% auto;
        width: 95%;
        padding: 1.5rem;
    }
}
