.comments-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: transparent;
}

.comments-section.open,
.comments-section.expanded {
    max-height: 500px;
    overflow-y: auto;
}

.comments-section::-webkit-scrollbar {
    width: 6px;
}

.comments-section::-webkit-scrollbar-track {
    background: transparent;
}

.comments-section::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.comment-input-wrap {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: none;
}

.comment-input-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-input-box {
    flex: 1;
    display: flex;
    gap: 8px;
    align-items: center;
}

.comment-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 8px 14px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.comment-input:focus {
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.comment-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}


.comment-submit-btn {
    width: 32px;
    height: 32px;
    background: rgba(251, 191, 36, 0.15);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.comment-submit-btn:hover {
    background: rgba(251, 191, 36, 0.25);
    opacity: 1;
}

.comment-submit-btn svg {
    width: 16px;
    height: 16px;
    stroke: #fbbf24;
    stroke-width: 2;
    fill: none;
}

.comments-list {
    padding: 8px 0;
}

.comments-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    padding: 24px 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

.comments-empty svg {
    width: 32px;
    height: 32px;
    stroke: rgba(255, 255, 255, 0.25);
    stroke-width: 1.5;
    fill: none;
}

.comment {
    padding: 10px 14px;
    transition: background 0.15s ease;
}

.comment:hover {
    background: rgba(255, 255, 255, 0.02);
}

.comment-main {
    display: flex;
    gap: 10px;
}

.comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.comment-author {
    font-size: 12px;
    font-weight: 700;
    color: #fbbf24;
    text-decoration: none;
}

.comment-author:hover {
    color: #fcd34d;
}

.comment-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.comment-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
    word-wrap: break-word;
}


.comment-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.comment-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
}

.comment-action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    transform: scale(1.02);
}

.comment-action-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.comment-action-btn.liked {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
    color: #ef4444;
}

.comment-action-btn.liked svg {
    fill: #ef4444;
    stroke: #ef4444;
}

.comment-action-btn.liked:hover {
    background: rgba(239, 68, 68, 0.2);
}

.comment-action-btn.delete-btn {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: rgba(239, 68, 68, 0.8);
}

.comment-action-btn.delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.comment-action-btn.delete-btn.confirming {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
    animation: pulse-confirm 0.8s ease infinite;
}

.comment-action-btn.delete-btn.confirming:hover {
    background: rgba(251, 191, 36, 0.25);
    color: #fbbf24;
}

@keyframes pulse-confirm {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.reply-input-wrap {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    margin-left: 38px;
    padding-right: 10px;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.reply-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 8px 14px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.reply-input:focus {
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(255, 255, 255, 0.1);
}

.reply-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.reply-submit-btn {
    width: 32px;
    height: 32px;
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.reply-submit-btn:hover {
    background: rgba(251, 191, 36, 0.35);
    transform: scale(1.05);
}

.reply-submit-btn svg {
    width: 14px;
    height: 14px;
    stroke: #fbbf24;
    stroke-width: 2;
    fill: none;
}

.comment-replies {
    margin-left: 38px;
    margin-top: 8px;
    border-left: 2px solid rgba(255, 255, 255, 0.08);
    padding-left: 10px;
}

.comment-replies .comment {
    padding: 8px 0;
}

.comment-replies .comment-avatar {
    width: 24px;
    height: 24px;
}

.comments-loading {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

.comments-loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(251, 191, 36, 0.3);
    border-top-color: #fbbf24;
    border-radius: 50%;
    margin-left: 8px;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.replying-to {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    margin-left: 4px;
}

.replying-to a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
}

.replying-to a:hover {
    color: #93c5fd;
    text-decoration: underline;
}


.comment-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.comment-badge svg {
    width: 12px;
    height: 12px;
}

.comment-badge.owner {
    color: #fbbf24;
}

.comment-badge.admin {
    color: #60a5fa;
}

.comment-badge.yt {
    color: #ef4444;
}
