/* style.css - LibertyRP Форум */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0a0c0f;
    color: #e4e6eb;
    line-height: 1.5;
}

/* Фон с изображениями */
.background-slideshow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.background-slideshow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(10, 12, 15, 0.95) 0%,
        rgba(10, 12, 15, 0.85) 50%,
        rgba(10, 12, 15, 0.95) 100%
    );
    z-index: -1;
}

.bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.bg-image.active {
    opacity: 0.4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* Шапка */
header {
    background: rgba(18, 22, 28, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 2px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    color: #b0b7c4;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
    letter-spacing: 0.3px;
}

nav a:hover,
nav a.active {
    color: #667eea;
}

.register-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
}

.register-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Приветственный баннер */
.welcome-banner {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 60px 40px;
    margin: 40px 0;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.welcome-banner h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #fff 0%, #b0b7c4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-banner p {
    font-size: 18px;
    color: #b0b7c4;
    margin-bottom: 30px;
}

.banner-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-discord, .btn-server {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-discord {
    background: #5865F2;
    color: white;
}

.btn-server {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    backdrop-filter: blur(5px);
}

.btn-discord:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(88, 101, 242, 0.4);
}

.btn-server:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Статистика */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.stat-item {
    background: rgba(18, 22, 28, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: transform 0.2s;
}

.stat-item:hover {
    transform: translateY(-4px);
    background: rgba(28, 32, 38, 0.9);
    border-color: rgba(102, 126, 234, 0.3);
}

.stat-item i {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 12px;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: #8e9aaf;
}

/* Разделы форума */
.forum-sections {
    background: rgba(18, 22, 28, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    margin: 40px 0;
}

.forum-sections h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 25px;
    color: white;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.category:hover {
    background: rgba(255, 255, 255, 0.02);
}

.category:last-child {
    border-bottom: none;
}

.category-header h3 {
    color: #667eea;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.category-header p {
    color: #8e9aaf;
    font-size: 14px;
}

.category-stats {
    color: #8e9aaf;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
}

.category-stats i {
    margin-right: 6px;
    color: #667eea;
}

/* Последние темы */
.latest-topics {
    background: rgba(18, 22, 28, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    margin: 40px 0;
}

.latest-topics h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 25px;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.topics-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.topic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    transition: all 0.2s;
}

.topic-item:hover {
    background: rgba(28, 32, 38, 0.9);
    border-color: rgba(102, 126, 234, 0.2);
    transform: translateX(4px);
}

.topic-main h4 {
    margin-bottom: 10px;
}

.topic-main a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.2s;
}

.topic-main a:hover {
    color: #667eea;
}

.topic-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 10px;
    text-transform: uppercase;
}

.topic-badge.closed {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.topic-badge.pinned {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
}

.topic-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #8e9aaf;
}

.topic-meta i {
    margin-right: 5px;
    color: #667eea;
}

.topic-meta .author {
    color: #667eea;
}

.topic-stats {
    display: flex;
    gap: 20px;
    color: #8e9aaf;
    font-size: 13px;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
}

.topic-stats i {
    margin-right: 5px;
    color: #667eea;
}

/* Подвал */
footer {
    background: rgba(10, 12, 15, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 60px;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-section p {
    color: #8e9aaf;
    font-size: 14px;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #8e9aaf;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-section ul li a:hover {
    color: #667eea;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #8e9aaf;
    text-decoration: none;
    transition: all 0.2s;
}

.social-links a:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #5a6577;
    font-size: 13px;
}

/* Адаптивность */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .banner-buttons {
        flex-direction: column;
    }
    
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .topic-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .topic-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-banner,
.stats-bar,
.forum-sections,
.latest-topics {
    animation: fadeIn 0.6s ease-out;
}

/* Стили для BB редактора (потом добавим) */
.bb-editor {
    background: #1a1e24;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.bb-toolbar {
    background: #252b33;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bb-button {
    background: none;
    border: none;
    color: #b0b7c4;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.bb-button:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
}

.bb-textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    background: #1a1e24;
    border: none;
    color: white;
    font-family: monospace;
    resize: vertical;
}

.bb-textarea:focus {
    outline: none;
}

/* Стили для сообщений */
.post {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.post-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.post-author {
    color: #667eea;
    font-weight: 600;
}

.post-date {
    color: #8e9aaf;
    font-size: 13px;
}

.post-content {
    color: #e4e6eb;
    line-height: 1.7;
}

/* Стили для BBCode */
.bb-quote {
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid #667eea;
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #b0b7c4;
}

.bb-code {
    background: #1e1e1e;
    padding: 10px;
    border-radius: 8px;
    font-family: monospace;
    color: #d4d4d4;
    overflow-x: auto;
}

.bb-spoiler {
    background: #2c3e50;
    color: #2c3e50;
    padding: 2px 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.2s;
}

.bb-spoiler:hover {
    color: white;
}

.bb-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

.bb-img-left {
    float: left;
    margin: 0 20px 20px 0;
    max-width: 300px;
}

.bb-img-right {
    float: right;
    margin: 0 0 20px 20px;
    max-width: 300px;
}

/* Clearfix для floated изображений */
.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

.forum-actions {
    margin-bottom: 25px;
    display: flex;
    justify-content: flex-end;
}

.create-topic-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.create-topic-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.category-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s;
}

.category-link:hover {
    transform: translateX(5px);
}

/* Расширенные BBcode стили */

/* Изображения с обтеканием */
.bb-img-left {
    float: left;
    margin: 0 20px 20px 0;
    max-width: 300px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.bb-img-right {
    float: right;
    margin: 0 0 20px 20px;
    max-width: 300px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.bb-img {
    max-width: 100%;
    border-radius: 8px;
    margin: 10px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Фигура с подписью */
.bb-figure {
    margin: 20px 0;
    text-align: center;
}

.bb-figure img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.bb-figure figcaption {
    margin-top: 10px;
    color: #8e9aaf;
    font-size: 14px;
    font-style: italic;
}

/* Цитаты */
.bb-quote {
    background: rgba(102, 126, 234, 0.1);
    border-left: 4px solid #667eea;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #b0b7c4;
}

.quote-author {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 10px;
    font-style: normal;
}

/* Код */
.bb-code {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    color: #d4d4d4;
    overflow-x: auto;
    margin: 15px 0;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Спойлер */
.bb-spoiler {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin: 15px 0;
    overflow: hidden;
}

.spoiler-title {
    background: rgba(102, 126, 234, 0.2);
    padding: 12px 20px;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.spoiler-title::before {
    content: '▶';
    font-size: 14px;
    transition: transform 0.3s;
}

.spoiler-title.active::before {
    transform: rotate(90deg);
}

.spoiler-content {
    padding: 20px;
    display: none;
}

.spoiler-content.active {
    display: block;
}

/* Таблицы */
.bb-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

.bb-table th {
    background: rgba(102, 126, 234, 0.2);
    padding: 12px;
    color: white;
    font-weight: 600;
}

.bb-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bb-table tr:last-child td {
    border-bottom: none;
}

/* Видео */
.bb-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 20px 0;
    border-radius: 12px;
}

.bb-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Аудио */
.bb-audio {
    margin: 20px 0;
}

.bb-audio iframe {
    width: 100%;
    height: 166px;
    border-radius: 12px;
}

/* Прогресс бар */
.bb-progress {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    height: 30px;
    margin: 15px 0;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
    transition: width 0.3s;
}

/* Кнопки */
.bb-button-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.bb-button-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* Нотисы */
.bb-note {
    background: rgba(52, 152, 219, 0.1);
    border-left: 4px solid #3498db;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 0 12px 12px 0;
    color: #b0b7c4;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bb-warning {
    background: rgba(241, 196, 15, 0.1);
    border-left: 4px solid #f1c40f;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 0 12px 12px 0;
    color: #b0b7c4;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bb-success {
    background: rgba(46, 204, 113, 0.1);
    border-left: 4px solid #2ecc71;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 0 12px 12px 0;
    color: #b0b7c4;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bb-error {
    background: rgba(231, 76, 60, 0.1);
    border-left: 4px solid #e74c3c;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 0 12px 12px 0;
    color: #b0b7c4;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bb-note i,
.bb-warning i,
.bb-success i,
.bb-error i {
    font-size: 20px;
}

/* Скрытый текст */
.bb-hidden {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    color: #8e9aaf;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Горизонтальная линия */
.bb-hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #667eea, #764ba2, #667eea, transparent);
    margin: 30px 0;
}

/* Clearfix для обтекания */
.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

/* Адаптивность для изображений */
@media (max-width: 768px) {
    .bb-img-left,
    .bb-img-right {
        float: none;
        margin: 20px 0;
        max-width: 100%;
    }
}