* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }
body { background-color: #050505; color: white; display: flex; flex-direction: column; min-height: 100vh; }

/* Header */
.main-header {
    height: 60px; background: #1a1a1a; display: flex; justify-content: space-between;
    align-items: center; padding: 0 20px; position: sticky; top: 0; z-index: 100; border-bottom: 1px solid #333;
}
.logo { font-size: 22px; font-weight: bold; color: #fff; }
.logo span { color: #ff0050; }
.search-box { margin-left: 20px; display: flex; background: #333; border-radius: 20px; padding: 5px 15px; }
.search-box input { background: none; border: none; color: white; outline: none; width: 200px; }
.header-right { display: flex; align-items: center; gap: 15px; }
.user-coins { color: #ffd700; font-weight: bold; }
.btn-join { background: #ff0050; color: white; text-decoration: none; padding: 7px 15px; border-radius: 5px; font-size: 14px; }

/* Layout */
.main-container { display: flex; flex: 1; }
.sidebar { width: 220px; background: #111; padding: 20px; border-right: 1px solid #333; }
.sidebar-section h3 { font-size: 14px; color: #666; margin-bottom: 15px; text-transform: uppercase; }
.sidebar-section ul { list-style: none; margin-bottom: 30px; }
.sidebar-section ul li a { color: #ccc; text-decoration: none; display: block; padding: 8px 0; font-size: 15px; }
.sidebar-section ul li a:hover { color: #ff0050; }

/* Content Grid */
.content { flex: 1; padding: 20px; }
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.model-card { background: #1a1a1a; border-radius: 8px; overflow: hidden; position: relative; transition: 0.3s; }
.model-card:hover { transform: translateY(-5px); }
.model-card img { width: 100%; height: 280px; object-fit: cover; }
.status-tag { position: absolute; top: 10px; left: 10px; background: #ff0050; font-size: 10px; padding: 2px 6px; border-radius: 3px; font-weight: bold; }
.card-info { padding: 10px; }
.card-info h4 { font-size: 16px; margin-bottom: 5px; }
.card-info p { color: #888; font-size: 13px; }

/* Footer */
.main-footer { background: #111; padding: 30px; border-top: 1px solid #333; text-align: center; }
.footer-links a { color: #666; margin: 0 10px; text-decoration: none; font-size: 14px; }

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .search-box { display: none; }
}
.status-tag.offline {
    background: #555 !important;
}
/* মেইন লেআউট ফিক্স */
.main-container {
    display: flex;
    margin-top: 60px; /* Header height */
    min-height: calc(100vh - 60px);
}

.content {
    flex: 1;
    padding: 20px;
    background: #0f0f0f;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* মডেল গ্রিড - রেসপনসিভ */
.model-grid {
    display: grid;
    /* ডেস্কটপে ৫টি কার্ড, ট্যাবে ৩টি, মোবাইলে ২টি */
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

/* কার্ড স্টাইল */
.model-card {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #222;
}

.model-card a {
    text-decoration: none;
    color: inherit;
}

.model-card:hover {
    transform: scale(1.03);
    border-color: #ff0050;
}

.image-container {
    position: relative;
    width: 100%;
    padding-top: 130%; /* ২:৩ রেশিও ইমেজের জন্য */
}

.image-container img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

/* লাইভ ট্যাগ */
.status-tag {
    position: absolute;
    top: 10px; left: 10px;
    background: #ff0050;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(255,0,80,0.4);
}

.status-tag.offline { background: #444; box-shadow: none; }

.live-overlay {
    position: absolute;
    bottom: 0; width: 100%;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 10px;
    text-align: center;
    font-size: 13px;
    opacity: 0;
    transition: 0.3s;
}

.model-card:hover .live-overlay { opacity: 1; }

.card-info { padding: 12px; }
.card-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.token-rate { font-size: 11px; color: #ffd700; background: rgba(255,215,0,0.1); padding: 2px 6px; border-radius: 4px; }
.card-info p { font-size: 12px; color: #aaa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* মোবাইল ডিভাইসের জন্য স্পেশাল এডজাস্টমেন্ট */
@media (max-width: 768px) {
    .sidebar { display: none; } /* মোবাইলে সাইডবার হাইড হবে */
    
    .model-grid {
        grid-template-columns: repeat(2, 1fr); /* মোবাইলে পাশাপাশি ২টি কার্ড দেখাবে */
        gap: 10px;
        padding: 5px;
    }

    .content { padding: 10px; }
    
    .main-header { padding: 0 10px; }
    .logo { font-size: 18px; }
    .header-right .btn-join { padding: 5px 10px; font-size: 12px; }
    
    .card-info h4 { font-size: 14px; }
    .token-rate { display: none; } /* ছোট স্ক্রিনে রেট হাইড করা যায় জায়গার জন্য */
}

/* বড় স্ক্রিনে কার্ড একটু বড় দেখাবে */
@media (min-width: 1200px) {
    .model-grid { grid-template-columns: repeat(5, 1fr); }
}
/* চ্যাট বাবল সিস্টেম */
.chat-msgs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
}

.chat-row {
    display: flex;
    width: 100%;
    margin-bottom: 5px;
}

.chat-row.left { justify-content: flex-start; } /* ইউজার বামে */
.chat-row.right { justify-content: flex-end; } /* মডেল ডানে */

.bubble {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
}

/* ইউজারের বাবল স্টাইল */
.user-bubble {
    background: #222;
    color: #eee;
    border-bottom-left-radius: 2px;
}
.user-bubble b { color: #888; font-size: 11px; display: block; margin-bottom: 3px; }

/* মডেলের বাবল স্টাইল */
.model-bubble {
    background: #ff0050;
    color: white;
    border-bottom-right-radius: 2px;
    text-align: right;
}
.model-bubble b { font-size: 11px; display: block; margin-bottom: 3px; }

/* মডেল ট্যাগ */
.chat-tag {
    background: white;
    color: #ff0050;
    font-size: 9px;
    font-weight: bold;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 5px;
    vertical-align: middle;
}

.bubble p { margin: 0; word-wrap: break-word; }
/* চ্যাট বাবল ডিজাইন */
.chat-box {
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 10px;
    overflow-y: auto;
}

.chat-row { display: flex; width: 100%; margin-bottom: 5px; }
.chat-row.left { justify-content: flex-start; }
.chat-row.right { justify-content: flex-end; }

.bubble {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 13px;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.user-bubble {
    background: #2a2a2a;
    color: #fff;
    border-bottom-left-radius: 2px;
}

.model-bubble {
    background: #ff0050;
    color: #fff;
    border-bottom-right-radius: 2px;
    text-align: right;
}

.bubble b { font-size: 10px; display: block; opacity: 0.7; margin-bottom: 2px; }
.chat-tag { background: #fff; color: #ff0050; font-size: 8px; padding: 1px 4px; border-radius: 3px; margin-right: 5px; font-weight: bold; }
.bubble p { margin: 0; }

