/* ============================================================
   Cinema Club — Comments CSS (v3.0)
============================================================ */

.comments-section {
    margin-top: 10px;
}

/* Header */
.comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.comments-title {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}
.comments-title i {
    color: #ffbd3c;
    font-size: 18px;
}

.comments-count {
    background: rgba(255,189,60,0.15);
    color: #ffbd3c;
    padding: 3px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: bold;
    min-width: 32px;
    text-align: center;
}

/* Form */
.comment-form-wrap {
    display: flex;
    gap: 14px;
    background: linear-gradient(135deg, #1a1a24, #16161f);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 24px;
}

.comment-form-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffbd3c, #e5a72b);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111;
    font-weight: bold;
    font-size: 18px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(255,189,60,0.3);
}
.comment-form-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.comment-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0,0,0,0.4);
    border: 1.5px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.8;
    resize: vertical;
    min-height: 80px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
}
.comment-input:focus {
    border-color: #ffbd3c;
    background: rgba(0,0,0,0.55);
    box-shadow: 0 0 0 3px rgba(255,189,60,0.12);
}
.comment-input::placeholder {
    color: #666;
}

.comment-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.spoiler-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255,71,87,0.1);
    border: 1px solid rgba(255,71,87,0.3);
    border-radius: 8px;
    font-size: 12px;
    color: #ff4757;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}
.spoiler-checkbox:hover {
    background: rgba(255,71,87,0.15);
}
.spoiler-checkbox input {
    accent-color: #ff4757;
    width: 15px;
    height: 15px;
    margin: 0;
    cursor: pointer;
}
.spoiler-checkbox i {
    font-size: 11px;
}

.comment-chars {
    font-size: 11.5px;
    color: #888;
    font-variant-numeric: tabular-nums;
}

.comment-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #ffbd3c, #e5a72b);
    border: none;
    border-radius: 10px;
    color: #111;
    font-family: inherit;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(255,189,60,0.3);
}
.comment-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(255,189,60,0.5);
}
.comment-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.comment-login-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 18px;
    background: rgba(52,152,219,0.08);
    border: 1px solid rgba(52,152,219,0.3);
    border-radius: 12px;
    font-size: 13px;
    color: #a8a8b3;
    margin-bottom: 24px;
    text-align: center;
    flex-wrap: wrap;
}
.comment-login-cta i {
    color: #5dade2;
}
.comment-login-cta a {
    color: #ffbd3c;
    font-weight: bold;
    text-decoration: none;
}
.comment-login-cta a:hover {
    text-decoration: underline;
}

/* List */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.comments-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 12px;
    color: #a8a8b3;
    font-size: 13px;
}

.comments-loading .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #ffbd3c;
    border-radius: 50%;
    animation: comment-spin 1s linear infinite;
}

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

.comments-empty {
    text-align: center;
    padding: 50px 20px;
    background: #16161f;
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: 16px;
    color: #a8a8b3;
}
.comments-empty .icon {
    font-size: 44px;
    opacity: 0.5;
    margin-bottom: 12px;
}
.comments-empty p {
    font-size: 13.5px;
    margin: 0;
    line-height: 1.8;
}

/* Comment Item */
.comment-item {
    background: linear-gradient(135deg, #1a1a24, #16161f);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 16px;
    transition: all 0.2s;
    position: relative;
}
.comment-item:hover {
    border-color: rgba(255,189,60,0.2);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.comment-item.is-reply {
    background: rgba(255,255,255,0.02);
    border-right: 3px solid rgba(255,189,60,0.3);
    margin-right: 52px;
    margin-top: 12px;
}

.comment-item-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffbd3c, #e5a72b);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111;
    font-weight: bold;
    font-size: 17px;
    overflow: hidden;
    flex-shrink: 0;
    text-decoration: none;
    border: 2px solid rgba(255,189,60,0.3);
}
.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.comment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.comment-author {
    font-size: 13.5px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.comment-author:hover {
    color: #ffbd3c;
}

.comment-crown {
    color: #ffbd3c;
    font-size: 12px;
}

.comment-verified {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #1d9bf0;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    flex-shrink: 0;
}

.comment-time {
    font-size: 11.5px;
    color: #888;
}

.comment-text {
    font-size: 13.5px;
    line-height: 1.9;
    color: #d0d0da;
    word-break: break-word;
    white-space: pre-wrap;
    margin-bottom: 10px;
}

/* Spoiler */
.spoiler-box {
    background: rgba(255,71,87,0.08);
    border: 1px dashed rgba(255,71,87,0.3);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 10px;
}
.spoiler-box:hover {
    border-color: #ff4757;
    background: rgba(255,71,87,0.12);
}
.spoiler-box-text {
    font-size: 13px;
    color: #ff4757;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Actions */
.comment-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.comment-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: transparent;
    border: none;
    color: #a8a8b3;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    border-radius: 7px;
    transition: all 0.15s;
}
.comment-action-btn:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}
.comment-action-btn.like-btn.liked {
    color: #ff4757;
}
.comment-action-btn.like-btn.liked i {
    font-weight: 900;
}
.comment-action-btn i {
    font-size: 13px;
}
.comment-action-btn.danger:hover {
    background: rgba(231,76,60,0.12);
    color: #ff7b6b;
}

/* Reply Form */
.reply-form-wrap {
    margin-top: 12px;
    display: none;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255,255,255,0.08);
}
.reply-form-wrap.show {
    display: flex;
}

.reply-form-input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(0,0,0,0.4);
    border: 1.5px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    outline: none;
    resize: vertical;
    min-height: 44px;
    line-height: 1.7;
    box-sizing: border-box;
}
.reply-form-input:focus {
    border-color: #ffbd3c;
}

.reply-form-btn {
    padding: 10px 18px;
    background: linear-gradient(135deg, #ffbd3c, #e5a72b);
    border: none;
    border-radius: 10px;
    color: #111;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: bold;
    cursor: pointer;
    align-self: flex-end;
    white-space: nowrap;
    transition: all 0.2s;
}
.reply-form-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255,189,60,0.4);
}
.reply-form-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Replies */
.comment-replies {
    margin-top: 14px;
    padding-right: 14px;
    border-right: 2px solid rgba(255,189,60,0.2);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Load More */
.comments-load-more-wrap {
    text-align: center;
    margin-top: 20px;
}

.comments-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: rgba(255,255,255,0.04);
    border: 1.5px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}
.comments-load-more-btn:hover:not(:disabled) {
    background: rgba(255,189,60,0.1);
    border-color: rgba(255,189,60,0.4);
    color: #ffbd3c;
    transform: translateY(-2px);
}
.comments-load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Toast */
.comment-toast {
    position: fixed;
    bottom: 24px;
    left: 24px;
    padding: 12px 18px;
    background: #1a1a25;
    border: 1px solid rgba(255,255,255,0.12);
    border-right: 3px solid #ffbd3c;
    border-radius: 10px;
    color: #fff;
    font-size: 13px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 9999;
    animation: comment-toast-in 0.3s ease;
    max-width: 340px;
}
.comment-toast.success { border-right-color: #2ecc71; }
.comment-toast.error { border-right-color: #e74c3c; }

@keyframes comment-toast-in {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Mobile */
@media (max-width: 768px) {
    .comment-form-wrap {
        padding: 12px;
        gap: 10px;
    }
    .comment-form-avatar {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }
    .comment-input {
        font-size: 13px;
        padding: 12px 14px;
    }
    .comment-form-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .comment-submit-btn {
        width: 100%;
        justify-content: center;
    }
    .comment-item {
        padding: 14px;
    }
    .comment-item.is-reply {
        margin-right: 32px;
    }
    .comment-avatar {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }
    .comment-text {
        font-size: 13px;
    }
    .comment-replies {
        padding-right: 10px;
    }
    .comments-title {
        font-size: 16px;
    }
}