: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: #ffffff;
    color: var(--text-color);
    line-height: 1.5;
}

/* Header */
.comments-header {
    padding: 0px;
    margin-bottom: 2px;
}

.comments-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.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: 8px;
    color: #687a86;
}

.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: 1px solid #e1e4e8;
    padding: 6px 12px;
    border-radius: 6px;
    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: #f8f9fa;
    border-color: #17a2b8;
}

.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 */
.comment-form {
    background: white;
   
    border-radius: 8px;
    margin: 0px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.comment-form:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(77,140,245,0.1);
}

.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: 80px;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    resize: vertical;
    color: var(--text-color);
    box-sizing: border-box;
    background: transparent;
}

.comment-input:focus {
    outline: none;
}

.comment-input::placeholder {
    color: #8b949e;
}

.comment-form-footer {
    padding: 8px 16px;
    border-top: 1px solid var(--border-color);
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.formatting-help {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.format-btn {
    background: none;
    border: none;
    padding: 4px;
    border-radius: 4px;
    color: #6e7781;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.format-btn:hover {
    background: var(--primary-color);
    color: var(--primary-color);
    color: white;
}

.submit-btn {
    background-color: #e0e0e0;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    height: 36px;
    display: flex;
    align-items: center;
}

.submit-btn:hover {
    background-color: #4d8cf5;
}

.submit-btn:disabled {
    background-color: #e0e0e0 !important;
    cursor: not-allowed;
    opacity: 0.6;
}

.comment-input:valid ~ .comment-form-footer .submit-btn {
    background-color: #4d8cf5;
}

/* Comentarii */
.comments-container {
    margin-top: 24px;
}

.comment {
    position: relative;
    padding: 2px;
    border-radius: 8px;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    margin-bottom: 5px;
    transition: background-color 0.2s;
}

.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;
}

.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;
}

.comment-meta {
    flex: 1;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.user-info .username,
.user-info .reply-to-user {
    font-weight: 600;
    color: #17a2b8;
    font-size: 15px;
}

.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: 13px;
}

.comment-content {
    margin: 5px 0 0 48px;
    color: #2a2e2e;
    font-size: 15px;
    line-height: 1.5;
    white-space: normal;
    word-wrap: break-word;
}

.comment-text {
    margin-bottom: 7px;
}

.show-more-container {
    margin-top: 8px;
    margin-bottom: 8px;
    text-align: center;
}

.show-more-btn {
    background: none;
    border: none;
    color: #17a2b8;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    font-weight: 500;
    transition: color 0.2s;
}

.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: 48px;
    display: flex;
    gap: 2px;
    margin-top: 8px;
}

.action-btn {
    background: none;
    border: none;
    color: #86888d;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
}

.action-btn:hover {
    background-color: #f2f2f2;
    color: #17a2b8;
}

.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: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-btn:hover {
    background-color: var(--hover-color);
}

/* 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;
    align-items: center;
    gap: 8px;
    margin: 24px auto;
    padding: 12px 24px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.load-more-btn:hover {
    background: var(--hover-color);
    border-color: var(--primary-color);
}

.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: 30px;
    }

    .reply-form {
        margin-left: 30px;
    }

    .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;
    }

    .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: 15px;
        padding-left: 10px;
        border-left: 2px solid #e1e4e8;
    }

    .reply-form {
        margin-left: 15px;
    }

    .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;
}