:root {
    --bg0: #1d2021;
    --bg1: #282828;
    --bg2: #32302f;
    --fg: #d4be98;
    --gray: #7c6f64;
    --red: #ea6962;
    --green: #a9b665;
    --yellow: #d8a657;
    --blue: #7daea3;
    --purple: #d3869b;
    --aqua: #89b482;
    --orange: #e78a4e;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg0);
    color: var(--fg);
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 15px 25px;
}

/* Prompt Style */
.prompt-line {
    margin-bottom: 20px;
    font-weight: bold;
}
.prompt-user { color: var(--green); }
.prompt-at { color: var(--fg); }
.prompt-host { color: var(--blue); }
.prompt-sep { color: var(--fg); }
.prompt-dir { color: var(--blue); }
.prompt-sign { color: var(--fg); }

/* Toolbar Style */
.toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.action-btns {
    display: flex;
    gap: 10px;
}

.tui-btn {
    background: var(--bg1);
    border: 1px solid #504945; /* Đường viền đậm hơn */
    color: var(--fg);
    padding: 5px 15px;
    cursor: pointer;
    font-family: inherit;
}

.tui-btn span { color: var(--yellow); margin-right: 5px; }
.tui-btn:hover { border-color: var(--gray); background: var(--bg2); }

.search-box {
    background: var(--bg0);
    border: 1px solid #504945; /* Đường viền đậm hơn */
    color: var(--gray);
    padding: 6px 12px;
    width: 100%;
    font-family: inherit;
    outline: none;
}
.search-box:focus { color: var(--aqua); border-color: var(--aqua); }

/* Table Style */
.main-content {
    flex-grow: 1;
    overflow-y: auto;
    border-top: 2px solid #504945; /* Divider đậm hơn */
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    color: var(--yellow);
    padding: 12px 10px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
    border-bottom: 1px solid #504945; /* Divider đậm hơn */
}

td {
    padding: 8px 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 
   MÀU SẮC CÁC CỘT - ÁP DỤNG TRỰC TIẾP VÀO TD
*/
/* Cột 1: Website Title - Aqua */
table tbody tr td:nth-child(1) {
    color: var(--aqua) !important;
    font-weight: 500;
}

/* Cột 2: URL - Gray */
table tbody tr td:nth-child(2) {
    color: var(--gray) !important;
}

/* Cột 3: Tags - Purple */
table tbody tr td:nth-child(3) {
    color: var(--purple) !important;
}

/* Nút Open - Green */
.open-link {
    color: var(--green) !important;
    text-decoration: none;
}

/* 
   DÒNG ĐƯỢC CHỌN - TẤT CẢ THÀNH CAM
*/
tr.selected {
    background-color: var(--bg2);
}

tr.selected td,
tr.selected td a,
tr.selected td span {
    color: var(--orange) !important;
}

/* Footer Style */
footer {
    border-top: 1px solid var(--bg2);
    padding: 15px 0;
    color: var(--gray);
    font-size: 11px;
    text-transform: uppercase;
}

/* Modal Style */
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--bg1);
    border: 1px solid #504945;
    padding: 25px;
    z-index: 100;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

@media (max-width: 600px) {
    .modal {
        padding: 15px;
        width: 95%;
    }
    
    #app {
        padding: 10px 10px;
    }
    
    .prompt-line {
        font-size: 11px;
    }
    
    .tui-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
}

.modal-header {
    color: var(--yellow);
    margin-bottom: 20px;
    font-weight: bold;
    border-bottom: 1px solid var(--bg2);
    padding-bottom: 10px;
}

.form-group { margin-bottom: 15px; }
label { display: block; color: var(--gray); font-size: 10px; margin-bottom: 5px; letter-spacing: 1px; }
input, textarea {
    width: 100%;
    background: var(--bg0);
    border: 1px solid var(--bg2);
    color: var(--fg);
    padding: 8px;
    font-family: inherit;
    outline: none;
}
input:focus { border-color: var(--aqua); }

.btn-group { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg0); }
::-webkit-scrollbar-thumb { background: var(--bg2); }
