:root {
    --bg-color: #15202B;
    --text-color: #FFFFFF;
    --hover-bg: rgba(255, 255, 255, 0.03);
    --border-color: #37444B;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.post:hover {
    background-color: var(--hover-bg);
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.post-actions a {
    color: var(--text-color);
    opacity: 0.7;
    transition: opacity 0.2s;
}

.post-actions a:hover {
    opacity: 1;
    color: #1D9BF0;
}

.post-actions .social-link.x {
    font-weight: bold;
    text-decoration: none;
}

.post-actions .social-link.x:hover {
    text-decoration: underline;
    color: #1D9BF0;
}

header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.loading {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

#searchToggle, #scrollTop, #refreshBtn {
    cursor: pointer;
}

#searchToggle:focus, #scrollTop:focus, #refreshBtn:focus {
    outline: 2px solid #1D9BF0;
    outline-offset: 2px;
}

#scrollTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #1D9BF0;
    color: white;
    border-radius: 50%;
    padding: 10px;
    display: none;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
}

#scrollTop.visible {
    opacity: 1;
    display: block;
}

#scrollTop:hover {
    background-color: #1A8CD8;
}

#searchBox {
    transition: all 0.3s;
}

#searchResults .post {
    background-color: #1E2A3A;
    margin-bottom: 10px;
    border-radius: 8px;
}

/* Toastify override */
.Toastify__toast {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Thêm vào style.css */

/* Can ch?nh container và padding */
.container {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (max-width: 640px) {
    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* T?i uu hóa form và input */
input[type="text"] {
    width: 100%;
    box-sizing: border-box;
}

button, a {
    -webkit-tap-highlight-color: transparent; /* Lo?i b? highlight khi nh?n trên mobile */
}

/* Tang kích thu?c vùng nh?n cho nút và liên k?t */
a, button {
    touch-action: manipulation;
    min-height: 44px; /* Ðáp ?ng tiêu chu?n accessibility trên mobile */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Responsive typography */
h1 {
    font-size: 1.5rem;
}

@media (min-width: 640px) {
    h1 {
        font-size: 1.875rem;
    }
}

/* Tùy ch?nh b?ng cho desktop */
table {
    width: 100%;
    table-layout: auto;
}

table th,
table td {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Card layout cho mobile */
.md\:hidden .bg-gray-700 {
    transition: background-color 0.2s;
}

.md\:hidden .bg-gray-700:hover {
    background-color: #374151; /* hover effect cho card */
}

/* Pagination responsive */
.mt-6 a {
    min-width: 2rem;
    text-align: center;
}