:root {
    --primary-color: #4d8cf5;
    --text-color: #2a2e2e;
    --border-color: #e7e9ee;
    --bg-color: #f0f2f5;
    --hover-color: #f8f9f9;
}

.comment-system {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
    color: var(--text-color);
    line-height: 1.5;
}

/* Header */
.comments-header {
    padding: 0 0 14px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid #d1d5db;
}

.comments-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.comments-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.comments-header h2::before {
    display: none;
}

.comments-header .header-logo {
    display: none;
}

.auth-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-container .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.count-number {
    margin-left: 0;
    color: inherit;
    font-weight: 600;
}

.user-menu-chat-icon {
    color: #2a2e2e;
    flex-shrink: 0;
}

.comments-header p {
    display: none;
}

.comments-count {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.sort-dropdown {
    display: none;
}

.sort-button {
    display: none;
}

.sort-button:hover {
    background-color: var(--hover-color);
}

/* User Menu */
.user-menu {
    position: relative;
    display: inline-block;
}

.user-menu-trigger {
    background: none;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    color: #2a2e2e;
    font-size: 14px;
    font-weight: 500;
}

.user-menu-trigger:hover {
    background-color: #f4f5f7;
}

.user-menu-name {
    color: #17a2b8;
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.user-menu-dropdown.active {
    display: block;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: #2a2e2e;
    transition: background-color 0.2s;
    font-size: 14px;
}

.user-menu-item:hover {
    background-color: #f8f9fa;
    color: #17a2b8;
}

.user-menu-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.user-menu-item:hover svg {
    opacity: 1;
    stroke: #17a2b8;
}

/* Formular comentariu — layout nou cu avatar lateral */
.comment-form {
    background: transparent;
    border-radius: 0;
    margin: 0 0 16px 0;
    box-shadow: none;
}

.comment-form-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 0;
}

.comment-form-avatar {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-form-avatar-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #14a0e6;
    color: white;
    font-weight: 600;
    font-size: 18px;
    border-radius: 50%;
}

.comment-form-box {
    flex: 1;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.15s;
}

.comment-form-box:focus-within {
    border-color: #b1b8bf;
}

.comment-form-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 0 16px;
}

.comment-form-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.comment-form-user-info {
    flex: 1;
    color: #65676B;
    font-size: 14px;
}

.comment-input {
    width: 100%;
    min-height: 100px;
    padding: 12px 14px;
    border: none;
    border-radius: 0;
    font-size: 14px;
    line-height: 1.45;
    resize: vertical;
    color: #2a2e2e;
    box-sizing: border-box;
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    display: block;
}

.comment-input:focus {
    outline: none;
}

.comment-input::placeholder {
    color: #8b949e;
}

.comment-form-footer {
    padding: 6px 10px;
    border-top: 1px solid var(--border-color);
    background: transparent;
    border-radius: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

/* Miniaturile imaginilor atașate — vizibile în casetă înainte de postare */
.images-preview-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 12px;
    border-top: 1px solid var(--border-color);
}

.image-preview {
    position: relative;
    display: inline-block;
}

.image-preview-thumb {
    display: block;
    max-width: 150px;
    max-height: 150px;
    min-width: 80px;
    min-height: 80px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.image-preview .remove-image {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    background: rgba(23, 162, 184, 0.95);
    border: 2px solid white;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.15s, transform 0.15s;
}

.image-preview .remove-image:hover {
    background: #dc3545;
    transform: scale(1.08);
}

.image-preview .remove-image svg { display: block; }

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.formatting-help {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
    flex-wrap: wrap;
    min-width: 0;
}

.format-btn {
    background: none;
    border: none;
    padding: 4px;
    border-radius: 4px;
    color: #6e7781;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.format-btn svg {
    width: 14px;
    height: 14px;
}

.format-btn:hover {
    background: #eef0f2;
    color: #24292e;
}

/* Ascundem butoanele List / Quote / Code din toolbar — rareori folosite, încarcă UI-ul.
   Render-ate de bundle.min.js, de-asta le scoatem aici via attribute selector. */
.format-btn[data-format="list"],
.format-btn[data-format="quote"],
.format-btn[data-format="code"] {
    display: none !important;
}

.submit-btn {
    background-color: #2ea44f;
    color: white;
    border: 1px solid rgba(27, 31, 35, 0.15);
    padding: 6px 18px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    height: 32px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 0 rgba(27, 31, 35, 0.04);
}

.submit-btn:hover {
    background-color: #2c974b;
}

.submit-btn:disabled {
    background-color: #94d3a2 !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.comment-input:valid ~ .comment-form-footer .submit-btn {
    background-color: #2ea44f;
}

/* Anunț temporar deasupra casetei de comentariu (tranziție sistem nou) */
.comment-announcement {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    margin: 0 0 12px 0;
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.05), rgba(23, 162, 184, 0.02));
    border: 1px solid rgba(23, 162, 184, 0.25);
    border-left: 3px solid #17a2b8;
    border-radius: 6px;
    color: #2a2e2e;
    font-size: 12.5px;
    line-height: 1.4;
}

.comment-announcement-icon {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
}

.comment-announcement-body { flex: 1; min-width: 0; }

.comment-announcement-body p {
    margin: 0 0 5px 0;
}

.comment-announcement-body p:last-child { margin-bottom: 0; }

.comment-announcement-body ul {
    margin: 0 0 5px 0;
    padding-left: 18px;
}

.comment-announcement-body ul li {
    margin-bottom: 1px;
}

.comment-announcement-sign {
    margin-top: 4px;
    color: #17a2b8;
    font-size: 12px;
}

@media screen and (max-width: 520px) {
    .comment-announcement { padding: 8px 10px; font-size: 12px; gap: 8px; }
    .comment-announcement-icon { font-size: 14px; }
}

/* Banner „comentarii noi" — sticky sus, apare când polling detectează noutăți */
.new-comments-banner {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    margin: 12px 0;
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.12), rgba(23, 162, 184, 0.04));
    border: 1px solid rgba(23, 162, 184, 0.45);
    border-radius: 8px;
    color: #17a2b8;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    position: sticky;
    top: 8px;
    z-index: 20;
    transition: background-color 0.15s, transform 0.1s;
    animation: newBannerSlide 0.3s ease-out;
}

.new-comments-banner:hover {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.18), rgba(23, 162, 184, 0.08));
}

.new-comments-banner:active { transform: scale(0.99); }

.new-comments-icon {
    font-size: 16px;
    animation: newBannerPulse 1.8s ease-in-out infinite;
}

.new-comments-cta {
    color: #138496;
    opacity: 0.85;
    font-weight: 400;
}

@keyframes newBannerSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes newBannerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Highlight subtil pentru comentariile tocmai apărute (la click pe banner) */
.comment-fresh {
    position: relative;
    background: rgba(23, 162, 184, 0.06) !important;
    border-radius: 4px;
    animation: freshHighlight 0.4s ease-out;
}

.comment-fresh::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: #17a2b8;
    border-radius: 0 3px 3px 0;
}

.comment-fresh-fade {
    transition: background-color 1.5s ease, border-color 1.5s ease;
    background: transparent !important;
}

.comment-fresh-fade::before {
    transition: opacity 1.5s ease;
    opacity: 0;
}

@keyframes freshHighlight {
    from { background: rgba(23, 162, 184, 0.22) !important; }
    to { background: rgba(23, 162, 184, 0.06) !important; }
}

/* Bara unde erau tab-urile (Add Predicții / Predicțiile mele / Top Predicții)
   — ascundem butoanele (render-ate de bundle.min.js) dar păstrăm container-ul
   ca delimitare vizuală între formular și lista de comentarii. */
.comment-tabs {
    display: block;
    padding: 0;
    margin: 18px 0;
    height: 1px;
    background: var(--border-color, #e1e4e8);
    border: none;
}

.comment-tabs > * {
    display: none !important;
}

.comment-tab {
    background: none;
    border: none;
    padding: 4px 2px;
    font-size: 14px;
    font-weight: 500;
    color: #687a86;
    cursor: pointer;
    position: relative;
    transition: color 0.15s;
}

.comment-tab:hover {
    color: #2a2e2e;
}

.comment-tab.active {
    color: #17a2b8;
}

.comment-tab.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -11px;
    height: 2px;
    background-color: #17a2b8;
}

/* Link extern (Old Forum) aliniat la dreapta — nu primește stare activă */
.comment-tab-link {
    margin-left: auto;
    text-decoration: none;
}

.comment-tab-link:hover {
    color: #17a2b8;
    text-decoration: none;
}

/* Comentarii */
.comments-container {
    margin-top: 16px;
}

.comment {
    position: relative;
    padding: 10px 4px;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    margin-bottom: 0;
    transition: background-color 0.2s;
}

.comment .comment-replies > .comment {
    padding: 8px 4px 4px;
}

.comment-options {
    position: absolute;
    top: 12px;
    right: 12px;
}

.comment-options-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #65676B;
}

.comment-options-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-width: 180px;
    display: none;
    z-index: 100;
}

.comment-options-menu.active {
    display: block;
}

.comment-options-item {
    padding: 8px 16px;
    color: #65676B;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.comment-options-item:hover {
    background-color: var(--hover-color);
}

.comment-options-item.delete {
    color: #dc3545;
}

/* Stilizare pentru răspunsuri */
.comment-replies {
    margin-left: 40px;
    margin-top: 10px;
    position: relative;
}

/* Limităm indentarea după nivelul 3 pe desktop (threadurile foarte adânci rămân
   la același indent; adăugăm un border stâng subtil ca să se vadă că-s nested). */
.comment-replies .comment-replies .comment-replies {
    margin-left: 16px;
    padding-left: 12px;
    border-left: 2px solid var(--border-color);
}

.comment-replies .comment-replies .comment-replies .comment-replies {
    margin-left: 0;
    padding-left: 12px;
}

.comment-reply {
    position: relative;
    margin-bottom: 5px;
}

.comment:hover {
    background-color: rgba(0,0,0,0.02);
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.comment-avatar {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    margin-right: 8px;
    object-fit: cover;
    flex-shrink: 0;
    font-size: 24px;
}

/* Avatarul fallback (div cu inițială) e rotund ca la Disqus.
   img.comment-avatar (badge-uri cu design) păstrează forma pătrată rotunjită. */
div.comment-avatar {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
}

.comment-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.user-info .username,
.user-info .reply-to-user {
    font-weight: 600;
    color: #17a2b8;
    font-size: 14px;
}

/* Badge-uri lângă username — cerculețe mici cu imagine */
.user-badges {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 4px;
    vertical-align: middle;
    margin-top: -2px;
}

.user-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    overflow: hidden;
    background: #f0f2f5;
    flex-shrink: 0;
    cursor: help;
}

.user-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-badge.user-badge-initial {
    background: #14a0e6;
    color: white;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0;
}

.user-info .moderator-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background-color: #e6f0ff;
    color: #4d8cf5;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.user-info svg {
    color: #65676b;
}

.date {
    color: #65676b;
    font-size: 12px;
    line-height: 1.3;
}

.comment-content {
    margin: 4px 0 0 60px;
    color: #2a2e2e;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    white-space: normal;
    word-wrap: break-word;
}

.comment-text {
    margin-bottom: 7px;
}

.show-more-container {
    margin-top: 8px;
    margin-bottom: 8px;
    text-align: center;
    /* display:block + width:100% forțează container-ul să iasă din orice DOM
       context stricat (ex. trunchiere la 1000 chars în mijlocul <div class="loto-comment-balls">
       a cărui închidere e tăiată, lăsând butonul într-un wrapper fără width). */
    display: block;
    width: 100%;
    clear: both;
}

.show-more-btn {
    background: none;
    border: none;
    color: #17a2b8;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    font-weight: 500;
    transition: color 0.2s;
    /* white-space nowrap: dacă parent-ul ajunge narrow din cauza trunchierii,
       textul „Afișează mai mult" rămâne pe 1 linie (poate overflow, dar lizibil). */
    white-space: nowrap;
}

/* Predicții loto — ascundem butonul „Afișează mai mult" și arătăm textul complet
   pentru comentariile care conțin bile. Bundle-ul trunchează la 1000 chars orice
   content (inclusiv HTML generat intern), ceea ce strică blocul de bile. În loc
   să ne luptăm cu trunchierea, forțăm `.full` vizibil și ascundem `.short` + buton. */
.comment:has(.loto-comment-balls) .comment-text.short,
.comment:has(.loto-comment-balls) .show-more-container {
    display: none !important;
}

.comment:has(.loto-comment-balls) .comment-text.full {
    display: block !important;
}

.show-more-btn:hover {
    color: #138496;
    text-decoration: underline;
}

.comment-text.short {
    position: relative;
}

.comment-text.full {
    display: none;
}

.comment-image-container {
    margin: 10px 0;
    display: inline-block;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.comment-image-container.hidden-image {
    display: none !important;
}

.comment-content .comment-image {
    max-width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    max-height: 300px;
    object-fit: cover;
    transition: transform 0.2s;
    border-radius: 8px;
}

.comment-image-container:hover .comment-image {
    transform: scale(1.05);
}

.image-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.image-preview-modal img {
    max-width: 90%;
    max-height: 90vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    cursor: default;
    animation: zoomIn 0.3s ease-out forwards;
}

@keyframes zoomIn {
    from { transform: translate(-50%, -50%) scale(0.95); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.image-preview-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 24px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.image-preview-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.comment-content .comment-image:hover {
    transform: scale(1.02);
}

.comment-content br {
    display: block;
    margin: 8px 0;
}

.comment-content blockquote {
    margin: 10px 0;
    padding: 10px 20px;
    border-left: 4px solid var(--primary-color);
    background: #f8f9fa;
    color: #444;
    border-radius: 4px;
    font-style: italic;
}

.comment-content code {
    background: #f6f8fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
    color: #444;
    white-space: normal;
}

.comment-content ul {
    margin: 10px 0;
    padding-left: 20px;
    list-style-type: disc;
}

.comment-content li {
    margin: 5px 0;
    padding-left: 8px;
    display: list-item;
}

.comment-content strong {
    font-weight: 600;
    color: inherit;
}

.comment-content em {
    font-style: italic;
    color: inherit;
}

.deleted-comment {
    color: #6c757d;
    font-style: italic;
}

.comment-actions {
    margin-left: 60px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 6px;
}

.action-btn {
    background: none;
    border: none;
    color: #86888d;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 0;
    border-radius: 3px;
    transition: color 0.15s;
    line-height: 1;
}

.action-btn:hover {
    background-color: transparent;
    color: #17a2b8;
    text-decoration: underline;
}

.action-btn.vote-btn {
    color: #65676B;
}

.action-btn.vote-btn:hover {
    color: #17a2b8;
}

.action-btn.vote-btn.active {
    color: #17a2b8;
}

.action-btn svg {
    width: 16px;
    height: 16px;
}

.action-btn svg {
    width: 14px;
    height: 14px;
}

/* Formular de răspuns */
.reply-form {
    margin: 16px 0 0 16px;
}

.reply-actions {
    display: flex;
    gap: 8px;
}

.cancel-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 6px 18px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 13px;
    height: 32px;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-btn:hover {
    background-color: var(--hover-color);
}

.reply-actions {
    display: flex;
    gap: 8px;
}

/* Stare fără comentarii */
.no-comments {
    text-align: center;
    padding: 48px 24px;
    color: #687a86;
    font-size: 15px;
    background: transparent;
    border-radius: 8px;
    margin: 24px 0;
}

.no-comments-icon {
    font-size: 32px;
    margin-bottom: 16px;
    color: #a1a1a1;
}

/* Mesaj de eroare */
.error {
    background-color: #fff3f3;
    color: #e53935;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Animații */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.comment {
    animation: fadeIn 0.3s ease-out;
}

.load-more-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 20px 0 !important;
    padding: 14px 20px !important;
    background: transparent !important;
    border: 1px solid #17a2b8 !important;
    border-radius: 10px !important;
    color: #17a2b8 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: background-color 0.2s, color 0.2s !important;
    text-align: center !important;
}

.load-more-btn:hover {
    background-color: #17a2b8 !important;
    border-color: #17a2b8 !important;
    color: #2a2e2e !important;
}

.load-more-btn svg {
    transition: transform 0.2s;
}

.load-more-btn:hover svg {
    transform: scale(1.1);
}

.image-preview-container {
    margin: 10px 0;
    padding: 10px;
    background: var(--bg-color);
    border-radius: 8px;
}

.image-preview {
    position: relative;
    display: inline-block;
    max-width: 200px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.image-preview img {
    display: block;
    max-width: 100%;
    height: auto;
}

.remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.remove-image:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Media Queries pentru Mobile */
@media screen and (max-width: 768px) {
    .comment-system {
        padding: 0;
    }

    .comments-header h2 {
        font-size: 18px;
    }

    .comments-header h2::before {
        width: 36px;
        height: 36px;
    }

    .comment {
        padding: 10px;
    }

    .comment-avatar {
        width: 52px;
        height: 52px;
    }

    .comment-content {
        margin-left: 0 !important;
        font-size: 14px;
    }

    .comment-actions {
        margin-left: 0 !important;
    }

    .formatting-help {
        overflow-x: auto;
        max-width: 200px;
    }

    .comment-replies {
        margin-left: 20px;
        padding-left: 10px;
        border-left: 2px solid var(--border-color);
    }

    /* După nivelul 2, nu mai indentăm — doar un border stâng mic ca indicator */
    .comment-replies .comment-replies {
        margin-left: 0;
        padding-left: 10px;
    }

    .comment-replies .comment-replies .comment-replies,
    .comment-replies .comment-replies .comment-replies .comment-replies {
        margin-left: 0;
        padding-left: 10px;
    }

    .reply-form {
        margin-left: 20px;
    }

    .form-actions {
        flex-direction: column;
        gap: 8px;
    }

    .reply-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .comment-reply::before {
        left: -4px;
        width: 4px;
    }
}

@media screen and (max-width: 480px) {
    .comment-system {
        padding: 0;
    }

    /* Pe mobil ascundem avatarul de lângă caseta de scris pentru a câștiga lățime */
    .comment-form-avatar {
        display: none;
    }

    .comment {
        padding: 8px;
    }

    .comment-avatar {
        width: 52px;
        height: 52px;
    }

    .comment-content {
        margin-left: 0 !important;
        font-size: 14px;
    }

    .comment-actions {
        margin-left: 0 !important;
    }

    .comment-replies {
        margin-left: 12px;
        padding-left: 8px;
        border-left: 2px solid var(--border-color);
    }

    /* Pe ecrane foarte mici — aplatizăm TOT după primul nivel de reply */
    .comment-replies .comment-replies,
    .comment-replies .comment-replies .comment-replies,
    .comment-replies .comment-replies .comment-replies .comment-replies {
        margin-left: 0;
        padding-left: 8px;
    }

    .reply-form {
        margin-left: 12px;
    }

    .action-btn {
        font-size: 12px;
        padding: 3px 6px;
    }

    .action-btn svg {
        width: 12px;
        height: 12px;
    }
}

.login-prompt {
    text-align: center;
    padding: 24px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #687a86;
}

.login-prompt p {
    margin: 0 0 16px 0;
    font-size: 15px;
}

.login-prompt .auth-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.login-prompt .auth-btn:hover {
    background-color: #3b7de2;
}

/* Stiluri pentru modal raportare */
.report-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.report-modal-content {
    background: white;
    padding: 24px;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    position: relative;
    margin: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.report-modal h3 {
    margin: 0 0 16px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.report-reason {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #333;
    box-sizing: border-box;
}

.report-reason:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(77, 140, 245, 0.2);
}

.report-details {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    margin-bottom: 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    font-size: 14px;
    font-family: inherit;
    background: white;
    color: #333;
    box-sizing: border-box;
}

.report-details:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(77, 140, 245, 0.2);
}

.report-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
}

.cancel-report,
.submit-report {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 80px;
}

.cancel-report {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.cancel-report:hover {
    background: #e9ecef;
    color: #495057;
    border-color: #adb5bd;
}

.submit-report {
    background: #dc3545 !important;
    color: white !important;
    border: 1px solid #dc3545 !important;
}

.submit-report:hover:not(:disabled) {
    background: #c82333 !important;
    border-color: #bd2130 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.submit-report:disabled {
    background: #6c757d !important;
    border-color: #6c757d !important;
    cursor: not-allowed;
    opacity: 0.65;
    transform: none;
    box-shadow: none;
}

/* =========================================================
   LOTO PREDICTIONS — toggle button + preview live + bile în comentarii
   Stilul bilelor e aliniat cu cel din profil (u.php) pentru consistență.
   ========================================================= */

/* Buton „Mod predicție" lângă Submit */
.loto-mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #ffffff;
    color: #495057;
    border: 1px solid #ced4da;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s;
    margin-right: 8px;
}

.loto-mode-toggle:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.loto-mode-toggle-active {
    background: #007bff;
    color: #ffffff;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.18);
}

.loto-mode-toggle-active:hover {
    background: #0069d9;
    border-color: #0062cc;
}

.loto-mode-icon {
    flex-shrink: 0;
    display: inline-block;
}
.loto-mode-label { line-height: 1; }

/* Când butonul e activ, bila-icon are un glow subtil pentru confirmare vizuală */
.loto-mode-toggle-active .loto-mode-icon circle {
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.7));
}

/* Container preview live — sub textarea */
.loto-preview {
    margin-top: 8px;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 13px;
}

.loto-preview-summary {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 500;
}

.loto-preview-empty {
    color: #6c757d;
    font-style: italic;
    font-size: 12px;
    text-align: center;
    padding: 8px 0;
}

.loto-preview-warn {
    color: #dc3545 !important;
    font-style: normal !important;
    font-weight: 500;
}

.loto-ball-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin: 4px 0;
}

.loto-ball-row-preview {
    padding: 4px 0;
    border-top: 1px dashed #e9ecef;
}

.loto-ball-row-preview:first-of-type {
    border-top: none;
}

.loto-group-label {
    font-size: 11px;
    color: #6c757d;
    font-weight: 600;
    margin-right: 6px;
    min-width: 50px;
}

/* Bila în sine — atât în preview cât și în comentariul postat */
.lotto-ball {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    background-color: #ffffff;
    color: #333;
    border: 1px solid #007bff; /* albastru = predicție (neverificată) */
    font-weight: bold;
    font-size: 13px;
    user-select: none;
}

/* Bilă câștigătoare — verde (după ce cron-ul a validat tragerea) */
.lotto-ball.lotto-ball-win {
    border-color: #28a745;
    border-width: 2px;
    line-height: 26px;
}

/* Bilă necâștigătoare — roșu */
.lotto-ball.lotto-ball-lose {
    border-color: #dc3545;
    border-width: 2px;
    line-height: 26px;
}

/* Wrapper extern — singurul <div> în blocul de bile. Cuprinde wrapper-ul de
   imagini (abuzăm clasa `comment-image-container` ca bundle.min.js să ignore
   acest block la calculul lungimii → nu apare butonul „Afișează mai mult"). */
.loto-comment-wrapper {
    display: block;
    margin: 8px 0;
}

/* Container bile (acum span, necesită display block explicit) */
.loto-comment-balls {
    display: block;
    padding: 8px 10px;
    background: rgba(0, 123, 255, 0.04);
    border-left: 3px solid #007bff;
    border-radius: 0 4px 4px 0;
}

.loto-comment-balls .loto-ball-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin: 2px 0;
}

/* Label „Predicție adăugată la..." — mic, DEASUPRA bilelor */
.loto-posted-at {
    display: inline-block;
    font-size: 11px;
    color: #6c757d;
    margin-bottom: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.03);
}

.loto-posted-at strong {
    color: #495057;
    font-weight: 600;
}

/* Label „Pentru tragerea de la DD.MM.YYYY ora HH:MM" — mic, sub bile */
.loto-draw-target {
    font-size: 11px;
    color: #6c757d;
    margin-top: 4px;
    padding: 3px 10px;
    display: inline-block;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.03);
}

.loto-draw-target strong {
    color: #495057;
    font-weight: 600;
}

/* Când tragerea a fost validată (cron a rulat) — label mai strâns vizual */
.loto-draw-target.loto-draw-target-validated {
    background: rgba(40, 167, 69, 0.08);
    color: #1e7e34;
}

.loto-draw-target.loto-draw-target-validated strong {
    color: #155724;
}

/* Badge „Sistem N/M" — discret, distinct de bile; apare lângă grupul afectat */
.loto-system-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    margin-left: 6px;
    border-radius: 999px;
    background: rgba(40, 167, 69, 0.12);
    color: #1e7e34;
    border: 1px solid rgba(40, 167, 69, 0.35);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: help;
    line-height: 1.3;
}

.loto-system-badge.loto-system-warn {
    background: rgba(220, 53, 69, 0.08);
    color: #b02a37;
    border-color: rgba(220, 53, 69, 0.35);
}

.loto-system-note {
    margin-left: 6px;
    font-size: 11px;
    color: #b02a37;
    font-style: italic;
}

@media screen and (max-width: 520px) {
    .loto-system-badge {
        font-size: 11px;
        padding: 2px 7px;
    }
    .loto-system-note {
        display: block;
        margin-left: 0;
        margin-top: 4px;
    }
}

/* Responsive — bile mai mici pe mobil */
@media screen and (max-width: 520px) {
    .lotto-ball {
        width: 26px;
        height: 26px;
        line-height: 24px;
        font-size: 12px;
    }
    /* Bilele validate au border 2px (vs 1px la pending). Pe mobil, height-ul
       e 26px, deci line-height-ul corect = 26 - 2*2 = 22px. Fără override-ul
       ăsta, numărul moștenește line-height-ul de pe desktop (26px) și apare
       descentrat în sus în interiorul bilei. */
    .lotto-ball.lotto-ball-win,
    .lotto-ball.lotto-ball-lose {
        line-height: 22px;
    }
    /* Butonul "Mod predicție" — păstrăm textul vizibil și pe mobil, dar
       compactăm padding + font ca să nu împingem submit-ul de pe rând.
       `white-space: nowrap` garantează că textul nu se rupe pe 2 rânduri
       dacă butonul nimerește într-un flex cu puțin spațiu. */
    .loto-mode-toggle {
        padding: 5px 8px;
        font-size: 11px;
        gap: 4px;
        white-space: nowrap;
    }
    .loto-mode-icon {
        width: 13px;
        height: 13px;
    }
    .loto-mode-label {
        line-height: 1;
        /* Fără display: none — textul rămâne vizibil */
    }
}

/* Foarte îngust — sub 360px — dacă butonul + submit-ul nu încap pe un rând,
   le stack-uim vertical (cancel-btn + submit-btn sub toggle). Preferă să
   strice UX-ul decât să taie textul. */
@media screen and (max-width: 360px) {
    .reply-actions {
        flex-wrap: wrap;
        row-gap: 6px;
    }
    .loto-mode-toggle {
        padding: 4px 7px;
        font-size: 11px;
    }
}

/* =====================================================================
   Highlight la #comment-X din URL (deep-link din notificări header)
   Două straturi:
     1. .comment-flash — animație 2.5s la aterizare (galben pulsatoriu)
     2. .comment-target — fundal verde discret PERSISTENT, până userul
        navighează în altă parte (hashchange fără #comment-X)
   ===================================================================== */
.comment.comment-flash {
    animation: lotoCommentFlash 2.5s ease-out;
}
@keyframes lotoCommentFlash {
    0%   { background-color: rgba(255, 235, 59, 0.55); box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.45); }
    60%  { background-color: rgba(255, 235, 59, 0.25); box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.20); }
    100% { background-color: transparent; box-shadow: none; }
}
.comment.comment-target {
    background-color: rgba(40, 167, 69, 0.09);
    border-left: 4px solid #28a745;
    padding-left: 10px;
    border-radius: 0 4px 4px 0;
    transition: background-color .25s ease, border-left-color .25s ease;
}
/* Flash-ul are prioritate vizuală pe primele 2.5s (animație background-color
   de pe el suprascrie temporar verde-ul; la final flash-ul dispare iar verde
   rămâne). border-left rămâne vizibil tot timpul ca ancoră. */

/* =====================================================================
   Repost automat al predicțiilor — UI elements
   ===================================================================== */

/* Selectorul „Postează pe N extrageri" — apare lângă toggle când Mod predicție
   e activ. Style consistent cu .loto-mode-toggle (border, font, color). */
.loto-repost-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
    color: #374151;
    font-size: 12px;
    line-height: 1.2;
    cursor: default;
    user-select: none;
}

.loto-repost-label {
    font-weight: 500;
}

.loto-repost-count {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 12px;
    background: #fff;
    color: #1f2937;
    cursor: pointer;
}

.loto-repost-count:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
}

/* Footer afișat sub bile pentru comentariile postate AUTOMAT de cron
   (= reposturi). Util pentru transparență față de ceilalți useri. */
.loto-repost-footer {
    margin-top: 8px;
    padding: 6px 10px;
    background: #fef3c7;
    color: #78350f;
    font-size: 12px;
    font-style: italic;
    border-left: 3px solid #f59e0b;
    border-radius: 3px;
}

/* Buton „Oprește reposturile" injectat de loto_predictions.js pe comentariile
   owner-ului curent care au schedule activ. */
.loto-repost-cancel-btn {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    padding: 5px 10px;
    background: #fff;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.loto-repost-cancel-btn:hover {
    background: #fef2f2;
    border-color: #f87171;
}

.loto-repost-cancel-btn:disabled {
    opacity: 0.5;
    cursor: wait;
}

@media screen and (max-width: 520px) {
    .loto-repost-wrap {
        padding: 3px 8px;
        font-size: 11px;
    }
    .loto-repost-count {
        font-size: 11px;
    }
    .loto-repost-footer {
        font-size: 11px;
        padding: 5px 8px;
    }
    .loto-repost-cancel-btn {
        font-size: 11px;
        padding: 4px 8px;
    }
}
/* ============================================================
 * BARA TAB-URI PENTRU FILTRARE PREDICȚII
 * ============================================================ */
.predictions-tabs-bar {
    display: flex;
    gap: 0;
    margin: 1px 0 0;
    border-bottom: 1px solid rgba(128, 128, 128, 0.25);
    align-items: stretch;
}
.predictions-tab {
    background: transparent;
    border: 0;
    padding: 0 14px 2px;
    font-size: 14px;
    color: #17a2b8;
    opacity: 0.6;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-weight: 600;
    font-family: inherit;
}
.predictions-tab:hover {
    opacity: 0.9;
}
.predictions-tab-active {
    opacity: 1;
    border-bottom-color: currentColor;
    font-weight: 600;
}
.predictions-tab-count {
    margin-left: 4px;
    opacity: 0.7;
    font-weight: 400;
    font-size: 12px;
}
.predictions-tab-count:empty {
    display: none;
}

.predictions-empty,
.predictions-loading {
    text-align: center;
    padding: 20px 16px;
    font-size: 13px;
    opacity: 0.6;
}

/* În modul Predicții/Validate, butonul global „Încarcă mai multe" nu mai are
 * sens — el cere comentarii normale via loadMoreComments(). Îl ascundem cât
 * timp lista e filtrată; reapare automat la întoarcerea pe tab-ul Forum
 * (clasa .predictions-mode e scoasă atunci de predictions_tabs.js). */
.comments-container.predictions-mode ~ .load-more-btn {
    display: none;
}

/* Banner informativ deasupra zonei de comentarii — controlat din panel → Settings.
 * Stil neutru, vizibil dar nu invaziv. Suportă newline-uri prin pre-line.
 * Culorile sunt aplicate prin variante .comment-info-banner--{yellow|red|green}. */
.comment-info-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    margin: 0 0 12px;
    border-radius: 6px;
    border: 1px solid transparent;
    border-left-width: 4px;
    font-size: 14px;
    line-height: 1.5;
}
.comment-info-banner-icon {
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1.4;
}
.comment-info-banner-text {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    white-space: pre-line;
}

/* Variantă galbenă (info / atenție) — default */
.comment-info-banner--yellow {
    background: #fff8e1;
    border-color: #ffe082;
    border-left-color: #ffc107;
    color: #5d4037;
}
/* Variantă roșie (alertă / interdicție) */
.comment-info-banner--red {
    background: #ffebee;
    border-color: #ffcdd2;
    border-left-color: #d32f2f;
    color: #b71c1c;
}
/* Variantă verde (anunț pozitiv / succes) */
.comment-info-banner--green {
    background: #e8f5e9;
    border-color: #c8e6c9;
    border-left-color: #388e3c;
    color: #1b5e20;
}


@media screen and (max-width: 520px) {
    .predictions-tab {
        padding: 6px 10px 8px;
        font-size: 12px;
    }
}
