:root {
    --bg: #f0f2f5; 
    --card-bg: #ffffff;
    --text: #111111;
    --primary: #00aa13; 
    --secondary: #ee2737; 
    --accent: #ffcd05; 
    --border: 2px solid #111;
    --shadow: 4px 4px 0px #111;
    --shadow-hover: 6px 6px 0px #111;
    --font-main: 'Lexend', sans-serif;
    --font-hand: 'Permanent Marker', cursive;
}

body {
    margin: 0; font-family: var(--font-main);
    background-color: var(--bg); color: var(--text);
    overflow-x: hidden; padding-bottom: 100px;
    font-size: 15px; line-height: 1.5;
}

.container { width: 94%; max-width: 1000px; margin: 0 auto; padding: 20px 0; }

/* HERO */
.hero-box {
    background: #fff; border: var(--border); box-shadow: var(--shadow);
    padding: 30px; border-radius: 16px; margin: 20px;
    text-align: center; position: relative; overflow: hidden;
}
.hero-title { font-size: 2.5rem; font-weight: 800; margin: 0; letter-spacing: -1px; text-transform: uppercase; }
.hero-title .highlight { color: var(--primary); font-family: var(--font-hand); }
.hero-subtitle { color: #555; font-size: 1.1rem; margin-top: 10px; margin-bottom: 20px; }
.btn-hero {
    background: var(--text); color: #fff; border: none;
    padding: 12px 30px; font-family: var(--font-main); font-weight: 600;
    border-radius: 50px; cursor: pointer; transition: 0.2s; font-size: 1rem;
}
.btn-hero:hover { background: var(--primary); transform: scale(1.05); }

/* STICKERS */
.sticker { position: absolute; font-size: 2rem; opacity: 0.2; animation: float 3s infinite ease-in-out; }
.sticker-1 { top: 10px; left: 10px; }
.sticker-2 { bottom: 10px; right: 10px; animation-delay: 1.5s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* MARQUEE */
.marquee-container {
    background: var(--accent); border-top: var(--border); border-bottom: var(--border);
    padding: 8px 0; overflow: hidden; white-space: nowrap; margin-bottom: 30px;
    transform: rotate(-1deg); width: 102%; margin-left: -1%;
}
.marquee span { 
    display: inline-block; padding-left: 100%; animation: marquee 20s linear infinite; 
    font-weight: 800; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px;
}
@keyframes marquee { 0% { transform: translate(0, 0); } 100% { transform: translate(-100%, 0); } }

/* API GRID */
.group-container { margin: 20px; }
.group-title {
    font-family: var(--font-hand); font-size: 1.8rem; color: var(--text);
    margin-bottom: 15px; text-shadow: 2px 2px 0px #fff;
}
.api-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.api-card {
    background: #fff; border: var(--border); border-radius: 12px;
    padding: 20px; position: relative; transition: 0.2s;
    display: flex; flex-direction: column;
}
.api-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--primary); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.method-badge {
    padding: 4px 10px; border-radius: 20px; font-weight: 700; font-size: 0.75rem;
    text-transform: uppercase; border: 1.5px solid #000;
}
.method-GET { background: #d4f8d4; color: #005f00; } .method-POST { background: #d4ecf8; color: #003f5f; }
.api-path { font-size: 1.2rem; font-weight: 700; margin-bottom: 5px; word-break: break-all; }
.api-desc { font-size: 0.9rem; color: #666; margin-bottom: 15px; flex-grow: 1; }
.btn {
    width: 100%; padding: 10px 0; background: #fff; color: #000;
    font-weight: 700; border: 2px solid #000; border-radius: 8px;
    cursor: pointer; font-family: var(--font-main); transition: 0.1s;
}
.btn:hover { background: var(--text); color: #fff; }

/* BOTTOM DOCK */
.bottom-nav {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    background: #fff; border: var(--border); box-shadow: 0px 8px 16px rgba(0,0,0,0.15);
    display: flex; gap: 10px; padding: 10px 20px; border-radius: 50px; z-index: 1000;
}
.nav-item {
    text-decoration: none; color: #888; display: flex; flex-direction: column;
    align-items: center; font-size: 0.7rem; font-weight: 600;
    padding: 8px 16px; border-radius: 20px; transition: 0.2s;
}
.nav-item i { font-size: 1.2rem; margin-bottom: 3px; }
.nav-item:hover { color: #000; background: #f0f0f0; }
.nav-item.active { color: #fff; background: var(--primary); }

/* ABOUT PAGE */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; padding: 20px; }
.about-card { background: #fff; border: var(--border); border-radius: 12px; padding: 25px; box-shadow: var(--shadow); }
.intro-card { grid-column: 1 / -1; background: var(--accent); }
.handwritten { font-family: var(--font-hand); font-size: 2.5rem; }

/* MODAL & EXPLORER */
#explorer { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); z-index: 2000; backdrop-filter: blur(4px); }
.explorer-content {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 90%; max-width: 600px; background: #fff; border: 3px solid #000;
    border-radius: 16px; padding: 25px; box-shadow: 10px 10px 0 #000;
}
.ex-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.ex-title { margin: 0; font-family: var(--font-hand); background: var(--accent); padding: 5px 15px; border: 2px solid #000; transform: rotate(-2deg); }
.ex-close { background: var(--secondary); color: white; border: 2px solid #000; font-weight: bold; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; }

/* INPUTS */
textarea, input[type="text"] {
    width: 100%; padding: 12px; border: 2px solid #ddd; border-radius: 8px;
    background: #f9f9f9; font-family: 'Courier New', monospace; font-weight: 600;
    box-sizing: border-box; margin: 8px 0; transition: 0.2s;
}
textarea:focus, input:focus { border-color: var(--primary); background: #fff; outline: none; }

/* [MỚI] STYLE CHO KHUNG RESPONSE (LIST CUỘN ĐƯỢC) */
#ex-res {
    background: #1e1e1e; /* Màu nền đen console */
    color: #00ff00; /* Chữ xanh hacker */
    font-family: 'Courier New', monospace;
    font-weight: bold;
    padding: 15px;
    border: 3px solid #000;
    border-radius: 8px;
    margin-top: 10px;
    
    /* QUAN TRỌNG: Tạo thanh cuộn */
    max-height: 350px; /* Chiều cao tối đa */
    overflow-y: auto; /* Cuộn dọc */
    white-space: pre-wrap; /* Giữ format JSON nhưng tự xuống dòng nếu quá dài */
    
    box-shadow: inset 4px 4px 0px rgba(0,0,0,0.5); /* Đổ bóng vào trong tạo chiều sâu */
}

/* Tùy chỉnh thanh cuộn cho đẹp (Chrome/Safari) */
#ex-res::-webkit-scrollbar { width: 10px; }
#ex-res::-webkit-scrollbar-track { background: #333; border-radius: 0 8px 8px 0; }
#ex-res::-webkit-scrollbar-thumb { background: var(--primary); border: 2px solid #000; border-radius: 10px; }

/* TOAST NOTIFICATION */
#toast-container {
    position: fixed; top: 20px; right: 20px; z-index: 3000;
    display: flex; flex-direction: column; gap: 10px;
}
.toast {
    background: #fff; color: #000;
    border: 3px solid #000; box-shadow: 4px 4px 0px #000;
    padding: 15px 20px; min-width: 250px;
    font-weight: 700; font-size: 0.9rem;
    display: flex; align-items: center; gap: 10px;
    animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 8px;
}
.toast-success { border-color: #000; border-left: 10px solid var(--primary); }
.toast i { font-size: 1.2rem; color: var(--primary); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
    to { transform: translateX(100%); opacity: 0; }
}