/* =========================================================
   COMMENT SYSTEM WRAPPER
========================================================= */
#miraCommentSystem {
    font-family: Arial, sans-serif;
    position: relative;
    z-index: 2147483647;
}
#miraCommentSystem * {
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}
/* =========================================================
   COMMENT BUTTON
========================================================= */
#miraCommentSystem .commentTrigger {
    width: fit-content;
    margin: 20px;
    padding: 12px 18px;
    background: #1e1e1e;
    color: #fff;
    border-radius: 12px;
    cursor: pointer;
    transition: .25s;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
#miraCommentSystem .commentTrigger:hover {
    background: #2c2c2c;
}
/* =========================================================
   MODAL
========================================================= */
#miraCommentSystem .commentModal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    z-index: 2147483647;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
    padding: 20px;
}
#miraCommentSystem .commentModal.show {
    opacity: 1;
    visibility: visible;
}
/* =========================================================
   MODAL CONTENT
========================================================= */
#miraCommentSystem .commentModalContent {
    width: min(900px, 95%);
    max-height: 85vh;
    overflow-y: auto;
    background: #151515;
    border-radius: 16px;
    padding: 24px;
    position: relative;
    transform: scale(.92);
    transition: transform .25s ease;
    -webkit-overflow-scrolling: touch;
}
#miraCommentSystem .commentModal.show .commentModalContent {
    transform: scale(1);
}
/* =========================================================
   CLOSE BUTTON
========================================================= */
#miraCommentSystem .commentClose {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
    z-index: 10;
}
#miraCommentSystem .commentClose:hover {
    color: #fff;
}
/* =========================================================
   TITLE
========================================================= */
#miraCommentSystem .commentTitle {
    font-size: 22px;
    margin-bottom: 24px;
    color: #fff;
    font-weight: bold;
}
/* =========================================================
   ADD COMMENT FORM
========================================================= */
#miraCommentSystem #cadd {
    margin-bottom: 25px;
}
#miraCommentSystem #cadd input,
#miraCommentSystem #cadd textarea {
    width: 100%;
    background: #1d1d1d;
    border: 1px solid #333;
    color: #fff;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 10px;
    outline: none;
    resize: none;
    font-size: 14px;
    line-height: 1.4;
    transition: border-color 0.2s;
}
#miraCommentSystem #cadd input:focus,
#miraCommentSystem #cadd textarea:focus {
    border-color: #FFD700;
}
#miraCommentSystem #cadd textarea {
    height: 90px;
}
#miraCommentSystem #cadd button {
    border: none;
    background: #FFD700;
    color: #000;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: background 0.2s;
}
#miraCommentSystem #cadd button:hover {
    background: #e5c100;
}
/* =========================================================
   COMMENT WRAP
========================================================= */
#miraCommentSystem #cwrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
/* =========================================================
   COMMENT BOX CARD (DESKTOP DEFAULT)
========================================================= */
#miraCommentSystem .crow {
    background: #1c1c1c;
    border-radius: 14px;
    padding: 16px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    
    position:relative;
}
/* RECTIFIED NESTING: Set margin-left to 0px or small indentation since DOM is already nested */
#miraCommentSystem .level1 {
    background: #1b1b1b;
    margin-left: 15px;       /* Tiny nudge relative to parent container boundary */
    margin-top: 14px;        /* Clean vertical slide gap separating parent/child */
    border-left: 3px solid #333;
}
#miraCommentSystem .level2 {
    background: #202020;
    margin-left: 0px !important;    /* Tiny nudge relative to Level 1 boundary */
    margin-top: 14px;        /* Clean vertical slide gap separating replies */
    border-left: 3px solid #444;
}
/* =========================================================
   COMMENT HEAD
========================================================= */
#miraCommentSystem .chead {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
}
#miraCommentSystem .cname {
    color: #FFD700;
    font-weight: bold;
    font-size: 14px;
}
#miraCommentSystem .chead{
    position:relative;
}

#miraCommentSystem .ctime {
    position:absolute;
    right:70px;
    top:0;
    color:#888;
    font-size:12px;
}
/* =========================================================
   MESSAGE
========================================================= */
#miraCommentSystem .cmsg {
    line-height: 1.5;
    color: #ddd;
    font-size: 14px;
    word-break: break-word;
    width: 100%;
    text-align: left;
}
/* =========================================================
   BUTTONS
========================================================= */
#miraCommentSystem .crow button,
#miraCommentSystem .replybox button {
    border: none;
    background: #2d2d2d;
    color: #fff;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
    margin-top: 10px;
    display: inline-block;
}
#miraCommentSystem .crow button:hover,
#miraCommentSystem .replybox button:hover {
    background: #444;
}
/* =========================================================
   REPLY BOX
========================================================= */
#miraCommentSystem .replybox {
    margin-top: 15px;
    width: 100%;
}
#miraCommentSystem .replybox input,
#miraCommentSystem .replybox textarea {
    width: 100%;
    background: #111;
    border: 1px solid #333;
    color: #fff;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 8px;
    resize: none;
    font-size: 14px;
    outline: none;
}
#miraCommentSystem .replybox input:focus,
#miraCommentSystem .replybox textarea:focus {
    border-color: #FFD700;
}
#miraCommentSystem .replybox textarea {
    height: 75px;
}
#miraCommentSystem .replybox .rbuttons {
    display: flex;
    gap: 8px;
    width: 100%;
}
#miraCommentSystem .replybox .rbuttons button {
    margin-top: 0;
}
/* =========================================================
   SCROLLBAR
========================================================= */
#miraCommentSystem .commentModalContent::-webkit-scrollbar {
    width: 6px;
}
#miraCommentSystem .commentModalContent::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 20px;
}
/* =========================================================
   MOBILE RESPONSIVE CLEANUP (SCREEN WIDTHS <= 768px)
========================================================= */
@media (max-width: 768px) {
    #miraCommentSystem .level1,
    #miraCommentSystem .level2 {
        margin-left: 8px !important;    /* Tightened layout for narrow phone viewports */
        margin-top: 12px !important;    /* Clean vertical slide gap on mobile */
        padding-left: 12px !important;
        padding-right: 12px !important;
        border-left: 2px solid #3a3a3a !important;
        border-right: none !important;
        border-top: none !important;
        border-bottom: none !important;
        border-radius: 0 12px 12px 0 !important;
    }
    #miraCommentSystem .level2 {
        border-left-color: #4a4a4a !important;
    }
    #miraCommentSystem .crow {
        padding: 12px;
        margin-bottom: 4px;
    }
    #miraCommentSystem .commentTrigger {
        width: calc(100% - 32px);
        margin: 16px;
        justify-content: center;
        padding: 14px;
        font-size: 15px;
    }
    #miraCommentSystem .commentModal {
        padding: 0;
        align-items: flex-end;
    }
    #miraCommentSystem .commentModalContent {
        width: 100%;
        height: 85vh;
        max-height: 85vh;
        border-radius: 20px 20px 0 0;
        padding: 20px 16px 40px 16px;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    }
    #miraCommentSystem .commentModal.show .commentModalContent {
        transform: translateY(0);
    }
    #miraCommentSystem .commentClose {
        top: 16px;
        right: 16px;
        font-size: 26px;
    }
    #miraCommentSystem .commentTitle {
        font-size: 18px;
        margin-bottom: 20px;
    }
    #miraCommentSystem #cadd {
        position: static;
        background: transparent;
        padding-bottom: 0;
        margin-bottom: 20px;
    }
    #miraCommentSystem #cadd input, 
    #miraCommentSystem #cadd textarea,
    #miraCommentSystem .replybox input,
    #miraCommentSystem .replybox textarea {
        font-size: 16px;
        border-radius: 10px;
        padding: 12px;
    }
    #miraCommentSystem #cadd button {
        width: 100%;
        padding: 14px;
        font-size: 15px;
    }
    #miraCommentSystem .cmsg {
        font-size: 15px;
    }
    #miraCommentSystem .crow button {
        padding: 10px 16px;
        font-size: 14px;
        width: auto;
    }
    #miraCommentSystem .replybox .rbuttons {
        flex-direction: column;
        gap: 6px;
    }
    #miraCommentSystem .replybox button {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
}


.cmsg a{
    color:#4da6ff;
    text-decoration:none;
    word-break:break-word;
}

.cmsg a:hover{
    text-decoration:underline;
}