/* Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
	outline: none;
}

/* Custom Scrollbar for all elements */
* {
    scrollbar-width: thin;
    scrollbar-color: #2d2e37 #2a2b3200;
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    background: #2a2b32;
    border-radius: 3px;
}

*::-webkit-scrollbar-thumb {
    background: #565869;
    border-radius: 3px;
    transition: background 0.2s ease;
}

*::-webkit-scrollbar-thumb:hover {
    background: #6b6d7a;
}

*::-webkit-scrollbar-corner {
    background: #2a2b32;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #343541;
    color: #ececf1;
    height: 100vh;
    height: 100dvh; /* Modern iOS fix */
    overflow: hidden;
}

/* App container */
.app-container {
    display: flex;
    height: 100vh;
    height: 100dvh; /* Modern iOS fix */
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
}



/* Sidebar */
.sidebar {
    width: 260px;
    background: #202123;
    border-right: 1px solid #565869;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
}

.sidebar.collapsed {
    width: 50px;
    overflow: visible;
}

.sidebar.collapsed .sidebar-header {
    padding: 16px 8px;
    flex-direction: column;
    gap: 8px;
}

.sidebar.collapsed .sidebar-header span,
.sidebar.collapsed .history-section h3,
.sidebar.collapsed .history-item span,
.sidebar.collapsed .user-info span {
    display: none;
}

.sidebar.collapsed .new-chat-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
    min-width: 34px;
    flex: none;
}

.sidebar.collapsed .sidebar-toggle {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
}

.sidebar.collapsed .chat-item {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
    margin: 2px auto;
    border-radius: 6px;
    position: relative;
}

.sidebar.collapsed .chat-item .chat-title,
.sidebar.collapsed .chat-item .delete-chat-btn {
    display: none;
}

.sidebar.collapsed .user-info {
    padding: 8px;
    justify-content: center;
}

.sidebar.collapsed .chat-history {
    padding: 8px;
}

.sidebar.collapsed .history-section {
    margin-bottom: 16px;
}

.sidebar.collapsed .user-avatar {
    margin: 0;
}

/* Tooltip for collapsed sidebar items */
.sidebar.collapsed .new-chat-btn,
.sidebar.collapsed .chat-item,
.sidebar.collapsed .user-info {
    position: relative;
}

.sidebar.collapsed .new-chat-btn::after,
.sidebar.collapsed .chat-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: #40414f;
    color: #ececf1;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1000;
    pointer-events: none;
}

.sidebar.collapsed .new-chat-btn:hover::after,
.sidebar.collapsed .chat-item:hover::after {
    opacity: 1;
    visibility: visible;
}

.sidebar.collapsed .new-chat-btn:hover::after {
    content: 'Chat mới';
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: #40414f;
    color: #ececf1;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    border: 1px solid #565869;
}

.sidebar.collapsed .user-info:hover::after {
    content: 'Foxchat User';
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: #40414f;
    color: #ececf1;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    border: 1px solid #565869;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #565869;
    display: flex;
    gap: 8px;
}

.new-chat-btn {
    flex: 1;
    background: #005f48;
    border: 1px solid #10a37f;
    font-weight: bold;
    color: #ececf1;
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
	height:40px;
}

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

.sidebar-toggle {
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid #10a37f;
    color: #10a37f;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.sidebar-toggle:hover {
    background: #111;
}

.chat-history {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 15px;
}

.history-section {
    margin-bottom: 15px;
}

.history-section h3 {
    color: #8e8ea0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
    padding: 0px;
    padding-bottom: 7px;
    border-bottom: 1px dashed #56586947;
}
h3.foxhist {
    display: flex;
    justify-content: space-between;
}
.history-section h3 .fa-clock-rotate-left{width:20px;}
#delall{cursor: pointer;}
#delall:hover{color:#fff}
.history-items {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: #ececf1;
    position: relative;
	background: #34354147;
}

.chat-item:hover {
    background: #2a2b32;
}

.chat-item.active {
    background: #343541a9;
}
.chat-item.active2{border-bottom: 2px solid #565869b3}
.chat-item i {
    font-size: 14px;
    color: #10a37f;
}

.chat-title {
    flex: 1;
    cursor: pointer;
	font-size:14px;
}

.delete-chat-btn {
    background: none;
    border: none;
    color: #8e8ea0;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.2s ease;
    font-size: 12px;
}

.chat-item:hover .delete-chat-btn {
    opacity: 1;
}

.delete-chat-btn:hover {
    color: white;
}

.history-item span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid #565869;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.user-info:hover {
    background: #40414f;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: #5436da;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.user-info span {
    color: #ececf1;
    font-size: 14px;
    font-weight: 500;
}

/* Chat container */
.chat-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    background: #1c1d1e;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* Header */
.chat-header {
    background: #044333;
    color: #ececf1;
    padding: 16px 20px;
    border-bottom: 1px solid #10a37f;
    position: sticky;
    top: 0;
    z-index: 100;
	background-image: url(/dir/head.png);
    background-size: cover;
	height:74px;
	display: flex;
    justify-content: flex-start;
    align-content: center;
    align-items: center;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 768px;
}

.bot-avatar {
    width: 40px;
    height: 40px;
    background: #10a37f;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.bot-info h1 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    opacity: 0.7;
}

.status.online::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Messages area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: #1c1d1e;
    scroll-behavior: smooth;
    background-image: url(/dir/banner.png);
    background-size: cover;
    background-position: center center;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(42, 43, 50, 0.4);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(86, 88, 105, 0.7);
    border-radius: 3px;
    transition: all 0.2s ease;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 109, 122, 0.9);
}

.message {
    padding: 24px 0;
    animation: fadeInUp 0.3s ease-out;
	border-bottom: 1px solid #0443334f;
}

.message:last-child {
    border-bottom: none;
}

.message-wrapper {
    max-width: 768px;
    margin: 0 auto;
    padding: 0px;
    display: flex;
    gap: 16px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 30px;
    height: 30px;
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 4px;
}

.bot-message .message-avatar {
    background: #10a37f;
    color: white;
}

.user-message .message-avatar {
    background: #394143;
    color: white;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-text {
    color: #ececf1;
    line-height: 1.6;
    word-wrap: break-word;
    font-size: 16px;
}

.user-message .message-text {
    color: #ececf1;
}

.message-time {
    font-size: 12px;
    color: #10a37f;
    opacity: 0.7;
}

/* Meta row: copy icon + time */
.message-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 12px;
}

.copy-chat-btn {
    background: transparent;
    border: none;
    padding: 0;
    color: #10a37f;
    opacity: 0.7;
    cursor: pointer;
    line-height: 1;
}

.copy-chat-btn:hover {
    opacity: 1;
}

.copy-chat-btn i {
    font-size: 12px;
    width: 20px;
    height: 20px;
    display: flex;
    align-content: center;
    justify-content: center;
    align-items: center;
    background: #044333;
    border-radius: 100%;
}

/* Markdown content styling */
.message-text h1, .message-text h2, .message-text h3 {
    margin: 16px 0 8px 0;
    color: #ececf1;
    font-weight: 600;
}

.message-text h1 {
    font-size: 1.5em;
}

.message-text h2 {
    font-size: 1.3em;
}

.message-text h3 {
    font-size: 1.1em;
}

.message-text p {
    margin: 12px 0;
    line-height: 1.6;
}

.message-text ul, .message-text ol {
    margin: 12px 0;
    padding-left: 24px;
}

.message-text li {
    margin: 4px 0;
}

.message-text code {
    background: #040404;
    color: #28d1a8;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', monospace;
    font-size: 0.9em;
}

.message-text pre {
    background: #1e1e1ec7;
    border: 1px solid #10a37f63;
    padding: 5px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 16px 0;
}

.message-text pre code {
    background: transparent;
    border: none;
    padding: 0;
}

.message-text blockquote {
    border-left: 3px solid #565869;
    padding-left: 16px;
    margin: 16px 0;
    font-style: italic;
    opacity: 0.8;
}

.message-text a {
    color: #19c37d;
    text-decoration: underline;
}

.message-text a:hover {
    color: #10a37f;
}

.message-text strong {
    font-weight: 600;
}

.message-text em {
    font-style: italic;
}

/* Input area */
.chat-input-container {
    padding: 15px 20px;
    background: #044333;
    background-image: url(/dir/bg.png);
    background-size: cover;
    position: relative;
}

.chat-input-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 1px; /* độ dày border */
    width: 100%;
    background: linear-gradient(
        90deg,
        rgba(16, 163, 127, 0.3) 0%,
        rgba(16, 163, 127, 1) 50%,
        rgba(16, 163, 127, 0.3) 100%
    );
    background-size: 200% auto;
    animation: borderShineTop 2s linear infinite;
}

@keyframes borderShineTop {
    0% {
        background-position: 200% center;
    }
    100% {
        background-position: -200% center;
    }
}


/* Input mode toggle */
.input-mode-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.mode-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #00271d;
    border: 0px;
    color: #10a37f;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    font-weight: 500;
}

.mode-btn:hover {
    background: #10a37f;
    color: white;
}

.mode-btn.active {
    background: #005943;
    color: white;
}

.mode-btn i {
    font-size: 14px;
}

/* Mode indicator */
.mode-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #8e8ea0;
    font-size: 12px;
    margin-left: 10px;
}

.mode-indicator i {
    font-size: 12px;
}

.chat-input-form {
    max-width: 768px;
    margin: 0 auto;
}

.input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
    background: #00271d;
    border: 1px solid #10a37f;
    color: #fff;
    border-radius: 12px;
    padding: 12px;
    transition: border-color 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: #10a37f;
    box-shadow: 0 0 0 1px #10a37f;
}

#messageInput {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ececf1;
    font-size: 16px;
    line-height: 1.5;
    resize: none;
    max-height: 120px;
    overflow-y: auto;
    font-family: inherit;
}

#messageInput::-webkit-scrollbar {
    width: 4px;
}

#messageInput::-webkit-scrollbar-track {
    background: rgba(42, 43, 50, 0.3);
    border-radius: 2px;
}

#messageInput::-webkit-scrollbar-thumb {
    background: rgba(86, 88, 105, 0.6);
    border-radius: 2px;
    transition: all 0.2s ease;
}

#messageInput::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 109, 122, 0.8);
}

#messageInput::placeholder {
    color: #8e8ea0;
}

.send-button {
    width: 32px;
    height: 32px;
    border: none;
    background: #ececf1;
    color: #343541;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.send-button:hover:not(:disabled) {
    background: #d1d5db;
}

.send-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #565869;
    color: #8e8ea0;
}

.input-footer {
    display: flex;
    margin-top: 8px;
}

.char-count {
    font-size: 11px;
    color: #8e8ea0;
    opacity: 0.7;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(52, 53, 65, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    background: #40414f;
    padding: 24px 32px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #565869;
}

.loading-spinner i {
    font-size: 20px;
    color: #10a37f;
    margin-bottom: 12px;
    display: block;
}

.loading-spinner span {
    color: #ececf1;
    font-weight: 400;
    font-size: 14px;
}

/* Image upload button styles */
.image-upload-btn {
    background: #044333;
    border: 1px solid #10a37f66;
    color: #ececf1;
    padding: 5px 5px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 30px;
    height: 30px;
    margin-right: 4px;
}

.image-upload-btn:hover {
    background: #111;
    border-color: #fff;
}

.image-upload-btn:active {
    transform: scale(0.95);
}

.image-upload-btn i {
    font-size: 16px;
}

.image-upload-btn.has-images {
    border-color: #10a37f;
    box-shadow: 0 0 0 2px rgba(16, 163, 127, 0.2) inset;
}

.image-upload-btn.has-images::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: #ff4444;
    border-radius: 50%;
}

/* Removable chip shown before default prompt when image is selected */
.image-clear-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #044333;
    color: #ececf1;
    border: 1px solid #10a37f66;
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 13px;
    height: 30px;
    margin-right: 8px;
    cursor: pointer;
}

.image-clear-chip i {
    font-size: 12px;
}

.image-clear-chip:hover {
    background: #03372a;
    border-color: #10a37f99;
}

/* Image preview styles */
.image-preview-container {
    display: flex;
    gap: 8px;
    margin: 8px 0;
    flex-wrap: wrap;
}

.image-preview {
    position: relative;
    display: inline-block;
}

.image-preview img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #565869;
}

.image-preview .remove-image {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background 0.2s ease;
}

.image-preview .remove-image:hover {
    background: #dc2626;
}

/* Additional ChatGPT-like styles */
.message.user-message {
    background: #1c1d1ee0;
}

.message.bot-message {
    background: #202123b0;
}


/* Copy button for code blocks */
.message-text pre {
    position: relative;
}

.copy-button {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #565869;
    color: #ececf1;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.message-text pre:hover .copy-button {
    opacity: 1;
}

.copy-button:hover {
    background: #6b7280;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.sidebar-overlay.show {
    display: block;
}

/* Sidebar scrollbar */
.chat-history::-webkit-scrollbar {
    width: 4px;
}

.chat-history::-webkit-scrollbar-track {
    background: #202123;
}

.chat-history::-webkit-scrollbar-thumb {
    background: #565869;
    border-radius: 2px;
}

.chat-history::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Loading message styles */
.loading-message {
    color: #8e8ea0;
    font-style: italic;
}

/* Typing indicator animation */

.loading-text { display: flex; flex-direction: column; gap: 8px; }
.frow { display: flex; gap: 10px; }

.slot {
    display: inline-block;
    height: 7px;
    width: var(--w, 8ch);
    border-radius: 6px;
    background: linear-gradient(100deg, #18c59b2e 20%, #18c59b73 40%, #18c59b3d 60%);
    background-size: 200% 100%;
    animation: shimmer 0.5s ease-in-out infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.frow {
	animation: hideShow 1s ease-in-out infinite;
}

.frow:nth-child(1) {
	animation-delay: 0s;
}

.frow:nth-child(2) {
	animation-delay: 2s;
}

@keyframes shimmer {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

@keyframes hideShow {
	0%, 25% { opacity: 1; }
	50%, 75% { opacity: 0.2; }
	100% { opacity: 1; }
}

.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-right: 8px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 100%;
    background-color: #18c59b;
    animation: typing 0.5s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* Image display styles */
.image-container {
    max-width: 100%;
    margin: 8px 0;
}

.generated-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.generated-image:hover {
    transform: scale(1.02);
    cursor: pointer;
}

.image-info {
    margin-top: 12px;
    padding: 12px;
    background: rgba(64, 65, 79, 0.3);
    border-radius: 6px;
    border-left: 3px solid #10a37f;
}

.image-prompt {
    color: #ececf1;
    font-size: 14px;
    margin-bottom: 8px;
}

.image-prompt strong {
    color: #10a37f;
}

.image-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.download-btn,
.open-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #10a37f;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s ease;
}

.download-btn:hover,
.open-btn:hover {
    background: #0d8a6b;
}

.download-btn i,
.open-btn i {
    font-size: 11px;
}

/* ===== ENHANCED CUSTOM SCROLLBARS ===== */

/* Code blocks and pre elements */
pre, code {
    scrollbar-width: thin;
    scrollbar-color: #014d39 #2a2b3200;
}

pre::-webkit-scrollbar,
.message-text pre::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

pre::-webkit-scrollbar-track,
.message-text pre::-webkit-scrollbar-track {
    background: rgba(42, 43, 50, 0.5);
    border-radius: 2px;
}

pre::-webkit-scrollbar-thumb,
.message-text pre::-webkit-scrollbar-thumb {
    background: rgba(86, 88, 105, 0.8);
    border-radius: 2px;
    transition: all 0.2s ease;
}

pre::-webkit-scrollbar-thumb:hover,
.message-text pre::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 109, 122, 1);
}

pre::-webkit-scrollbar-corner,
.message-text pre::-webkit-scrollbar-corner {
    background: rgba(42, 43, 50, 0.5);
}

/* Sidebar elements */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(32, 33, 35, 0.3);
    border-radius: 2px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(86, 88, 105, 0.6);
    border-radius: 2px;
    transition: all 0.2s ease;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 109, 122, 0.8);
}

/* Any other scrollable containers */
.scrollable,
.overflow-auto,
.overflow-y-auto,
.overflow-x-auto {
    scrollbar-width: thin;
    scrollbar-color: #014d39 #2a2b3200;
}

.scrollable::-webkit-scrollbar,
.overflow-auto::-webkit-scrollbar,
.overflow-y-auto::-webkit-scrollbar,
.overflow-x-auto::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.scrollable::-webkit-scrollbar-track,
.overflow-auto::-webkit-scrollbar-track,
.overflow-y-auto::-webkit-scrollbar-track,
.overflow-x-auto::-webkit-scrollbar-track {
    background: rgba(42, 43, 50, 0.4);
    border-radius: 3px;
}

.scrollable::-webkit-scrollbar-thumb,
.overflow-auto::-webkit-scrollbar-thumb,
.overflow-y-auto::-webkit-scrollbar-thumb,
.overflow-x-auto::-webkit-scrollbar-thumb {
    background: rgba(86, 88, 105, 0.7);
    border-radius: 3px;
    transition: all 0.2s ease;
}

.scrollable::-webkit-scrollbar-thumb:hover,
.overflow-auto::-webkit-scrollbar-thumb:hover,
.overflow-y-auto::-webkit-scrollbar-thumb:hover,
.overflow-x-auto::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 109, 122, 0.9);
}
@media (max-width: 1060px) {
	.message-wrapper {
		padding: 0px 20px;
	}
}
/* Mobile responsive design */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1000;
        width: 260px !important;
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    /* On mobile, ignore collapsed state - always use open/close */
    .sidebar.collapsed {
        width: 260px !important;
        transform: translateX(-100%);
    }
    
    .sidebar.collapsed.open {
        transform: translateX(0);
    }
    
    /* Reset collapsed styles on mobile */
    .sidebar.collapsed .sidebar-header {
        padding: 16px;
        flex-direction: row;
        gap: 8px;
    }
    
    .sidebar.collapsed .sidebar-header span,
    .sidebar.collapsed .history-section h3,
    .sidebar.collapsed .history-item span,
    .sidebar.collapsed .user-info span {
        display: block;
    }
    
    .sidebar.collapsed .new-chat-btn {
        width: auto;
        height: auto;
        padding: 12px 16px;
        flex: 1;
    }
    
    .sidebar.collapsed .sidebar-toggle {
        display: flex;
        width: 40px;
        height: 40px;
        padding: 0;
    }
    
    .sidebar.collapsed .history-item {
        width: auto;
        height: auto;
        padding: 12px 8px;
        margin: 0;
        justify-content: flex-start;
    }
    
    .sidebar.collapsed .user-info {
        padding: 8px;
        justify-content: flex-start;
    }
    
    .sidebar.collapsed .chat-history {
        padding: 16px;
    }
    
    .chat-container {
        width: 100%;
    }
    
    .chat-header {
        padding: 12px 16px;
    }
    
    .chat-header .header-content {
        padding: 0;
    }
    
    .mobile-menu-btn {
        display: flex;
        width: 40px;
        height: 40px;
        background: transparent;
        border: 1px solid #10a37f;
        color: #10a37f;
        border-radius: 4px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        margin-right: 12px;
    }
    
    .message {
        padding: 20px 0;
    }
    
    .message-wrapper {
        padding: 0 16px;
        gap: 12px;
    }
    
    .message-avatar {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .message-text {
        font-size: 15px;
    }
    
    .chat-input-container {
        padding: 15px;
    }
    
    .input-wrapper {
        padding: 10px;
    }
}
@media (max-width: 960px) {
	.message-wrapper {
		max-width: 600px;
	}
}
@media (max-width: 769px) {
	.message-wrapper {
		max-width: 769px;
	}
}
@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none;
    }
}
@media (max-width: 400px) {
	.bot-info {
		display: none;
	}
}

/* Modern mobile fixes */
@media (max-width: 768px) {
    .chat-input-container {
        position: sticky;
        bottom: 0;
        background: #044333;
        border-top: 1px solid #10a37f;
        background-image: url(/dir/bg.png);
        background-size: cover;
        padding-bottom: calc(15px + env(safe-area-inset-bottom));
    }
    
    .input-wrapper textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .chat-messages {
        -webkit-overflow-scrolling: touch;
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #343541;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #565869;
    border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Code block wrapper and copy button styles */
.code-block-wrapper {
    position: relative;
    margin: 12px 0;
}

.code-block-wrapper pre {
    margin: 0;
    padding: 5px;
    background: #1e1e1ec7;
    border: 1px solid #10a37f63;
    border-radius: 8px;
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
    line-height: 1.5;
    color: #d4d4d4;
}

.copy-code-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: 1px solid #10a37fa8;
    color: #10a37f;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.copy-code-btn:hover {
    background: #111;
    opacity: 1;
}

.copy-code-btn.copied {
    background: #10a37fa8;
    color: white;
}

.copy-code-btn.error {
    background: #ef4444;
    color: white;
}

.copy-code-btn i {
    font-size: 11px;
}
.message-text img {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 10px;
}
.message-text a {
    text-decoration: none;
}

/* Weather Widget Styles */
.thoitiet {
    padding: 15px;
    color: #fff;
    border-radius: 10px;
    font-family: arial;
    line-height: 1.5;
    border: 1px solid #10a37f8f;
    background: #11111196;
	max-width:500px;
}
.thoitiet img{width:auto !important; margin:0px !important}
#otiet{
	background:#142f288a;
	padding:10px;
	width:100%;
	border:none;
	height:40px;
	border-radius: 7px 0px 0px 7px;
	color:#fff;
}
.searchtiet {
    display: flex;
    margin-bottom: 20px;
}
#timtiet{
	background:#044333;
	font-weight:bold;
	border:none;
	color:#fff;
	height:40px;
	width:80px;
	border-radius: 0px 7px 7px 0px;
}
.city{
	font-size:25px;
	margin-bottom:10px;
}
.temp{
	font-size:30px;
	font-weight:bold;
	color:#10a37f;
}
.bgmain{
	display:flex;
	align-items: center;
}
.bgfor {
    background: #04433369;
    padding: 10px;
    border-radius: 7px;
    border: 1px solid #19852138;
	display: flex;
    gap: 10px;
}
.weather-widget-container .may {
    width: 50px;
    height: 50px;
	margin:0px;
    margin-right: 10px;
}
.weather-error {
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid #ff6b6b;
    border-radius: 7px;
    color: #ff6b6b;
}

/* Styles cho dự báo 3 ngày */
.forecast-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}
@media (max-width: 700px) {
	.forecast-container {
		grid-template-columns: 1fr;
	}
}
.forecast-day {
	background: #04433340;
	border: 1px solid #19852130;
	border-radius: 10px;
	padding: 15px;
	transition: transform 0.2s ease, background 0.2s ease;
}
.forecast-day:hover {
	transform: translateY(-2px);
	background: #04433360;
}
.forecast-date {
	font-size: 16px;
	font-weight: bold;
	color: #10a37f;
}
.forecast-main {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.forecast-icon {
	width: 40px;
	height: 40px;
}
.forecast-temp {
	font-size: 24px;
	font-weight: bold;
	color: #fff;
}

.forecast-desc {
	font-size: 14px;
	color: #ccc;
	text-transform: capitalize;
}
.forecast-details {
	display: flex;
	gap: 15px;
	font-size: 12px;
	color: #aaa;
	margin-top: 8px;
}
.weather-error {
	margin-top: 10px;
	padding: 10px;
	background: rgba(255, 107, 107, 0.1);
	border: 1px solid #ff6b6b;
	border-radius: 7px;
	color: #ff6b6b;
}

/* Loading animation */
.weather.loading {
	position: relative;
}

.weather.loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	border: 2px solid transparent;
	border-top: 2px solid #10a37f;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	transform: translate(-50%, -50%);
}

@keyframes spin {
	0% { transform: translate(-50%, -50%) rotate(0deg); }
	100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Table container for horizontal scroll */
.message .table-container {
  overflow-x: auto;
  margin: 8px 0;
  border-radius: 8px;
}

/* Table styling - Dark Mode */
.message .table-container table {
  width: 100%;
  min-width: 600px; /* Minimum width before scrolling */
  border-collapse: separate;
  border-spacing: 0;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, "Consolas", "Liberation Mono", monospace;
  font-size: 13px;
  background: transparent;
}

/* Head row - Dark Mode */
.message .table-container table thead th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 13px;
  color: #e4e7eb;
  background: #04433352;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Body cells - Dark Mode */
.message .table-container table tbody td,
.message .table-container table tbody th {
  padding: 10px 12px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e4e7eb;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  background: #cccccc0d;
}

/* Last row no border */
.message .table-container table tbody tr:last-child td {
  border-bottom: 0;
}

/* Rounded corners for table */
.message .table-container table thead th:first-child { border-top-left-radius: 8px; }
.message .table-container table thead th:last-child  { border-top-right-radius: 8px; }
.message .table-container table tbody tr:last-child td:first-child { border-bottom-left-radius: 8px; }
.message .table-container table tbody tr:last-child td:last-child  { border-bottom-right-radius: 8px; }

/* Hover highlight - Dark Mode */
.message .table-container table tbody tr:hover {
  background: #252831;
}

/* Responsive table for small screens */
@media (max-width: 640px) {
  .message .table-container table { min-width: 500px; } /* Smaller min-width on mobile */
  .message .table-container table tbody td { white-space: normal; }
  
  /* Custom scrollbar for webkit browsers */
  .message .table-container::-webkit-scrollbar {
    height: 6px;
  }
  
  .message .table-container::-webkit-scrollbar-track {
    background: #1a1d23;
    border-radius: 3px;
  }
  
  .message .table-container::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 3px;
  }
  
  .message .table-container::-webkit-scrollbar-thumb:hover {
    background: #505050;
  }
}
/* Widget am lich */
.amlichv {
  border-collapse: collapse;
  font-size: 14px;
  border: 1px solid #10a37f8f;
  background: #11111196;
  padding: 15px;
  border-radius: 7px;
  max-width:500px;
}

.calendar { 
  font-size: 12px; 
}

.calendar-month {
  background-color: #04433352;
  padding: 6px; 
  font-weight: bold; 
  text-transform: uppercase;
  font-size: 18px !important;
  border-radius: 7px 7px 0px 0px;
  color: #fff;
}

table.calendar {
  border-radius: 10px;
  margin-bottom: 10px;
  background: #3838389c;
}

table.calendar tr td {
  padding: 10px;
}

.amlich-tennam {
  text-align: center;
  font-weight: bold;
  font-size: 14px;
}
td.calendar-b-left {
    color: #f37979cc;
}
.amlich .calendar-month,
.amlich .calendar-b-left,
.amlich .calendar-b-right { 
  text-align: center;
  font-size: 13px; 
}

.amlich .calendar-day { 
  text-align: center; 
  font-weight: bold;
  font-size: 20px;
  color: #10a37f;
}

.amlich .calendar-day .day-num { 
  font-size: 80px;
  line-height: 100%; 
  color: #10a37f;
}

.amlich .lunar-day-num { 
  font-size: 44px; 
  line-height: 100%; 
  font-weight: bold;
}

.amlich .calendar-holiday,
.amlich .calendar-hoangdao {
  font-size: 13px; 
  text-align: center; 
}

.amlich .calendar-holiday { 
  color: #ff8b68; 
  font-weight: bold; 
}

.amlich a { 
  text-decoration: none;
}

.amlich .tenthang,
.amlich .navi-l,
.amlich .navi-r {
  text-align: center;
  padding: 6px;
  background-color: #3838389c;
  color: #10a37f;
  font-weight: bold;
}

.amlich .navi-l { 
  font-size: 13px;
  border-radius: 7px 0px 0px 7px;
}

.amlich .navi-r { 
  font-size: 13px;
  border-radius: 0px 7px 7px 0px;
}

.amlich .ngaytuan {
  text-align: center;
  border-bottom: 1px solid #10a37f;
  color: #10a37f;
  padding: 3px;
  width: 14.286%;
  font-size: 13px; 
  font-weight: bold;
}

.amlich .ngaythang,
.amlich .homnay,
.amlich .tet,
.amlich .leam,
.amlich .leduong {
  cursor: pointer;
  padding: 3px;
  width: 14.286%;
}

.amlich .ngaythang div,
.amlich .homnay div,
.amlich .tet div,
.amlich .leam div,
.amlich .leduong div { 
  line-height: 110%; 
}

.amlich tr:nth-child(odd) td.ngaythang:nth-child(odd) { 
  background-color: #3838389c; 
}

.amlich tr:nth-child(odd) td.ngaythang:nth-child(even) { 
  background-color: #000000c2; 
}

.amlich tr:nth-child(even) td.ngaythang:nth-child(odd) { 
  background-color: #000000c2; 
}

.amlich tr:nth-child(even) td.ngaythang:nth-child(even) { 
  background-color: #1a1a1a; 
}

.amlich .homnay {
  border: 2px solid #10a37f;
  background: #014d39;
}

.amlich .tet {
  border-bottom: 2px solid #ff7777;
}

.amlich .leam {
  border-bottom: 2px solid #0c0;
}

.amlich .leduong {
  border-bottom: 2px solid #00aabb;
}

.amlich .am { 
  text-align: right; 
  font-size: 75%; 
  color: #ccc;
}

.amlich .am2 { 
  text-align: right; 
  font-size: 75%; 
  color: #0c0; 
  font-weight: bold; 
}

.amlich .t2t6 { 
  text-align: left;
  font-weight: bold; 
}

.amlich .t7 { 
  font-weight: bold; 
  text-align: left; 
  color: #00aabb; 
}

.amlich .cn { 
  font-weight: bold; 
  text-align: left; 
  color: #00cc00;
}
td#selyel {
    background: #00513c;
    border: 1px solid #10a37f;
    color: #fff;
}
span.lunar-month-name {
    font-size: 17px;
}
.pu-date{
	display:none; 
	position:absolute; 
	left:50%; top:100%; 
	transform:translateX(-50%);
	border-radius:7px; 
	background:#2b2b2b; 
	border:1px solid #18c59b80; 
	padding:8px; 
	z-index:1000; 
	box-shadow:0 2px 10px rgba(0,0,0,0.12); 
	white-space:nowrap;
}
.pu-date select, .pu-date button{
	padding: 3px 8px;
    height: 30px;
    border: 1px solid #18c59b;
    color: #fff;
    border-radius: 5px;
    background: #111;
}
.pu-date button{
	display:block;
	margin-top:10px;
	width:100%;
	background: #044333;
}
/* chat nhanh */
.quick-actions {
    margin-top: 10px;
}
span.chatfix {
    cursor: pointer;
	border: 1px solid #10a37f54;
    padding: 5px 10px;
    border-radius: 7px;
    display: inline-block;
    margin-top: 5px;
    margin-right: 3px;
    font-size: 14px;
}
span.chatfix i{width:20px;}
span.chatfix:hover{
	background:#111;
	border: 1px solid #10a37f;
}
/* nut mua */
.foxmua {
    color: #fff !important;
    display: inline-block;
    border: 1px solid #10a37f7a;
    background: #11111194;
    font-size: 14px;
    border-radius: 7px;
    padding: 5px 20px;
    text-align: center;
}
/* tao ma qr bank */
.foxcontainer {
  border: 1px solid #10a37f8f;
  background: #11111196;
  padding: 15px;
  border-radius: 7px;
  max-width:500px;
}
.foxcontainer label { 
  display: block; 
  margin-top: 15px; 
}
.foxcontainer label i{width:25px;}
.foxcontainer label:first-child{margin-top:0px;}
.foxcontainer input, .foxcontainer select, .foxcontainer button {
    padding: 12px;
    margin-top: 8px;
    width: 100%;
    max-width: 100%;
    border: 1px solid #10a37f61;
    background: #00271d4a;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
	color: #fff;
	height:40px;
}
.foxcontainer select option {
    background: #222;
    padding: 10px;
}
.foxcontainer input:focus, .foxcontainer select:focus {
  outline: none;
  border-color: #10a37f;
}
.foxcontainer button {
  background-color: #10a37f;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: bold;
  margin-top: 15px;
  transition: background-color 0.3s;
}
.foxcontainer button:hover {
  opacity:0.6;
}
.foxcontainer #qr-img { 
  text-align: center;
}
.foxcontainer #qr-img img {
    max-width: 100%;
    border-radius: 5px;
    margin-top: 15px;
}
.foxcontainer .amount-display {
    font-size: 14px;
    color: #46b599;
    margin-top: 5px;
}
.foxcontainer .template-selection {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.foxcontainer .template-option {
    border: 2px solid #10a37f36;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.foxcontainer .template-option:hover {
  background: #014d39c7;
  border-color: #10a37f;
}
.foxcontainer .template-option.selected {
  background: #014d39c7;
  border-color: #10a37f;
}
.foxcontainer .template-option strong {
  display: block;
}
.foxcontainer .foxdownload-btn {
  background-color: #2196F3;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  margin-top: 15px;
  transition: background-color 0.3s;
}
.foxcontainer .download-btn:hover {
  background-color: #1976D2;
}
.foxcontainer .qr-result {
  text-align: center;
}
.foxcontainer .qr-info {
    font-size: 14px;
    padding: 15px;
    background: #0149368c;
    border-radius: 5px;
}
/* sos */
.sos {
    padding: 15px;
    display: grid;
    gap: 15px;
    border: 1px solid #10a37f8f;
    background: #11111196;
    border-radius: 7px;
    margin-top: 10px;
    max-width: 250px;
}
.sos a {
    display: block;
    color: #fff;
    text-transform: uppercase;
    font-weight: bold;
	border-radius:5px;
	padding:5px 15px;
}
.sos a i{width:34px}
.sos a:nth-child(1) {
    background: #00cc5266;
}
.sos a:nth-child(2) {
    background: #65778d9e;
}
.sos a:nth-child(3) {
    background: #cc4b0091;
}
.sos a:nth-child(4) {
    background: #4736cf9c;
}
.sos a:hover {
    color:#ccc;
}
/* host */
.fhost{
	padding: 15px;
    display: grid;
	grid-template-columns: 1fr 1fr;
    gap: 10px;
    border: 1px solid #10a37f8f;
    background: #11111196;
    border-radius: 7px;
    margin-top: 10px;
    max-width: 600px;
}
@media (max-width: 700px) {
	.fhost{grid-template-columns: 1fr;}
}
.fhost div{
    display: grid;
    gap: 10px;
}
.fhost a {
    display: block;
    color: #fff;
	border-radius:5px;
	padding:8px 15px;
	background: #cccccc14;
}
.fhost a i{width:34px}
/* maps */
.showmap{
	border: 1px solid #10a37f8f;
    background: #11111196;
    border-radius: 7px;
    padding:15px;
    border-radius:7px;
    max-width:500px;
}
.showmap iframe { 
	width: 100%; 
    height: 500px; 
    border: 0; 
    margin-top: 15px; 
    border-radius:5px;
	margin-bottom: -5px;
}
.showmap-in{
	display:flex;
    gap:10px;
}
.showmap-in input, .showmap-in button{
	height:30px;
	border-radius:5px;
    padding: 3px 10px;
}
.showmap-in input {
    width: 100%;
    background: #00271d99;
    border: 1px solid #18c59b4a;
    color: #fff;
}
.showmap-in button {
    width: 60px;
    background: #055d47;
    border: none;
    color: #fff;
    font-weight: bold;
}
/* coin */
.coin-container {
	margin-bottom:20px;
	border: 1px solid #10a37f8f;
	background: #11111196;
	color:#fff;
	border-radius: 10px;
	font-size:12px;
}

.coin-header {
	padding: 20px;
	border-bottom: 1px solid #18c59b8a;
}

.coin-header h2 {
	font-size: 20px;
	margin: 0px !important;
}

.coin-header h2 i{
	margin-right: 10px;
	color: #18c59b;
}

.coin-header p {
	font-size: 1.1em;
	opacity: 0.9;
}

.coin-controls {
	padding: 20px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 15px;
	background: #014d3930;
	border-bottom: 1px solid #18c59b30;
}

.coin-search-container {
	position: relative;
	flex: 1;
	min-width: 200px;
}

.coin-search-input {
	width: 100%;
	padding: 12px 45px 12px 15px;
	background: #02100d99;
	border-radius: 7px;
	height: 40px;
	border:none;
	color:#fff;
}

.coin-search-input:hover {
	outline: none;
}

.coin-refresh-btn {
	background: #044333;
	color: white;
	border: none;
	padding: 12px 25px;
	border-radius: 7px;
	cursor: pointer;
	font-weight: bold;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	height: 40px;
}
.coin-last-updated {
	font-size: 14px;
	font-style: italic;
	padding: 10px 0px;
	text-align: center;
}

.coin-table-wrapper {
	overflow-x: auto;
	padding: 0 20px 20px;
	max-width: 100%;
	border-radius: 10px;
}

.coin-table-container {
	overflow-x: auto;
	overflow-y: hidden;
	border-radius: 10px;
	min-width: 100%;
}

.coin-crypto-table {
	width: 100%;
	min-width: 800px;
	border-collapse: collapse;
	margin-top: 0;
	position: relative;
}

.coin-crypto-table th {
	padding: 10px 0px;
	text-align: left;
	font-weight: bold;
	color: #18c59b;
	border-bottom: 1px solid #18c59b30;
	border-top: 1px solid #18c59b30;
	cursor: pointer;
	user-select: none;
}

.coin-crypto-table th:hover {
	opacity: 0.6;
}

.coin-crypto-table th.coin-sortable::after {
	content: ' ⇅';
	opacity: 0.5;
	margin-left: 5px;
}

.coin-crypto-table th.coin-sort-asc::after {
	content: ' ↑';
	opacity: 1;
}

.coin-crypto-table th.coin-sort-desc::after {
	content: ' ↓';
	opacity: 1;
}

.coin-crypto-table td {
	padding: 15px 0px;
	transition: all 0.3s ease;
}

.coin-crypto-table tr {
	transition: all 0.3s ease;
}

.coin-crypto-table tr:hover {
	opacity: 0.6;
}

.coin-info {
	display: flex;
	align-items: center;
	gap: 12px;
}

.coin-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #757575;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #2a2b32;
    font-size: 12px;
}

.coin-name {
	font-weight: bold;
	color: #18c59b;
}

.coin-symbol {
	font-size: 0.9em;
	text-transform: uppercase;
}

.coin-price {
	font-weight: 600;
	font-size: 1.1em;
}

.coin-change-positive {
	color: #22c55e;
	font-weight: 600;
}

.coin-change-negative {
	color: #ef4444;
	font-weight: 600;
}

.coin-market-cap, .coin-volume {
	font-weight: 500;
}

.coin-loading {
	text-align: center;
	padding: 40px;
	font-size: 1.2em;
}

.coin-loading::after {
	content: '';
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 2px solid #222;
	border-top: 2px solid #18c59b;
	border-radius: 50%;
	margin-left: 10px;
	animation: coin-spin 1s linear infinite;
}

@keyframes coin-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.coin-error {
	text-align: center;
	padding: 40px;
	color: #ef4444;
	font-size: 1.2em;
	background: rgba(239, 68, 68, 0.1);
	border-radius: 10px;
	margin: 20px;
}

.coin-search-prompt {
	text-align: center;
	padding: 40px 20px;
	color: #18c59b;
	opacity: 0.7;
	font-size: 1.1em;
}

.coin-no-results {
	text-align: center;
	padding: 40px 20px;
	color: #18c59b;
	opacity: 0.7;
	font-size: 1em;
}

@media (max-width: 768px) {
	.coin-header h1 {
		font-size: 2em;
	}

	.coin-crypto-table {
		font-size: 0.9em;
		min-width: 650px;
	}

	.coin-crypto-table th,
	.coin-crypto-table td {
		padding: 10px 6px;
	}

	.coin-info {
		gap: 8px;
	}

	.coin-logo {
		width: 28px;
		height: 28px;
	}

	.coin-table-wrapper {
		padding: 0 15px 15px;
	}
}

