:root {
    --bg: #0d0d0d;
    --sidebar: #000000;
    --card: #1a1a1a;
    --accent: #10b981;
    --text: #e5e7eb;
    --border: #262626;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* পুল-টু-রিফ্রেশ ফিক্স - body তে auto, chat এ contain */
body {
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
    position: fixed;
    width: 100%;
    overscroll-behavior-y: auto;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* ========== Sidebar ========== */
.sidebar {
    width: 260px;
    background: var(--sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
}

.brand {
    color: var(--accent);
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-bottom: 20px;
}

.new-chat-btn {
    width: 100%;
    background: #111;
    border: 1px solid var(--border);
    color: white;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
}

.new-chat-btn:hover {
    background: #222;
}

.history-container {
    flex: 1;
    overflow-y: auto;
    margin-top: 20px;
    min-height: 0;
}

.sidebar-footer {
    flex-shrink: 0;
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    background: var(--sidebar);
}

/* ========== Main Chat Area ========== */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.top-nav {
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    flex-shrink: 0;
}

.model-info {
    font-size: 13px;
    color: #888;
    background: #111;
    padding: 5px 15px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

/* চ্যাট ডিসপ্লে - এখানে রিফ্রেশ ব্লক থাকবে */
.chat-display {
    flex: 1;
    overflow-y: auto;
    padding: 20px 15%;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.initial-screen {
    text-align: center;
    margin-top: 20vh;
}

.initial-screen i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
    color: var(--accent);
}

.initial-screen h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.initial-screen p {
    color: #888;
    font-size: 15px;
}

/* ========== Message Bubbles ========== */
.message {
    margin-bottom: 20px;
    display: flex;
    animation: fadeInScale 0.3s ease-out;
    position: relative;
}

.user-message {
    justify-content: flex-end;
}

.ai-message {
    justify-content: flex-start;
}

.message .content {
    max-width: 80%;
    padding: 12px 18px;
    border-radius: 18px;
    line-height: 1.5;
    font-size: 15px;
    word-wrap: break-word;
}

.user-message .content {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-bottom-right-radius: 4px;
}

.ai-message .content {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: #e5e7eb;
    border-bottom-left-radius: 4px;
}

.ai-message .content a {
    color: #10b981;
    text-decoration: underline;
    word-break: break-all;
}

.thinking {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    padding: 12px 18px;
    border-radius: 18px;
    color: #888;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ========== Input Container - Fixed at Bottom ========== */
.input-container {
    padding: 15px 15% 20px 15%;
    background: var(--bg);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.image-preview-container {
    margin-bottom: 8px;
    padding: 4px 8px;
    background: #1a1a1a;
    border-radius: 10px;
    border: 1px solid #2a2a2a;
    display: inline-block;
    max-width: 180px;
}

.image-preview-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.image-preview-wrapper img {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #10b981;
}

.preview-image-name {
    font-size: 10px;
    color: #10b981;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.remove-image-btn {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 18px;
    height: 18px;
    background: #ef4444;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    z-index: 10;
}

.remove-image-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.input-group {
    background: #1a1a1a;
    border: 1px solid var(--border);
    border-radius: 25px;
    display: flex;
    align-items: center;
    padding: 8px 15px;
    gap: 10px;
}

.input-group:focus-within {
    border-color: #10b981;
}

#user-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    padding: 10px 0;
    outline: none;
    font-size: 14px;
    line-height: 1.4;
    resize: none;
    max-height: 100px;
    font-family: inherit;
}

.attach-btn, .voice-input-btn {
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    color: #888;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.attach-btn:hover, .voice-input-btn:hover {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.voice-input-btn.listening {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    animation: pulse 1.2s infinite;
}

.send-btn {
    background: #10b981;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.send-btn:hover {
    background: #059669;
    transform: scale(1.05);
}

.speak-btn {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
    padding: 4px 8px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
}

.speak-btn:hover {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.speak-btn.speaking {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    animation: pulse 1.2s infinite;
}

.speak-btn.speaking:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.2);
}

/* ========== Animations ========== */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

.animate-in {
    animation: fadeInScale 0.3s ease-out;
}

/* ========== Auth Overlay ========== */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
}

.auth-card {
    background: #111;
    padding: 28px 24px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--border);
    width: 360px;
    max-width: 100%;
    margin: auto;
    flex-shrink: 0;
    position: relative;
}

/* Payment modal specific - compact & scrollable */
#payment-modal .auth-card {
    width: 420px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
}

.auth-card i {
    font-size: 40px;
    color: var(--accent);
    margin-bottom: 20px;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: white;
    color: black;
    text-decoration: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: bold;
    margin: 20px 0;
    cursor: pointer;
    border: none;
    width: 100%;
}

.cancel-btn {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 8px;
}

/* ========== History Styles ========== */
.history-label {
    font-size: 11px;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.history-item {
    padding: 10px 12px;
    margin-bottom: 5px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #888;
    transition: 0.2s;
}

.history-item:hover {
    background: #1a1a1a;
    color: white;
}

.history-item.active {
    background: #1a1a1a;
    color: #10b981;
    border-left: 3px solid #10b981;
}

/* ========== User Control Panel ========== */
.user-control-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ========== Toast Notification ========== */
.toast-message {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translate(-50%, 100px);
    background: #333;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
    font-size: 13px;
}

.toast-message.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

.toast-message.success {
    background: #10b981;
}

.toast-message.error {
    background: #ef4444;
}

/* ========== Payment Modal Styles ========== */
.payment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.pay-card {
    border: 1px solid #333;
    padding: 8px 6px;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    background: #0a0a0a;
}

.pay-card:hover {
    background: #111;
    transform: translateY(-2px);
    border-color: #f1c40f;
}

.pay-card.selected {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.payment-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    margin-bottom: 3px;
}

#method-details {
    display: none;
    background: #0a0a0a;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 18px;
    border: 1px solid #2a2a2a;
}

.address-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #000000;
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 6px;
    font-family: monospace;
    font-size: 12px;
    word-break: break-all;
}

.copy-address-btn {
    background: rgba(16, 185, 129, 0.2);
    border: none;
    color: #10b981;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 10px;
    cursor: pointer;
    transition: 0.2s;
    margin-left: 8px;
    flex-shrink: 0;
}

.copy-address-btn:hover {
    background: #10b981;
    color: #000;
}

#trx-id-input {
    width: 100%;
    padding: 12px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    border-radius: 8px;
    margin-bottom: 15px;
    outline: none;
}

#trx-id-input:focus {
    border-color: #10b981;
}

/* ========== Header Badge ========== */
#header-ultra-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    color: #000;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.refresh-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: #888;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: 0.2s;
    flex-shrink: 0;
}

.refresh-btn:hover {
    color: #10b981;
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.refresh-btn:active {
    transform: rotate(180deg);
    transition: transform 0.4s ease;
}

/* ========== Delete Button ========== */
.delete-msg-btn {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 11px;
    margin-left: 8px;
    opacity: 0;
    transition: 0.2s;
    padding: 4px;
    border-radius: 4px;
}

.message:hover .delete-msg-btn {
    opacity: 1;
}

.delete-msg-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* ========== Scrollbar ========== */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 5px;
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 768px) {
    .menu-btn {
        display: block;
        background: transparent;
        border: none;
        color: white;
        font-size: 20px;
        cursor: pointer;
        width: 40px;
        height: 40px;
        border-radius: 50%;
    }
    
    .menu-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 9999;
        width: 280px;
        background: #000000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        border-right: 1px solid #262626;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 280px;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }

    .chat-main {
        width: 100%;
        height: 100vh;
    }

    .chat-display {
        padding: 15px 12px;
    }

    .message .content {
        max-width: 85%;
        padding: 10px 14px;
        font-size: 14px;
    }

    .input-container {
        padding: 10px 12px 15px 12px;
    }

    .input-group {
        padding: 6px 12px;
    }

    .attach-btn, .send-btn, .voice-input-btn {
        width: 40px;
        height: 40px;
    }

    .top-nav {
        padding: 10px 15px;
    }

    .model-info {
        font-size: 11px;
        padding: 4px 10px;
    }

    .initial-screen h1 {
        font-size: 22px;
    }

    .initial-screen p {
        font-size: 13px;
    }

    .auth-card {
        width: 90%;
        margin: auto;
        padding: 20px;
    }

    /* Payment modal mobile fix */
    #payment-modal .auth-card {
        width: 96%;
        max-height: 88vh;
        padding: 16px;
    }
    
    /* Refresh btn mobile */
    .refresh-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .payment-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .pay-card {
        padding: 8px;
    }

    .pay-card i {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .chat-display {
        padding: 10px 10px;
    }

    .message .content {
        max-width: 90%;
        padding: 8px 12px;
        font-size: 13px;
    }

    .input-container {
        padding: 8px 10px 12px 10px;
    }

    .attach-btn, .send-btn, .voice-input-btn {
        width: 36px;
        height: 36px;
    }

    .top-nav {
        padding: 8px 12px;
    }

    .model-info {
        font-size: 10px;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .chat-display {
        padding: 10px 15px;
    }

    .message .content {
        max-width: 75%;
    }

    .input-container {
        padding: 5px 12px 10px 12px;
    }

    .sidebar {
        width: 250px;
    }
}

@media (min-width: 769px) {
    .menu-btn {
        display: none;
    }
    
    .sidebar.collapsed {
        width: 0;
        overflow: hidden;
        padding: 0;
        border: none;
        min-width: 0;
    }
}

/* ========== মোবাইলে ইনপুট বক্স ঠিক করার জন্য এক্সট্রা ফিক্স ========== */
.app-container {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.chat-display {
    flex: 1;
    overflow-y: auto;
    padding: 15px 12px;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}

.input-container {
    padding: 10px 12px;
    background: var(--bg);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    position: relative;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        height: 100dvh;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 9999;
        width: 280px;
        background: #000000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        border-right: 1px solid #262626;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .chat-main {
        width: 100%;
        height: 100dvh;
        display: flex;
        flex-direction: column;
    }

    .top-nav {
        padding: 10px 15px;
        flex-shrink: 0;
        background: var(--bg);
        z-index: 100;
    }

    .chat-display {
        flex: 1;
        overflow-y: auto;
        padding: 12px 12px;
        padding-bottom: 8px;
    }

    .message .content {
        max-width: 85%;
        padding: 10px 14px;
        font-size: 14px;
    }

    .input-container {
        flex-shrink: 0;
        padding: 8px 12px 12px 12px;
        background: var(--bg);
        border-top: 1px solid var(--border);
    }

    .input-group {
        padding: 6px 12px;
        gap: 8px;
    }

    .attach-btn, .send-btn, .voice-input-btn {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    #user-input {
        font-size: 14px;
        padding: 8px 0;
        max-height: 80px;
    }
}

@media (max-width: 380px) {
    .chat-display {
        padding: 8px 10px;
    }
    
    .message .content {
        max-width: 90%;
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .input-container {
        padding: 6px 10px 10px 10px;
    }
    
    .attach-btn, .send-btn, .voice-input-btn {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 768px) and (pointer: coarse) {
    .chat-display {
        padding-bottom: 5px;
    }
    
    .input-container {
        padding-bottom: 8px;
    }
}

/* ========== সাইডবার ফিক্স ========== */
.sidebar {
    width: 280px;
    background: var(--sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    position: relative;
}

.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
    min-height: 0;
}

.brand {
    color: var(--accent);
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-bottom: 20px;
    padding-bottom: 0;
}

.new-chat-btn {
    width: 100%;
    background: #111;
    border: 1px solid var(--border);
    color: white;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
    margin-bottom: 0;
}

.history-container {
    flex: 1;
    overflow-y: auto;
    margin-top: 20px;
    min-height: 0;
    padding-right: 5px;
}

.history-item {
    padding: 10px 12px;
    margin-bottom: 5px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #888;
    transition: 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.history-item:hover {
    background: #1a1a1a;
    color: white;
}

.history-item.active {
    background: #1a1a1a;
    color: #10b981;
    border-left: 3px solid #10b981;
}

.history-item div[style*="flex:1"] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-footer {
    flex-shrink: 0;
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    background: var(--sidebar);
    margin-top: auto;
}

.history-container::-webkit-scrollbar {
    width: 4px;
}

.history-container::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.history-container::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 9999;
        width: 280px;
        background: #000000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        border-right: 1px solid #262626;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar.active::after {
        content: '';
        position: fixed;
        top: 0;
        left: 280px;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        pointer-events: none;
        z-index: -1;
    }

    .sidebar-content {
        padding: 15px;
    }

    .history-container {
        margin-top: 15px;
    }

    .history-item {
        padding: 8px 10px;
        font-size: 12px;
    }

    .sidebar-footer {
        padding: 12px 15px;
    }
}

@media (min-width: 769px) {
    .menu-btn {
        display: none;
    }
    
    .sidebar.collapsed {
        width: 0;
        overflow: hidden;
        padding: 0;
        border: none;
        min-width: 0;
    }
}

/* ========== Clear All History বাটন ফিক্স ========== */
.sidebar-footer {
    flex-shrink: 0;
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    background: var(--sidebar);
    margin-top: auto;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.user-control-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.clear-history-btn {
    width: 100%;
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    border-radius: 8px;
    color: #ef4444;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
}

.clear-history-btn:hover {
    background: #ef4444;
    color: white;
}

.upgrade-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(45deg, #f1c40f, #f39c12);
    border: none;
    border-radius: 8px;
    color: black;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
}

.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
}

.history-container {
    flex: 1;
    overflow-y: auto;
    margin-top: 15px;
    min-height: 0;
    width: 100%;
    padding-right: 5px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .sidebar-footer {
        padding: 12px 15px;
    }
    
    .clear-history-btn, .upgrade-btn {
        padding: 8px;
        font-size: 12px;
    }
    
    .user-control-panel {
        gap: 8px;
    }
}

/* পুল-টু-রিফ্রেশ অক্ষম করার জন্য - শুধু chat এ ব্লক, body তে অনুমোদন */
body {
    overscroll-behavior: none;
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: pan-x pan-y;
}

.chat-display {
    overscroll-behavior: contain;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}