/* ===== СТРАНИЦА СТАТЬИ (article.php) ===== */

/* Основной контейнер */
.article-page .content {
    background: rgba(26,17,12,0.85);
    backdrop-filter: blur(8px);
    border-radius: 24px;
    padding: 30px 35px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.8), inset 0 0 30px rgba(212,175,55,0.1);
    border: 2px solid #b8860b;
}

/* Заголовок статьи */
.article-header {
    background: linear-gradient(145deg, rgba(44,30,21,0.95), rgba(26,17,12,0.95));
    border-radius: 20px 20px 0 0;
    border: 2px solid #a0522d;
    border-bottom: none;
    padding: 25px 30px;
    margin-bottom: 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.article-title {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 15px 0;
    color: #ffd966;
    text-shadow: 2px 2px 0 #2b1e0e, 0 0 20px rgba(255,215,0,0.3);
    letter-spacing: 1px;
    word-break: break-word;
}

/* Мета-панель (автор, дата, просмотры) */
.article-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    background: rgba(0,0,0,0.3);
    padding: 12px 20px;
    border-radius: 40px;
    border: 1px solid #8b5a2b;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.author-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    background: rgba(139,69,19,0.5);
    padding: 5px 15px;
    border-radius: 30px;
    border: 1px solid #b8860b;
    transition: all 0.2s;
}
.author-link:hover {
    background: #b8860b;
    color: #1f140c;
    border-color: #ffd700;
}

.author-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #b8860b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    text-transform: uppercase;
    color: #1f140c;
    box-shadow: 0 0 8px gold;
}

/* Кнопка подписки */
.subscribe-form {
    display: inline-block;
}
.subscribe-btn {
    background: linear-gradient(145deg, #3f2e22, #2b1e0e);
    border: 1px solid #b8860b;
    color: #fff;
    padding: 6px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}
.subscribe-btn:hover {
    background: #b8860b;
    color: #1f140c;
}
.subscribe-btn.subscribed {
    background: #2a5a2a;
    border-color: #4caf50;
    color: #b8ffb8;
}

.meta-stats {
    display: flex;
    gap: 20px;
    color: #ffd966;
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
}

/* Контент статьи */
.article-content {
    background: rgba(26,17,12,0.7);
    backdrop-filter: blur(4px);
    border-radius: 0 0 20px 20px;
    padding: 40px 45px;
    border: 2px solid #b07d44;
    border-top: none;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.7);
    color: #f5e6d3;
    font-size: 18px;
    line-height: 1.8;
}

.article-content img {
    display: block;
    margin: 20px auto;
    max-width: 100%;
    border-radius: 15px;
    border: 3px solid #d4af37;
    box-shadow: 0 0 20px #000;
}
.article-content img.sticker {
    max-width: 100%;
    border-radius: 0;
    border: none;
    box-shadow: none;
    margin: 20px 0;
 }

.article-content a {
    color: #ffd966;
    border-bottom: 1px dotted #b8860b;
}
.article-content a:hover {
    color: #fff;
    border-bottom: 1px solid #ffd700;
}

/* Теги */
.article-tags {
    margin: 20px 0 30px;
    padding: 15px;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    border: 1px dashed #b8860b;
}
.tags-label {
    color: #ffd966;
    font-weight: 600;
    margin-right: 10px;
}
.tag {
    display: inline-block;
    background: #3f2e22;
    color: #ffd966;
    padding: 5px 12px;
    border-radius: 30px;
    margin: 0 5px 5px 0;
    border: 1px solid #b8860b;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}
.tag:hover {
    background: #b8860b;
    color: #1f140c;
    border-color: #ffd700;
}

/* Блок поддержки автора */
.author-support-card {
    background: rgba(91,69,50,0.7);
    border: 2px solid #d4af37;
    border-radius: 15px;
    padding: 20px;
    margin: 30px 0;
    box-shadow: 0 8px 20px #000;
}
.author-support-card h4 {
    color: #ffd966;
    font-size: 22px;
    margin-bottom: 15px;
    border-bottom: 1px solid #b8860b;
    padding-bottom: 5px;
}
.support-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.support-field label {
    display: block;
    color: #ffd966;
    margin-bottom: 3px;
}
.support-field input,
.support-field textarea {
    width: 100%;
    max-width: 100%;
    background: #3f2e22;
    border: 1px solid #b8860b;
    color: #fff;
    padding: 8px;
    border-radius: 5px;
}
.support-submit {
    align-self: flex-start;
}

/* Опрос */
.poll-block {
    background: rgba(91,69,50,0.7);
    border: 2px solid #d4af37;
    border-radius: 15px;
    padding: 20px;
    margin: 30px 0;
}
.poll-block h3 {
    color: #ffd966;
    font-size: 22px;
    margin-bottom: 10px;
}
.poll-description {
    color: #ddd;
    margin-bottom: 15px;
}
.poll-option {
    display: block;
    margin: 8px 0;
    color: #fff;
    cursor: pointer;
}
.poll-option input {
    margin-right: 8px;
}
.voted-message {
    color: #aaa;
    font-style: italic;
}

/* Реакции */
.reactions-block {
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
}
.reactions-block h4 {
    color: #ffd966;
    margin-bottom: 10px;
}
.reactions-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.reaction-btn {
    background: #3f2e22;
    border: 1px solid #b8860b;
    border-radius: 30px;
    padding: 8px 15px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.reaction-btn.active {
    background: #b8860b;
    color: #1f140c;
    border-color: #ffd700;
    box-shadow: 0 0 10px gold;
}
.reaction-btn .count {
    font-weight: 600;
}

/* Комментарии */
.comments-block {
    margin-top: 30px;
}
.comments-block h4 {
    color: #ffd966;
    font-size: 22px;
    margin-bottom: 20px;
    border-bottom: 1px solid #b8860b;
    padding-bottom: 5px;
}
.add-comment-form textarea {
    width: 100%;
    background: #3f2e22;
    border: 1px solid #b8860b;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    resize: vertical;
    margin-bottom: 10px;
}
.no-comments {
    text-align: center;
    color: #aaa;
    padding: 30px;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
}
.comment-item {
    background: rgba(0,0,0,0.25);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #b8860b;
    transition: all 0.2s;
}
.comment-item:hover {
    background: rgba(0,0,0,0.35);
    border-left-color: #ffd700;
}
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.comment-author a {
    font-weight: 600;
    text-decoration: none;
    color: #ffd966;
}
.comment-author a:hover {
    text-decoration: underline;
}
.comment-body {
    color: #f0e6d2;
    line-height: 1.6;
    margin-bottom: 8px;
}
.comment-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.comment-actions button {
    background: none;
    border: 1px solid #b8860b;
    border-radius: 5px;
    padding: 4px 10px;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.comment-actions button:hover {
    background: #b8860b;
    color: #1f140c;
}

/* Кнопки администрирования статьи */
.article-admin-actions {
    margin-top: 30px;
    text-align: center;
}
.article-admin-actions .button {
    background: linear-gradient(145deg, #a0522d, #8b4513);
    border: 2px solid #b8860b;
    border-radius: 12px;
    padding: 12px 30px;
    color: #ffd966;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s;
    box-shadow: 0 5px 0 #3f2e22;
    width: 40%;
}
.article-admin-actions .button:hover {
    background: linear-gradient(145deg, #8b4513, #5d2906);
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #3f2e22, 0 0 20px gold;
}

/* Стили для формы поддержки (добавить в portal.css) */

.author-support-card {
    background: linear-gradient(145deg, rgba(44,30,21,0.98), rgba(26,17,12,0.98));
    border-radius: 20px;
    border: 2px solid #a0522d;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8), inset 0 0 30px rgba(212,175,55,0.1);
    padding: 30px;
    margin: 30px 0;
}

.author-support-card h4 {
    color: #ffd966;
    font-size: 24px;
    margin-bottom: 20px;
    border-bottom: 2px solid #b8860b;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.support-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Селектор предметов */
.support-item-selector .selector-label {
    display: block;
    color: #ffd966;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 16px;
}

.item-icons-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.item-icon-label {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
    padding: 15px 10px 10px;
    background: rgba(0,0,0,0.3);
    border: 2px solid #8b5a2b;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.item-icon-label:not(.disabled):hover {
    border-color: #ffd700;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5), 0 0 15px rgba(255,215,0,0.3);
}

.item-icon-label.selected {
    border-color: #ffd700;
    background: rgba(184,134,11,0.2);
    box-shadow: 0 0 20px gold;
}

.item-icon-label.disabled {
    opacity: 0.5;
    filter: grayscale(0.8);
    cursor: not-allowed;
    pointer-events: none;
}

.item-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.item-icon-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 12px;
    border: 2px solid #b8860b;
    background: rgba(0,0,0,0.2);
    margin-bottom: 8px;
}

.item-name {
    color: #ffd966;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    min-height: 32px;
}

.item-balance {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(145deg, #b8860b, #8b5a2b);
    color: #1f140c;
    font-size: 11px;
    font-weight: bold;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 1px solid #ffd700;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* Поле количества */
.quantity-field {
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    padding: 20px;
}

.quantity-field label {
    color: #ffd966;
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

.quantity-input-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.quantity-input {
    width: 150px;
    background: #3f2e22;
    border: 2px solid #b8860b;
    border-radius: 30px;
    padding: 12px 20px;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.quantity-input:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 15px gold;
}

.quantity-input.error {
    border-color: #ff4444;
    box-shadow: 0 0 10px rgba(255,68,68,0.5);
}

.quantity-info {
    color: #d4b28c;
    font-size: 16px;
    background: rgba(0,0,0,0.3);
    padding: 8px 20px;
    border-radius: 30px;
    border: 1px solid #8b5a2b;
}

.quantity-info span {
    color: #ffd966;
    font-weight: 700;
    font-size: 18px;
}

.commission-info {
    margin-top: 10px;
}

.commission-badge {
    display: inline-block;
    background: rgba(184,134,11,0.2);
    border: 1px solid #b8860b;
    border-radius: 30px;
    padding: 5px 15px;
    color: #ffd966;
    font-size: 14px;
}

/* Поле комментария */
.support-field textarea {
    width: 100%;
    background: #3f2e22;
    border: 2px solid #b8860b;
    border-radius: 16px;
    padding: 15px;
    color: #fff;
    font-size: 16px;
    resize: vertical;
    min-height: 80px;
}

.support-field textarea:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 15px gold;
}

/* Чекбокс анонимности */
.checkbox-field {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #f0e6d2;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-custom {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: #3f2e22;
    border: 2px solid #b8860b;
    border-radius: 6px;
    position: relative;
    transition: all 0.2s;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffd700;
    font-size: 18px;
    font-weight: bold;
}

.checkbox-label:hover .checkbox-custom {
    border-color: #ffd700;
    box-shadow: 0 0 10px gold;
}

/* Кнопка отправки */
.support-actions {
    display: flex;
    justify-content: flex-end;
}

.support-submit {
    background: linear-gradient(145deg, #a0522d, #8b4513);
    border: 2px solid #b8860b;
    border-radius: 40px;
    padding: 14px 40px;
    font-size: 18px;
    font-weight: 700;
    color: #ffd966;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 0 #3f2e22, 0 8px 20px #000;
}

.support-submit:hover:not(:disabled) {
    background: linear-gradient(145deg, #8b4513, #5d2906);
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #3f2e22, 0 12px 25px #000, 0 0 20px gold;
    color: #fff;
}

.support-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

/* Дополнительные стили для состояний ошибки и успеха */
.quantity-input.error {
    border-color: #ff4444 !important;
    box-shadow: 0 0 10px rgba(255,68,68,0.5) !important;
}

.balance-error {
    color: #ff6666;
    margin-top: 10px;
    padding: 8px;
    background: rgba(255, 0, 0, 0.1);
    border-radius: 8px;
    border: 1px solid #ff4444;
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.balance-success {
    color: rgb(76, 175, 80);
    margin-top: 10px;
    padding: 8px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 8px;
    border: 1px solid rgb(76, 175, 80);
    border-left: 4px solid #4caf50;
}

/* ===== ЛЕНТА СТАТЕЙ ===== */
.articles-feed {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 20px;
}

.feed-item {
    background: linear-gradient(145deg, rgba(44,30,21,0.95), rgba(26,17,12,0.95));
    border-radius: 20px;
    border: 2px solid #a0522d;
    padding: 25px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.6), inset 0 0 20px rgba(212,175,55,0.05);
    transition: all 0.3s ease;
}

.feed-item:hover {
    border-color: #ffd700;
    box-shadow: 0 12px 30px rgba(0,0,0,0.8), 0 0 25px rgba(255,215,0,0.2);
    transform: translateY(-3px);
}

.feed-item-header h3 {
    margin: 10px 0 5px;
    font-size: 24px;
    font-weight: 700;
}

.feed-item-header h3 a {
    color: #ffd966;
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: border-color 0.2s;
}

.feed-item-header h3 a:hover {
    border-bottom: 1px dashed #ffd700;
}

.author-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(212,175,55,0.2);
}

.author-mini img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #b8860b;
    object-fit: cover;
}

.author-name {
    font-weight: 600;
    color: #ffd966;
    font-size: 16px;
    text-decoration: none;
}

.author-name:hover {
    text-decoration: underline;
    color: #ffd700;
}

.feed-item-meta {
    display: flex;
    gap: 25px;
    margin: 15px 0;
    color: #b8a58e;
    font-size: 14px;
}

.feed-item-excerpt {
    color: #e6d5b8;
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 16px;
    border-left: 3px solid #b8860b;
    padding-left: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 0 8px 8px 0;
}

.feed-item-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.feed-item-actions .button.small {
    background: linear-gradient(145deg, #3f2e22, #2b1e0e);
    border: 1px solid #b8860b;
    color: #ffd966;
    padding: 10px 20px;
    font-size: 15px;
    border-radius: 30px;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.feed-item-actions .button.small:hover {
    background: #b8860b;
    color: #1f140c;
    border-color: #ffd700;
    transform: translateY(-2px);
}

.feed-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    padding: 10px;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    border: 1px solid #6b4f2a;
}

.feed-tabs .tab-button {
    padding: 10px 20px;
    background: linear-gradient(145deg, #3f2e22, #2b1e0e);
    border: 1px solid #b8860b;
    border-radius: 30px;
    color: #fff8e7;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.feed-tabs .tab-button.active {
    background: linear-gradient(145deg, #b8860b, #8b5a2b);
    color: #1f140c;
    border-color: #ffd700;
    box-shadow: 0 0 15px gold;
}

.feed-tabs .tab-button:hover:not(.active) {
    background: #b8860b;
    color: #1f140c;
}

.page-title .search-form {
    display: flex;
    gap: 10px;
    background: rgba(0,0,0,0.3);
    border-radius: 40px;
    padding: 5px 5px 5px 15px;
    border: 1px solid #8b5a2b;
}

.page-title .search-form input {
    background: transparent;
    border: none;
    color: #fff;
    padding: 8px 0;
    font-size: 16px;
    width: 250px;
}

.page-title .search-form input:focus {
    outline: none;
    box-shadow: none;
    border: none;
}

.page-title .search-form button {
    background: linear-gradient(145deg, #b8860b, #8b5a2b);
    border: none;
    border-radius: 30px;
    padding: 8px 20px;
    color: #1f140c;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.page-title .search-form button:hover {
    background: #8b5a2b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* ===== ОПРОСЫ ===== */
.poll-block {
    background: linear-gradient(145deg, rgba(44,30,21,0.95), rgba(26,17,12,0.95));
    border-radius: 20px;
    border: 2px solid #a0522d;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 8px 20px #000, inset 0 0 30px rgba(212,175,55,0.1);
    position: relative;
}

.poll-block h3 {
    color: #ffd966;
    font-size: 24px;
    margin: 0 0 10px 0;
    border-bottom: 1px solid #b8860b;
    padding-bottom: 8px;
}

.poll-description {
    color: #e6d5b8;
    font-style: italic;
    margin-bottom: 20px;
    background: rgba(0,0,0,0.2);
    padding: 10px 15px;
    border-radius: 8px;
    border-left: 4px solid #b8860b;
}

.poll-option {
    display: block;
    margin: 12px 0;
    color: #f5e6d3;
    cursor: pointer;
    font-size: 16px;
    background: rgba(0,0,0,0.3);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #8b5a2b;
    transition: all 0.2s;
}

.poll-option:hover {
    background: rgba(184,134,11,0.2);
    border-color: #ffd700;
}

.poll-option input {
    margin-right: 10px;
    transform: scale(1.2);
    accent-color: #b8860b;
}

.voted-message {
    color: #27ae60;
    font-weight: 600;
    background: rgba(39,174,96,0.2);
    padding: 10px 15px;
    border-radius: 8px;
    border-left: 4px solid #27ae60;
}

.poll-section {
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 2px dashed #b8860b;
}

.poll-section h4 {
    color: #ffd966;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}


