/* --- Cài đặt font chữ và các thiết lập chung --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Lato:ital,wght@0,400;0,700;1,400&display=swap');

@font-face {
  font-family: 'ArcadeAmong';
  src: url('/fonts/arcade-among-2.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* --- Bảng màu Dark Mode --- */
:root {
    --dark-bg: #282c34;       /* Màu nền chính */
    --dark-bg-alt: #21252b;   /* Màu nền phụ cho bài viết */
    --light-text: #abb2bf;    /* Màu chữ chính */
    --title-text: #ffffff;    /* Màu chữ cho tiêu đề */
    --link-color: #61afef;    /* Màu cho liên kết */
    --border-color: #3e4451;  /* Màu cho đường viền */
}

body {
    font-family: 'ArcadeAmong', sans-serif;
    font-size: 1.5em;
    line-height: 1.5;
    background-color: var(--dark-bg);
    color: var(--light-text);
    margin: 0;
    padding: 0;
}

h1, h2, h3 {
    font-family: 'ArcadeAmong', sans-serif;
    font-weight: 700;
    color: var(--title-text);
}

.container {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 15px;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #fff;
    text-decoration: underline;
}

/* --- Phần Header (Đầu trang) --- */
.site-header {
    background-color: #343a40;
    color: white;
    padding: 0.5rem 0;
    text-align: center;
}

.site-header h1 {
    margin: 0;
    font-size: 100px !important;
}

.site-header p {
    font-size: 1.1rem;
    font-style: italic;
    font-size: 36px !important;
    margin-top: 0.1rem;
    margin-bottom: 0;
    line-height: 1.2;
}

.highlight-name {
    /* Tạo dải màu gradient */
    background: linear-gradient(90deg, #61afef, #56d0c4); 
    /* Áp dụng gradient làm màu cho chữ */
    -webkit-background-clip: text;
    background-clip: text;
    /* Làm cho màu chữ gốc trở nên trong suốt */
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    font-style: normal;
}

/* --- Phần Navigation (Menu) --- */
/* Bố cục nav: avatar trái, menu phải */
.site-nav .container,
.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Avatar nhỏ */
.nav-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: transform 0.2s ease;
    margin-top: 0.6rem;
}

.nav-avatar:hover img {
    transform: scale(1.1);
}

/* Link menu bên phải */
.nav-links a {
    color: white;
    padding: 0.5rem 1rem;
    font-family: 'ArcadeAmong', sans-serif;
    font-size: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    background-color: #56d0c4;
    color: black;
    box-shadow: 2px 2px 0 #000;
    border-radius: 0;
}

.site-nav {
    background-color: #495057;
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

/* --- Phần Nội dung chính & Sidebar --- */
.main-content-area {
    display: flex;
    margin-top: 2rem;
}

.main-content {
    flex: 3;
    margin-right: 2rem;
}

.sidebar {
    flex: 1;
}

/* --- Bài viết (Article) --- */
.post {
    background-color: var(--dark-bg-alt); /* Đổi nền bài viết */
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color); /* Thay box-shadow bằng border */
}

.post-title {
    font-family: 'ArcadeAmong', sans-serif;
    margin-top: 0;
    font-size: 3rem;
    line-height: 1.1;            /* Ép chiều cao dòng thấp xuống */
    margin-bottom: 0.2rem;  
}

.post-meta {
    color: #9da5b4;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.post-excerpt img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 0.1rem;
}

.read-more-btn {
    display: inline-block;
    background-color: #56d0c4;
    color: var(--dark-bg-alt);
    padding: 10px 20px;
    border-radius: 5px;
    font-family: 'ArcadeAmong', sans-serif;
    font-weight: 700;
    transition: background-color 0.3s;
}

.read-more-btn:hover {
    background-color: #fff;
    color: var(--dark-bg);
    text-decoration: none;
}

/* --- Sidebar Widget --- */
.widget {
    background-color: var(--dark-bg-alt); /* Đổi nền widget */
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color); /* Thay box-shadow bằng border */
}

.widget-title {
    margin-top: 0;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget li {
    margin-bottom: 0.5rem;
}

/* --- Footer (Chân trang) --- */
.site-footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    background-color: var(--dark-bg-alt);
    color: var(--light-text);
    border-top: 1px solid var(--border-color);
}

/* --- Thiết lập cho màn hình nhỏ (điện thoại) --- */
@media (max-width: 768px) {
    .main-content-area {
        flex-direction: column;
    }

    body {
        font-size: 20px;
    }

    .main-content {
        margin-right: 0;
    }
}

.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 14px;
    margin: 2px;
    font-family: 'ArcadeAmong', sans-serif;
    font-size: 24px;
    letter-spacing: 1px;

    background-color: transparent;
    color: #56d0c4;
    text-decoration: none;

    border: none;             /* Bỏ viền */
    border-radius: 0;         /* Vuông góc pixel-style */
}

.pagination a.active {
    background-color: #56d0c4;
    color: black;
    font-weight: bold;
    pointer-events: none;
}

.pagination span {
    color: #888;
}

.pagination a:hover {
    background-color: #56d0c4;
    color: black;
    box-shadow: 2px 2px 0px #000;
}
