/* Стили для форума в стиле cyberpunk */

/* Общие стили */
.forum-container {
    background: var(--cp-bg-alt);
    border: 2px solid var(--cp-accent-purple);
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: 0 8px 25px rgba(185, 103, 255, 0.3), var(--cp-glow-purple);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.forum-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, rgba(0, 243, 255, 0.1), rgba(185, 103, 255, 0.1));
    border-radius: 14px;
    pointer-events: none;
    z-index: -1;
    animation: border-pulse 3s infinite;
}

@keyframes border-pulse {
    0%, 100% { border: 2px solid var(--cp-accent-purple); }
    50% { border: 2px solid var(--cp-accent-blue); }
}

/* Заголовок форума */
#forum-index h1 {
    color: var(--cp-accent-blue);
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 25px;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.7), 0 0 20px rgba(0, 243, 255, 0.5);
    animation: glitch 3s infinite;
}

#forum-index p {
    text-align: center;
    font-size: 1.3rem;
    color: var(--cp-accent-green);
    margin-bottom: 45px;
    text-shadow: 0 0 5px var(--cp-accent-green), 0 0 10px var(--cp-accent-green);
}

/* Категории форума */
.forum-category {
    margin-bottom: 35px;
    padding: 25px;
    background: rgba(17, 17, 17, 0.8);
    border: 2px solid var(--cp-border);
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), var(--cp-glow);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.forum-category:hover {
    transform: translateY(-3px);
    border-color: var(--cp-accent-blue);
    box-shadow: 0 9px 25px rgba(0, 0, 0, 0.5), var(--cp-glow);
}

.forum-category::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, rgba(0, 243, 255, 0.05), rgba(185, 103, 255, 0.05));
    border-radius: 16px;
    pointer-events: none;
    z-index: -1;
}

.forum-category h2 {
    color: var(--cp-accent-purple);
    margin: 0 0 18px 0;
    font-size: 2rem;
    text-align: center;
    text-shadow: 0 0 8px rgba(185, 103, 255, 0.7), 0 0 15px rgba(185, 103, 255, 0.5);
}

.category-description {
    color: var(--cp-text-dim);
    margin: 12px 0;
    font-style: italic;
}

/* Список разделов */
.forum-list {
    margin-top: 25px;
}

.forum-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    margin-bottom: 20px;
    background: var(--cp-bg-alt);
    border: 1px solid var(--cp-border);
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.forum-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 243, 255, 0.02), rgba(185, 103, 255, 0.02));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.forum-item:hover {
    transform: translateY(-4px);
    border-color: var(--cp-accent-blue);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), var(--cp-glow);
}

.forum-item:hover::before {
    opacity: 1;
}

.forum-info h3 {
    margin: 0 0 12px 0;
}

.forum-info h3 a {
    color: var(--cp-text);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.4rem;
    transition: color 0.3s ease;
    position: relative;
}

.forum-info h3 a:hover {
    color: var(--cp-accent-blue);
}

.forum-info h3 a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--cp-accent-blue);
    transition: width 0.3s ease;
    box-shadow: var(--cp-glow);
}

.forum-info h3 a:hover::after {
    width: 100%;
}

.forum-description {
    color: var(--cp-text-dim);
    margin: 6px 0 0 0;
    font-size: 0.95rem;
}

.forum-stats {
    text-align: right;
    color: var(--cp-text-dim);
    font-size: 0.95rem;
}

.forum-stats span {
    display: block;
    margin: 4px 0;
    font-weight: bold;
}

/* Темы форума */
.topics-list {
    margin-top: 25px;
}

.topic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    margin-bottom: 20px;
    background: var(--cp-bg-alt);
    border: 1px solid var(--cp-border);
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.topic-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 243, 255, 0.02), rgba(185, 103, 255, 0.02));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.topic-item:hover {
    transform: translateY(-4px);
    border-color: var(--cp-accent-blue);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), var(--cp-glow);
}

.topic-item:hover::before {
    opacity: 1;
}

.topic-pinned {
    background: var(--cp-accent-purple);
    color: white;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(185, 103, 255, 0.7);
}

.topic-info h3 {
    margin: 0 0 12px 0;
}

.topic-info h3 a {
    color: var(--cp-text);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.3rem;
    transition: color 0.3s ease;
    position: relative;
}

.topic-info h3 a:hover {
    color: var(--cp-accent-blue);
}

.topic-info h3 a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--cp-accent-blue);
    transition: width 0.3s ease;
    box-shadow: var(--cp-glow);
}

.topic-info h3 a:hover::after {
    width: 100%;
}

.topic-locked::after {
    content: ' 🔒';
    color: var(--cp-accent-red);
    font-size: 0.8em;
}

.topic-meta {
    color: var(--cp-text-dim);
    font-size: 0.95rem;
    margin: 6px 0;
}

.topic-author {
    font-weight: bold;
    color: var(--cp-accent-green);
}

.topic-stats {
    text-align: right;
    color: var(--cp-text-dim);
    font-size: 0.95rem;
}

.topic-stats span {
    display: block;
    margin: 4px 0;
    font-weight: bold;
}

/* Форма создания темы */
.create-topic-form {
    margin: 35px 0;
    padding: 30px;
    background: var(--cp-bg-alt);
    border: 1px solid var(--cp-border);
    border-radius: 14px;
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.create-topic-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 243, 255, 0.03), rgba(185, 103, 255, 0.03));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.create-topic-form:hover::before {
    opacity: 1;
}

.create-topic-form h3 {
    color: var(--cp-accent-purple);
    margin-top: 0;
    margin-bottom: 20px;
    text-shadow: 0 0 8px rgba(185, 103, 255, 0.5);
}

.create-topic-form .form-group {
    margin-bottom: 20px;
}

.create-topic-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--cp-text);
}

.create-topic-form input[type="text"],
.create-topic-form textarea {
    width: 100%;
    padding: 12px;
    background: rgba(17, 17, 17, 0.8);
    border: 1px solid var(--cp-border);
    border-radius: 8px;
    color: var(--cp-text);
    font-family: var(--cp-font-primary);
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.create-topic-form input[type="text"]:focus,
.create-topic-form textarea:focus {
    outline: none;
    border-color: var(--cp-accent-blue);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.create-topic-form textarea {
    height: 180px;
    resize: vertical;
    font-family: var(--cp-font-code);
}

.create-topic-form button {
    background: var(--cp-accent-blue);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-family: var(--cp-font-primary);
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(0, 243, 255, 0.7);
}

.create-topic-form button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 243, 255, 0.3);
}

.create-topic-form button:active {
    transform: translateY(-1px);
}

/* Сообщения в теме */
.posts-list {
    margin-top: 35px;
}

.post-item {
    padding: 30px;
    margin-bottom: 25px;
    background: var(--cp-bg-alt);
    border: 1px solid var(--cp-border);
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.post-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 243, 255, 0.03), rgba(185, 103, 255, 0.03));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.post-item:hover {
    transform: translateY(-3px);
    border-color: var(--cp-accent-blue);
    box-shadow: 0 11px 25px rgba(0, 0, 0, 0.5), var(--cp-glow);
}

.post-item:hover::before {
    opacity: 1;
}

.post-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--cp-border);
}

.post-author {
    font-weight: bold;
    color: var(--cp-accent-blue);
    font-size: 1.2rem;
}

.post-date {
    color: var(--cp-text-dim);
    font-size: 0.95rem;
}

.post-content {
    line-height: 1.7;
    color: var(--cp-text);
}

.post-content p {
    margin: 12px 0;
}

.post-content code {
    background: rgba(0, 243, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--cp-font-code);
    color: var(--cp-accent-green);
    border: 1px solid rgba(0, 243, 255, 0.3);
}

.post-content pre {
    background: rgba(17, 17, 17, 0.8);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 15px 0;
    border: 1px solid rgba(0, 243, 255, 0.2);
    font-family: var(--cp-font-code);
    color: var(--cp-accent-green);
}

/* Форма ответа */
.reply-form {
    margin: 35px 0;
    padding: 30px;
    background: var(--cp-bg-alt);
    border: 1px solid var(--cp-border);
    border-radius: 14px;
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.reply-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 243, 255, 0.03), rgba(185, 103, 255, 0.03));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.reply-form:hover::before {
    opacity: 1;
}

.reply-form h3 {
    color: var(--cp-accent-purple);
    margin-top: 0;
    margin-bottom: 20px;
    text-shadow: 0 0 8px rgba(185, 103, 255, 0.5);
}

.reply-form .form-group {
    margin-bottom: 20px;
}

.reply-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--cp-text);
}

.reply-form textarea {
    width: 100%;
    padding: 12px;
    background: rgba(17, 17, 17, 0.8);
    border: 1px solid var(--cp-border);
    border-radius: 8px;
    color: var(--cp-text);
    font-family: var(--cp-font-primary);
    font-size: 1rem;
    height: 180px;
    resize: vertical;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.reply-form textarea:focus {
    outline: none;
    border-color: var(--cp-accent-blue);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.reply-form button {
    background: var(--cp-accent-blue);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-family: var(--cp-font-primary);
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(0, 243, 255, 0.7);
}

.reply-form button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 243, 255, 0.3);
}

.reply-form button:active {
    transform: translateY(-1px);
}

/* Адаптивность */
@media (max-width: 768px) {
    .forum-item, .topic-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .forum-stats, .topic-stats {
        margin-top: 15px;
        text-align: left;
    }
    
    .post-header {
        flex-direction: column;
    }
    
    .post-date {
        margin-top: 8px;
    }
    
    #forum-index h1 {
        font-size: 2.3rem;
    }
    
    #forum-index p {
        font-size: 1.1rem;
    }
}