/* Main Comments — Modern Dark Glassmorphism Theme */
.main-comments-container {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(20, 20, 25, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.main-comments-container *,
.main-comments-container *::before,
.main-comments-container *::after {
    box-sizing: border-box;
}

.mc-comments-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Comment Form */
.mc-comment-form {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 3rem;
    margin-top: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.mc-comment-form:focus-within {
    border-color: #7000ff;
    box-shadow: 0 0 20px rgba(112, 0, 255, 0.2);
}

.mc-reply-to-indicator {
    display: none;
    background: rgba(112, 0, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    color: #b388ff;
    font-size: 0.9rem;
    align-items: center;
    justify-content: space-between;
}

.mc-comment-form input:not([type="checkbox"]),
.mc-comment-form textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.mc-comment-form input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
    accent-color: #7000ff;
    width: 18px;
    height: 18px;
}

.mc-comment-form input:focus,
.mc-comment-form textarea:focus {
    border-color: #7000ff;
}

.mc-comment-form textarea {
    min-height: 100px;
    resize: vertical;
}

.mc-btn-submit-comment {
    background: linear-gradient(135deg, #7000ff 0%, #4a00e0 100%);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    float: right;
    font-size: 1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.mc-btn-submit-comment:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(112, 0, 255, 0.4);
}

.mc-btn-submit-comment:active {
    transform: translateY(0);
}

.mc-comment-form::after {
    content: "";
    display: table;
    clear: both;
}

/* Comments List */
.mc-comment-item {
    margin-bottom: 1.5rem;
}

.mc-comment-card {
    background: rgba(30, 30, 35, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    color: #e0e0e0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.mc-comment-vote-bar {
    background: rgba(0, 0, 0, 0.3);
    width: 40px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    border-radius: 10px;
    padding: 0.5rem 0;
    flex-shrink: 0;
    border: 1px solid rgba(112, 0, 255, 0.1);
}

.mc-vote-btn {
    background: none;
    border: none;
    color: #c5c6ef;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.mc-vote-btn:hover {
    color: #5357b6;
}

.mc-comment-score {
    color: #5357b6;
    font-weight: 700;
    font-size: 1rem;
}

.mc-comment-main {
    flex-grow: 1;
}

.mc-comment-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.mc-comment-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mc-comment-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #333;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.mc-comment-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
}

.mc-comment-details-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mc-comment-author {
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}

.mc-comment-author:hover {
    color: #b06bff;
}

.mc-comment-date {
    font-size: 0.9rem;
    color: #888;
}

.mc-comment-scroll-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.mc-comment-scroll-link:hover {
    color: #b06bff;
}

.mc-comment-text {
    line-height: 1.7;
    color: #ccc;
    font-size: 1rem;
    background: none;
    padding: 0;
}

.mc-mention {
    color: #5357b6;
    font-weight: 700;
}

.mc-reply-action-link {
    background: none;
    border: none;
    color: #5357b6;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    transition: opacity 0.2s;
}

.mc-reply-action-link:hover {
    opacity: 0.5;
}

.mc-reply-icon {
    font-size: 1.2rem;
}

/* Nesting - Indented with vertical guide */
.mc-replies-list {
    margin-left: 2.5rem;
    margin-top: 1.5rem;
    padding-left: 2.5rem;
    border-left: 2px solid rgba(255, 255, 255, 0.05);
}

.mc-replies-list .mc-comment-card {
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .mc-comment-card {
        flex-direction: column-reverse;
        padding: 1rem;
        position: relative;
    }

    .mc-reply-action-link {
        position: absolute;
        bottom: 1.3rem;
        left: calc(100px + 1.5rem);
        z-index: 5;
    }

    .mc-comment-vote-bar {
        flex-direction: row;
        width: 100px;
        height: 40px;
        padding: 0 0.5rem;
    }

    .mc-replies-list {
        margin-left: 1rem;
        padding-left: 1rem;
    }

    .mc-comment-user {
        align-items: flex-start;
    }

    .mc-comment-avatar {
        width: 56px;
        height: 56px;
    }

    .mc-comment-details-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .mc-pin-badge,
    .mc-pending-badge {
        margin-left: 0;
    }
}

/* Pagination */
.mc-comments-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.mc-page-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.mc-page-btn.active,
.mc-page-btn:hover {
    background: #7000ff;
    border-color: #7000ff;
}

/* Toasts */
#mc-comment-toasts {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.mc-toast {
    pointer-events: auto;
    background: rgba(20, 20, 25, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(112, 0, 255, 0.4);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 5px;
    margin-top: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    animation: mcSlideUp 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    min-width: 320px;
    justify-content: center;
}

.mc-toast.success {
    background: rgba(46, 204, 113, 0.95);
    border-color: #2ecc71;
}

.mc-toast.error {
    background: rgba(231, 76, 60, 0.95);
    border-color: #e74c3c;
}

@keyframes mcSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Pending Label */
.mc-pending-badge {
    display: inline-block;
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 0.5rem;
    text-transform: uppercase;
    font-weight: 700;
}

/* Pinned Label */
.mc-pin-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(112, 0, 255, 0.2);
    color: #b06bff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    border: 1px solid rgba(112, 0, 255, 0.3);
}

.mc-form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0;
}

.mc-comment-notify-label {
    white-space: nowrap;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.mc-btn-reply {
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    color: #b388ff;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.mc-btn-reply:hover {
    background: rgba(255,255,255,0.1);
}

@media (max-width: 600px) {
    .mc-form-row {
        flex-direction: column;
        gap: 0;
    }

    .mc-comment-notify-label {
        white-space: normal;
        line-height: 1.3;
        align-items: flex-start !important;
    }

    .mc-comment-notify-label input {
        margin-top: 3px !important;
    }

    .main-comments-container {
        padding: 1rem;
        border-radius: 12px;
    }
}

/* Latest Comments Shortcode */
.mc-latest-comments {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.mc-latest-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(112, 0, 255, 0.5);
    display: inline-block;
    letter-spacing: -0.02em;
}

.mc-latest-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s, border-color 0.2s;
    text-decoration: none;
}

.mc-latest-item:hover {
    transform: translateX(5px);
    border-color: rgba(112, 0, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.mc-latest-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mc-latest-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mc-latest-author {
    font-weight: 700;
    color: #fff;
    font-size: 1.05rem;
}

.mc-latest-text {
    color: #aaa;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Stats Card Shortcode */
.mc-stats-card.dark-style {
    background: rgba(30, 30, 35, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;
    color: #e0e0e0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mc-stats-card.dark-style:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(112, 0, 255, 0.15);
    border-color: rgba(112, 0, 255, 0.3);
}

.mc-stats-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}

.mc-stats-item {
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mc-stats-divider {
    color: rgba(255, 255, 255, 0.2);
    font-weight: 300;
}

.mc-stats-latest-comment {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.8rem;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s ease;
    border: 1px solid transparent;
}

.mc-stats-latest-comment:hover {
    background: rgba(112, 0, 255, 0.1);
    border-color: rgba(112, 0, 255, 0.2);
}

.mc-stats-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.mc-stats-body {
    display: inline-block;
    overflow: hidden;
    line-height: 1.4;
}

.mc-stats-author {
    font-weight: 700;
    color: #b06bff;
    font-size: 0.9rem;
    margin-right: 0.3rem;
}

.mc-stats-text {
    color: #aaa;
    font-size: 0.9rem;
    word-break: break-word;
}

@media (max-width: 600px) {
    .mc-stats-header {
        font-size: 0.95rem;
        gap: 0.5rem;
    }
    .mc-stats-item {
        font-size: 0.95rem;
    }
    .mc-stats-author, .mc-stats-text {
        font-size: 0.85rem;
    }
    .mc-stats-avatar {
        width: 32px;
        height: 32px;
    }
}
