/* SpicGram — фиолетово-черная тема, ручная работа */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #0a0a0c;
    color: #e2e2e6;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #0a0a0c;
}

/* Шапка */
header {
    background: #121216;
    border: 1px solid #2a2a33;
    border-radius: 20px;
    padding: 20px 25px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.logo h1 {
    font-size: 1.9em;
    font-weight: 600;
    background: linear-gradient(135deg, #c7a6ff, #a473ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.logo p {
    color: #8a8a9e;
    font-size: 0.9em;
}

.user-menu {
    display: flex;
    gap: 12px;
    align-items: center;
}

.user-menu a {
    color: #ddd;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 40px;
    background: #1e1e26;
    font-size: 0.9em;
    border: 1px solid #33333f;
    transition: 0.2s;
}

.user-menu a:hover {
    background: #2e2e3a;
    border-color: #9b6eff;
}

.user-menu span {
    color: #aaa;
}

/* Навигация */
nav {
    background: #121216;
    border: 1px solid #2a2a33;
    border-radius: 60px;
    padding: 10px 20px;
    margin-bottom: 25px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

nav a {
    color: #aaa;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 0.95em;
    transition: 0.15s;
}

nav a:hover {
    background: #2a2a35;
    color: white;
}

nav a.active {
    background: #7c4dff;
    color: white;
    font-weight: 500;
}

/* Категории */
.categories {
    background: #121216;
    border: 1px solid #2a2a33;
    border-radius: 24px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.5);
}

.categories h2 {
    color: #d0d0e0;
    font-size: 1.3em;
    font-weight: 500;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #2a2a35;
}

.category-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 12px;
    border-bottom: 1px solid #22222b;
    transition: 0.2s;
    border-radius: 12px;
}

.category-card:hover {
    background: #1c1c24;
}

.category-info h3 a {
    color: #f0f0f5;
    text-decoration: none;
    font-size: 1.15em;
    font-weight: 500;
}

.category-info h3 a:hover {
    color: #b185ff;
}

.category-info p {
    color: #8a8a9e;
    font-size: 0.9em;
    margin-top: 4px;
}

.category-stats {
    color: #8a8a9e;
    font-size: 0.9em;
}

/* Посты / темы */
.topics {
    background: #121216;
    border: 1px solid #2a2a33;
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 25px;
}

.topic-row {
    display: grid;
    grid-template-columns: 2fr 1fr 100px 100px 120px;
    padding: 14px 12px;
    border-bottom: 1px solid #22222b;
    align-items: center;
}

.topic-row.header {
    background: #1b1b24;
    font-weight: 500;
    color: #b0b0c0;
    border-radius: 16px;
    border: none;
    margin-bottom: 6px;
}

.topic-title a {
    color: #f0f0f5;
    text-decoration: none;
    font-weight: 500;
}

.topic-title a:hover {
    color: #b185ff;
}

.topic-author, .topic-date, .topic-views {
    color: #8a8a9e;
    font-size: 0.9em;
}

.topic-replies {
    text-align: center;
    background: #2a2a35;
    color: white;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.85em;
    font-weight: 500;
}

/* Просмотр темы */
.topic-header {
    background: #121216;
    border: 1px solid #2a2a33;
    border-radius: 24px;
    padding: 28px;
    margin-bottom: 25px;
}

.topic-title {
    font-size: 2em;
    color: #f0f0f5;
    margin-bottom: 15px;
    font-weight: 600;
}

.topic-meta {
    display: flex;
    gap: 20px;
    color: #8a8a9e;
    font-size: 0.95em;
    padding-bottom: 20px;
    border-bottom: 1px solid #2a2a35;
}

.topic-content {
    padding: 25px 0;
    font-size: 1.1em;
    line-height: 1.8;
    color: #d0d0e0;
}

.reply {
    background: #121216;
    border: 1px solid #2a2a33;
    border-radius: 20px;
    padding: 22px;
    margin-bottom: 18px;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #2a2a35;
}

.reply-author {
    font-weight: 600;
    color: #b185ff;
}

.reply-date {
    color: #8a8a9e;
    font-size: 0.9em;
}

.reply-content {
    color: #d0d0e0;
    line-height: 1.7;
}

/* Формы */
.form-container {
    background: #121216;
    border: 1px solid #2a2a33;
    border-radius: 24px;
    padding: 35px;
    max-width: 550px;
    margin: 0 auto;
}

.form-container h2 {
    color: #f0f0f5;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 500;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #aaa;
    font-size: 0.95em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: #1a1a22;
    border: 1px solid #33333f;
    border-radius: 16px;
    color: #f0f0f5;
    font-size: 1em;
    transition: 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #9b6eff;
    background: #22222b;
}

/* Капча */
.captcha-group {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #1a1a22;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid #33333f;
}

.captcha-group img {
    border: 1px solid #3a3a48;
    border-radius: 12px;
    background: #0a0a0c;
    width: 140px;
    height: 50px;
}

.refresh-btn {
    padding: 8px 16px;
    background: #2a2a35;
    border: 1px solid #44445a;
    border-radius: 30px;
    color: white;
    cursor: pointer;
    font-size: 1.1em;
    transition: 0.15s;
}

.refresh-btn:hover {
    background: #3a3a4a;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 28px;
    background: #7c4dff;
    border: none;
    border-radius: 40px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1em;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 12px rgba(124, 77, 255, 0.3);
}

.btn:hover {
    background: #976eff;
    transform: scale(1.02);
    box-shadow: 0 8px 18px rgba(124, 77, 255, 0.5);
}

.btn-secondary {
    background: #2a2a35;
    box-shadow: none;
}

.btn-secondary:hover {
    background: #3a3a4a;
    transform: none;
    box-shadow: none;
}

/* Профиль */
.profile-card {
    background: #121216;
    border: 1px solid #2a2a33;
    border-radius: 28px;
    padding: 35px;
}

.profile-header {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 1px solid #2a2a35;
}

.profile-avatar {
    width: 90px;
    height: 90px;
    background: #7c4dff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
    color: white;
    font-weight: 600;
    box-shadow: 0 6px 0 #3a2a6a;
}

.profile-info h2 {
    color: #f0f0f5;
    margin-bottom: 10px;
}

.profile-info p {
    color: #aaa;
    margin: 4px 0;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 35px;
}

.stat-card {
    background: #1a1a22;
    border: 1px solid #2a2a35;
    border-radius: 24px;
    padding: 22px;
    text-align: center;
}

.stat-card .number {
    font-size: 2.2em;
    font-weight: 700;
    color: #b185ff;
    margin-bottom: 6px;
}

.stat-card .label {
    color: #aaa;
    font-size: 0.9em;
}

/* Алерты */
.alert {
    padding: 14px 20px;
    border-radius: 18px;
    margin-bottom: 20px;
    border-left: 6px solid;
    font-weight: 500;
}

.alert-success {
    background: #1a2a22;
    border-color: #6fcf97;
    color: #b0f0c0;
}

.alert-error {
    background: #2a1a22;
    border-color: #e06c7a;
    color: #ffb0b8;
}

/* Поиск */
.search-box {
    background: #121216;
    border: 1px solid #2a2a33;
    border-radius: 60px;
    padding: 8px;
    margin-bottom: 25px;
    display: flex;
}

.search-input {
    flex: 1;
    padding: 14px 22px;
    background: transparent;
    border: none;
    color: white;
    font-size: 1em;
}

.search-input:focus {
    outline: none;
}

.search-btn {
    background: #7c4dff;
    border: none;
    border-radius: 50px;
    padding: 12px 32px;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.result-item {
    background: #121216;
    border: 1px solid #2a2a33;
    border-radius: 24px;
    padding: 22px;
    margin-bottom: 16px;
}

.result-title a {
    color: #f0f0f5;
    text-decoration: none;
    font-size: 1.25em;
    font-weight: 500;
}

.result-title a:hover {
    color: #b185ff;
}

.result-meta {
    color: #8a8a9e;
    font-size: 0.9em;
    display: flex;
    gap: 20px;
    margin-top: 12px;
}

/* Правила, помощь */
.rules-container, .help-container {
    background: #121216;
    border: 1px solid #2a2a33;
    border-radius: 28px;
    padding: 35px;
}

.rule-section, .help-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #2a2a35;
}

.rule-section h2, .help-section h2 {
    color: #f0f0f5;
    font-size: 1.3em;
    margin-bottom: 16px;
}

.rule-section ul {
    margin-left: 25px;
    color: #aaa;
}

.rule-section li {
    margin: 8px 0;
}

.faq-item {
    background: #1a1a22;
    border: 1px solid #2a2a35;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
}

.faq-question {
    font-weight: 600;
    color: #b185ff;
    margin-bottom: 8px;
    font-size: 1.05em;
}

.faq-answer {
    color: #aaa;
    line-height: 1.6;
}

.warning {
    background: #2a2a1a;
    border-left: 6px solid #ffb347;
    padding: 18px;
    border-radius: 16px;
    margin: 20px 0;
    color: #ffe0a0;
}

.contact-box {
    background: linear-gradient(145deg, #7c4dff, #5a2dca);
    border-radius: 28px;
    padding: 30px;
    text-align: center;
    color: white;
    margin-top: 25px;
    box-shadow: 0 8px 0 #3a1f7a;
}

.contact-box a {
    color: white;
    text-decoration: underline;
    font-weight: 500;
}

/* Подвал */
footer {
    margin-top: 45px;
    text-align: center;
    padding: 25px;
    color: #6a6a80;
    border-top: 1px solid #2a2a35;
    font-size: 0.9em;
}

footer a {
    color: #9a9ab0;
    margin: 0 8px;
    text-decoration: none;
}

footer a:hover {
    color: #b185ff;
}

/* Адаптация */
@media (max-width: 700px) {
    header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .topic-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .topic-row.header {
        display: none;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
    }
}