/* Article Title & Info Styles */
.little-page-central {
    width: 1200px !important;
    max-width: 95% !important;
}

/* Global Black Title Box Style */
.title {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 10;
}

.title h1 {
    background: #2d2d2d;
    color: #fff;
    display: flex;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 1rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    gap: 8px;
    font-family: 'Noto Serif SC', serif;
    letter-spacing: 1px;
}

.title h1 i {
    font-size: 1.2rem;
    color: #fff;
}

/* Stats Pill */
.message-stats-pill {
    background: linear-gradient(90deg, #6ec1ff, #ff9a9e);
    color: #fff;
    text-align: center;
    padding: 1rem 3rem; /* Increased padding */
    border-radius: 50px;
    margin: 0 auto 3rem;
    width: fit-content;
    box-shadow: 0 4px 15px rgba(255, 154, 158, 0.4);
    font-size: 1.3rem; /* Increased font size */
    letter-spacing: 1px;
    font-family: 'Noto Serif SC', serif;
}

.message-stats-pill b {
    font-size: 1.5rem; /* Increased b size */
    margin: 0 5px;
}

/* Message Grid & Cards */
.message-grid {
    /* Use standard grid */
}

.message-grid .col-md-6 {
    /* Rely on main.css */
    display: flex; /* Make column a flex container */
    flex-direction: column; /* Stack children vertically */
    padding-left: 15px;
    padding-right: 15px;
}

.msg-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    padding: 1rem;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(0,0,0,0.02);
    min-height: auto; /* Minimum height for consistency */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-top: 20px; /* Space for top avatars if needed */
    margin-bottom: 2rem; /* Ensure spacing between rows */
    flex: 1; /* Allow card to grow to fill column height */
    width: auto; /* Allow width to adjust based on margins */
}

.msg-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    background-color: #fcfcfc;
}

/* Avatar Styling */
.msg-avatar {
    position: absolute;
    top: -30px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 2;
    transition: transform 0.3s ease;
}

.msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.msg-card:hover .msg-avatar {
    transform: scale(1.1) rotate(5deg);
}

/* Left Style Card */
.msg-card-left {
    margin-left: 30px; /* Offset for avatar */
    margin-top: 25px; /* Ensure space for avatar overlap */
}

.msg-card-left .msg-avatar {
    left: -40px; /* Moved further left to overlap */
    top: -30px;
}

.msg-card-left .msg-header {
    justify-content: flex-start; /* Name on Left */
    padding-left: 30px; /* Add space for avatar overlap */
    padding-right: 15px; /* Add padding to right for Date */
}

.msg-card-left .msg-footer {
    justify-content: flex-end; /* Align to right bottom */
}

/* Right Style Card */
.msg-card-right {
    margin-right: 30px; /* Offset for avatar */
    margin-top: 25px; /* Ensure space for avatar overlap */
}

.msg-card-right .msg-avatar {
    right: -40px; /* Moved further right to overlap */
    top: -30px;
}

.msg-card-right .msg-header {
    justify-content: flex-end; /* Name on Right */
    padding-right: 30px; /* Add space for avatar overlap */
    padding-left: 15px; /* Add padding to left for Date */
}

.msg-card-right .msg-footer {
    justify-content: flex-start; /* Align to left bottom */
}

.msg-card-right .msg-body {
    text-align: right;
}

/* Header (Name & Date) */
.msg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #eee;
    min-height: 30px; /* Ensure height if date is moved */
}

/* Corner Date Style */
.msg-date {
    position: absolute;
    top: 0;
    background: #777;
    color: #fff;
    padding: 5px 15px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.msg-card-left .msg-date {
    right: 0;
    left: auto;
    border-radius: 0 12px 0 12px; /* Top-Right corner */
}

.msg-card-right .msg-date {
    left: 0;
    right: auto;
    border-radius: 12px 0 12px 0; /* Top-Left corner */
}

.msg-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #6ec1ff;
    font-family: 'Noto Serif SC', serif;
}


/* Body */
.msg-body {
    color: #666;
    line-height: 1.6;
    font-size: 1.3rem; /* Larger font */
    margin-bottom: 1rem; /* Reduced margin */
    word-break: break-all;
    font-family: 'Noto Serif SC', serif;
    flex-grow: 1; /* Allow body to take available space */
    min-height: auto; /* Reduced min-height */
}

/* Footer Divider */
.msg-footer-divider {
    height: 1px;
    background: repeating-linear-gradient(to right, #ddd 0, #ddd 5px, transparent 5px, transparent 10px);
    margin-bottom: 0.8rem;
    width: 100%;
}

/* Footer (Meta) */
.msg-footer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.msg-meta {
    display: flex;
    gap: 10px;
    align-items: center;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem; /* Increased size */
    padding: 8px 18px; /* Increased padding */
    border-radius: 20px;
    background: #f0f2f5;
    color: #666;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.meta-item.location {
    color: #2db7f5;
    background: #f0f8ff; /* Light blue background for location */
}

.meta-item i {
    margin-right: 5px;
}

.meta-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; /* Increased size */
    height: 40px; /* Increased size */
    border-radius: 50%;
    background: #f0f2f5;
    color: #666;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    font-size: 1.2rem; /* Increased font size */
    cursor: pointer; /* Changed cursor */
}

.meta-item-icon.time-ago {
    color: #ff7875;
    background: #fff1f0; /* Light red background for time */
    position: relative;
}

.meta-item-icon.os-info {
    color: #0078d4;
    background: #e6f7ff; /* Light blue */
    position: relative;
}

.meta-item-icon.browser-info {
    color: #ffca28;
    background: #fffbe6; /* Light yellow */
    position: relative;
}

/* Tooltip for Time Ago, OS, Browser */
.meta-item-icon.time-ago::after,
.meta-item-icon.os-info::after,
.meta-item-icon.browser-info::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-12px);
    background: rgba(50, 50, 50, 0.95);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    font-family: 'Noto Serif SC', serif;
}

.meta-item-icon.time-ago::before,
.meta-item-icon.os-info::before,
.meta-item-icon.browser-info::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-2px);
    border: 6px solid transparent;
    border-top-color: rgba(50, 50, 50, 0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 1000;
}

.meta-item-icon.time-ago:hover::after,
.meta-item-icon.time-ago:hover::before,
.meta-item-icon.os-info:hover::after,
.meta-item-icon.os-info:hover::before,
.meta-item-icon.browser-info:hover::after,
.meta-item-icon.browser-info:hover::before {
    opacity: 1;
    visibility: visible;
}


/* Responsive Adjustments */
@media (max-width: 768px) {
    .message-grid .col-md-6 {
        /* Standard grid handles width */
    }
    
    .msg-card-left, .msg-card-right {
        margin-left: 10px;
        margin-right: 10px;
    }
    
    .msg-avatar {
        width: 50px;
        height: 50px;
    }
    
    .msg-card-left .msg-avatar { left: -15px; }
    .msg-card-right .msg-avatar { right: -15px; }
}

/* Floating Message Button */
.MessageButtonCard{
    position: fixed;
    top: 8rem;
    right: 3rem;
    z-index: 100;
    background: #70a9ff;
    padding: .8rem;
    border-radius:10rem;
    border: 2px solid #fff;
    transition: all .2s;
    box-shadow: 0 0 35px 0 rgb(140 186 255 / 39%);
}

.MessageButtonCard:hover{
    background:#fff;
    cursor:pointer;
    transform: scale(1.1);
}

.MessageButtonCard:hover .Message-Icon{
    color: #70a9ff;
}

.MessageButtonCard .Message-Icon{
    color: #fff;
    width:2rem !important;
    height:2rem !important;
}

/* ----------------------------------------------------------------
   Full Screen Modal Styles
   ---------------------------------------------------------------- */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0; /* Handled by fadeIn */
}

.modal-container {
    width: 100%;
    max-width: 800px;
    position: relative;
    padding: 20px;
    box-sizing: border-box;
}

.modal-close {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    color: #333;
    transition: transform 0.3s;
    z-index: 10000;
}

.modal-close:hover {
    transform: rotate(90deg) scale(1.1);
}

.modal-content-box {
    width: 100%;
}

/* Top Bar: Identity & System Info */
.modal-top-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

/* Identity Toggle - Tab Style */
.identity-toggle {
    display: flex;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border-bottom: 1px solid #eee;
    width: 100%;
    margin-bottom: 15px;
}

.identity-toggle span {
    padding: 10px 20px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 1rem;
    color: #888;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
    margin-right: 5px;
}

.identity-toggle span:hover {
    color: #555;
    background: #f9f9f9;
}

.identity-toggle span.active {
    background: #fff;
    color: #ff7875;
    border-bottom: 2px solid #ff7875;
    box-shadow: none;
}

.identity-toggle span.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #ff7875;
}

.system-info-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sys-tag {
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #eee;
}

.sys-tag i {
    font-size: 1rem;
}

#os-tag i { color: #0078d4; }
#browser-tag i { color: #ffca28; }
.location-tag i { color: #ff5252; }


/* Form Inputs */
.input-group-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.modal-input {
    flex: 1;
    border: none;
    background: #f7f9fc;
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 1rem;
    color: #333;
    outline: none;
    transition: all 0.3s;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    font-family: 'Noto Serif SC', serif;
}

.modal-input:focus {
    background: #fff;
    box-shadow: 0 0 0 2px rgba(110, 193, 255, 0.2);
}

.modal-input.qq-input {
    flex: 1.2;
}
.modal-input.name-input {
    flex: 0.8;
}

.modal-input.full-width {
    width: 100%;
}

/* Textarea Wrapper */
.textarea-wrapper {
    position: relative;
    background: #f7f9fc;
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    border: 1px solid transparent;
    transition: all 0.3s;
}

.textarea-wrapper:focus-within {
    background: #fff;
    border-color: #eee;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.textarea-wrapper textarea {
    width: 100%;
    border: none;
    background: transparent;
    resize: none;
    outline: none;
    font-size: 1.1rem;
    color: #333;
    font-family: 'Noto Serif SC', serif;
    min-height: 120px;
    margin-bottom: 40px; /* Space for triggers */
}

/* Emoji Trigger Bar (Inside Textarea) */
.emoji-trigger-bar {
    position: absolute;
    bottom: 15px;
    left: 15px;
    display: flex;
    gap: 10px;
}

.emoji-btn {
    background: #333;
    border: none;
    padding: 6px 18px;
    border-radius: 20px;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.emoji-btn:hover {
    background: #000;
    transform: translateY(-2px);
}

.random-text-btn {
    background: #fff;
    border: 1px solid #eee;
    padding: 6px 14px;
    border-radius: 20px;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.random-text-btn:hover {
    background: #f0f2f5;
    color: #333;
    transform: translateY(-2px);
}

/* Emoji Wrapper Adjustment */
.emoji-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 450px;
    z-index: 1002;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    display: none;
    overflow: hidden;
    border: 1px solid #eee;
}

/* Emoji Arrow removed */
.emoji-wrapper::after, .emoji-wrapper::before {
    display: none;
}

/* Tab & Scrollbar (Updated for Blue Pill Style) */
.emoji-tabs {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 15px;
    border-radius: 12px 12px 0 0;
    overflow-x: auto;
    gap: 10px;
}

.emoji-tab {
    padding: 6px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    border: none;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-weight: 500;
}

.emoji-tab:hover {
    color: #333;
    background: #f5f5f5;
}

.emoji-tab.active {
    color: #fff;
    background: #007bff; /* Blue active state */
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
    font-weight: 500;
}

.emoji-container {
    height: 220px;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
}

/* Custom Scrollbar for Emoji Container */
.emoji-container::-webkit-scrollbar {
    width: 6px;
}
.emoji-container::-webkit-scrollbar-track {
    background: transparent;
}
.emoji-container::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 3px;
}
.emoji-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.2);
}

.emoji-item {
    cursor: pointer;
    margin: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 8px;
    padding: 4px;
}

.emoji-item:hover {
    transform: scale(1.15);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.emoji-footer {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 10px 15px;
    text-align: right;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 0 0 16px 16px;
}

.close-emoji {
    cursor: pointer;
    color: #999;
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 4px;
}
.close-emoji:hover {
    background: #e9ecef;
    color: #333;
}


/* Footer Button */
.modal-footer-btn {
    text-align: right;
}

.submit-btn {
    background: #ff7875;
    color: #fff;
    border: none;
    padding: 12px 40px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 120, 117, 0.4);
    transition: all 0.3s;
    font-family: 'Noto Serif SC', serif;
}

.submit-btn:hover {
    background: #ff5f5c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 120, 117, 0.5);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
