@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #6366f1;       /* Tím xanh hiện đại */
    --primary-dark: #4f46e5;
    --secondary: #ec4899;     /* Hồng tạo điểm nhấn */
    --bg: #f8fafc;
    --surface: #ffffff;
    --text-main: #1e293b;
    --text-sub: #64748b;
    --border: #e2e8f0;
    --radius: 16px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    margin: 0;
    line-height: 1.6;
}

/* --- THANH ĐIỀU HƯỚNG (NAVBAR) --- */
.navbar {
    background: var(--surface);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between; /* Đẩy Logo sang trái, Menu sang phải */
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    display: flex;
    gap: 15px;
}

.nav-btn {
    text-decoration: none;
    color: var(--text-sub);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-btn:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.nav-btn.active {
    background: #e0e7ff;
    color: var(--primary);
}

/* --- CONTAINER CHÍNH --- */
.container {
    max-width: 800px;
    margin: 30px auto;
    padding: 0 20px;
}

/* --- CARDS & ITEMS --- */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border: 1px solid var(--border);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* --- DANH SÁCH TRUYỆN (GRID) --- */
.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.story-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-main);
}

/* --- NÚT BẤM (BUTTONS) --- */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    display: block;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    transition: opacity 0.2s;
}

.btn-primary:hover { opacity: 0.95; }

.btn-secondary {
    background: white;
    border: 1px solid var(--border);
    color: var(--text-sub);
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

/* --- INPUTS --- */
input, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 15px;
    font-family: inherit;
    box-sizing: border-box;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* --- BADGES --- */
.badge {
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-sub);
    font-weight: 600;
}

/* --- PART LIST --- */
.part-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.part-item {
    background: #f8fafc;
    border: 1px solid var(--border);
    padding: 12px 5px;
    text-align: center;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.9rem;
}

.part-item:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* --- SEARCH BOX --- */
.search-box {
    display: flex;
    gap: 10px;
    background: white;
    padding: 10px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
}

.search-box input {
    border: none;
    background: transparent;
    padding: 10px;
    margin: 0;
    font-size: 1rem;
    flex-grow: 1;
}

.search-box input:focus {
    box-shadow: none;
}

.search-box button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.search-box button:hover {
    background: var(--primary-dark);
}

/* --- FOOTER --- */
.footer {
    background: white;
    margin-top: 50px;
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap; /* Tự xuống dòng trên đt nhỏ */
}

.footer-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s;
    color: white !important; /* Bắt buộc chữ trắng */
}

.btn-discord { background: #5865F2; }
.btn-discord:hover { background: #4752C4; box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4); }

.btn-ytb { background: #FF0000; }
.btn-ytb:hover { background: #CC0000; box-shadow: 0 4px 12px rgba(255, 0, 0, 0.4); }

.footer-btn:hover { transform: translateY(-3px); }

/* --- NÚT CHAT TRÒN (FLOATING) --- */
.floating-chat {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00B2FF 0%, #006AFF 100%); /* Màu Messenger */
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 106, 255, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.3s;
}

.floating-chat:hover { transform: scale(1.1) rotate(10deg); }

.floating-chat svg {
    width: 32px;
    height: 32px;
    fill: white;
}

/* --- SUPPORT MENU (MỚI) --- */
.support-menu {
    display: none; /* Mặc định ẩn */
    position: fixed;
    bottom: 100px; /* Cách nút tròn một đoạn */
    right: 30px;
    width: 300px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    z-index: 10000;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
    animation: slideUp 0.3s ease;
}

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

.support-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 15px;
    font-weight: 600;
    text-align: center;
}

.support-content {
    padding: 10px;
}

.support-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    text-decoration: none;
    color: var(--text-main);
    border-radius: 12px;
    transition: background 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

.support-item:last-child { border-bottom: none; }

.support-item:hover {
    background: #f8fafc;
}

/* Chỉnh lại nút tròn một chút cho khớp */
.floating-chat {
    background: var(--primary); /* Dùng màu chủ đạo của web cho đồng bộ */
    color: white;
    /* Các thuộc tính cũ giữ nguyên */
}