File size: 7,956 Bytes
9da2ec3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
/* --- KHỞI TẠO THEME --- */
:root {
    --primary-red: #8E0000;      /* Màu đỏ Chu Sa (Cinnabar) */
    --primary-red-hover: #a50000;
    --paper-bg: #F9F7F2;         /* Màu giấy Tuyên (Rice Paper) */
    --ink-black: #2C2C2C;        /* Màu Mực Tàu */
    --border-color: #D6D0C4;
    --accent-gold: #D4AF37;      /* Màu Vàng Kim */
    --white: #FFFFFF;
    --shadow-soft: 0 4px 20px rgba(142, 0, 0, 0.08);
    --font-serif: 'Noto Serif SC', serif;
    --font-sans: 'Noto Sans', sans-serif;
}

/* --- RESET & BASE --- */
* { box-sizing: border-box; }
body {
    background-color: var(--paper-bg);
    color: var(--ink-black);
    font-family: var(--font-sans);
    margin: 0; padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-image: radial-gradient(#e6e2d8 1px, transparent 1px);
    background-size: 20px 20px;
}

/* --- SCROLLBAR --- */
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #f1f1f1; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #999; }

/* --- HEADER --- */
header {
    background-color: var(--primary-red);
    color: var(--white);
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 100;
    position: relative;
}
header::after {
    content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background: var(--accent-gold);
}

.brand {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    display: flex; align-items: center; letter-spacing: 1px;
    margin-right: auto;
}
.brand i { margin-right: 10px; }

/* --- NAVIGATION --- */
.nav-tabs-custom { display: flex; gap: 5px; }
.nav-btn {
    background: transparent; border: none;
    color: rgba(255,255,255, 0.7);
    padding: 8px 15px; border-radius: 4px;
    cursor: pointer; font-weight: 600;
    transition: all 0.3s;
}
.nav-btn:hover { color: var(--white); background: rgba(255,255,255,0.1); }
.nav-btn.active {
    color: var(--primary-red); background: var(--paper-bg);
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

/* --- LAYOUT --- */
.main-layout { display: flex; flex: 1; overflow: hidden; height: calc(100vh - 60px); position: relative; }

/* --- LEFT SIDEBAR --- */
.left-panel {
    width: 350px;
    background: var(--white);
    border-right: 1px solid var(--border-color);
    display: flex; flex-direction: column;
    z-index: 50;
    transition: transform 0.3s ease;
}

.view-section { display: none; height: 100%; flex-direction: column; }
.view-section.active { display: flex; }

/* Search Area */
.search-area { padding: 15px; border-bottom: 1px solid var(--border-color); background: #fff; }
.search-input-wrapper { position: relative; }
.search-input {
    width: 100%; padding: 10px 15px 10px 35px;
    border: 2px solid var(--border-color); border-radius: 20px;
    outline: none; transition: 0.3s; background: #fafafa;
}
.search-input:focus { border-color: var(--primary-red); background: #fff; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #999; }
.search-info { font-size: 0.8rem; color: #666; margin-top: 5px; text-align: right; }

/* Result List */
.result-list { flex: 1; overflow-y: auto; padding: 0; list-style: none; margin: 0; }
.list-item {
    padding: 12px 20px; border-bottom: 1px solid #eee;
    cursor: pointer; display: flex; align-items: center; transition: 0.2s;
}
.list-item:hover, .list-item.selected {
    background-color: #FFF0F0; border-left: 4px solid var(--primary-red);
}
.item-han { font-family: var(--font-serif); font-size: 1.4rem; color: var(--primary-red); margin-right: 10px; width: 40px;}
.item-viet { font-weight: 600; color: #333; font-size: 1rem; }

/* Radical Grid */
.radical-controls { padding: 10px; border-bottom: 1px solid var(--border-color); }
.radical-grid { display: flex; flex-wrap: wrap; padding: 10px; justify-content: center; overflow-y: auto; }
.radical-box {
    width: 45px; height: 45px;
    border: 1px solid #ddd; margin: 3px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border-radius: 4px; cursor: pointer; transition: 0.2s; background: #fff;
}
.radical-box:hover { border-color: var(--primary-red); transform: translateY(-2px); box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.r-char { font-family: var(--font-serif); color: var(--primary-red); font-weight: bold; font-size: 1.1rem; }
.r-stroke { font-size: 0.6rem; color: #888; }

/* Hand Panel */
.hand-container { padding: 20px; display: flex; flex-direction: column; align-items: center; height: 100%; overflow-y: auto; }
.canvas-wrapper { border: 3px double var(--primary-red); border-radius: 4px; margin-bottom: 10px; background: #fff; cursor: crosshair; }
.hand-tools { display: flex; gap: 10px; margin-bottom: 15px; }
.btn-tool {
    padding: 6px 15px; border: 1px solid var(--primary-red);
    background: white; color: var(--primary-red); border-radius: 4px;
    cursor: pointer; transition: 0.2s;
}
.btn-tool:hover { background: var(--primary-red); color: white; }
.hand-results { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; width: 100%; }
.hand-res-item {
    font-family: var(--font-serif); font-size: 1.5rem;
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border: 1px solid #ddd; border-radius: 4px; cursor: pointer;
}
.hand-res-item:hover { background: var(--primary-red); color: white; }

/* --- RIGHT CONTENT --- */
.right-panel { flex: 1; padding: 20px; background: var(--paper-bg); display: flex; justify-content: center; position: relative; }
.right-panel::before {
    content: "漢越"; position: absolute; font-family: var(--font-serif);
    font-size: 20rem; opacity: 0.03; color: var(--primary-red);
    top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none;
}

.detail-card {
    background: var(--white); width: 100%; max-width: 800px;
    height: 100%; border-radius: 8px; box-shadow: var(--shadow-soft);
    padding: 30px; overflow-y: auto;
}

.detail-header { display: flex; border-bottom: 2px solid var(--primary-red); padding-bottom: 15px; margin-bottom: 15px; }
.big-char {
    font-family: var(--font-serif); font-size: 4.5rem; color: var(--primary-red);
    border: 2px solid var(--primary-red); padding: 5px 15px; border-radius: 8px;
    background: #fffcf5;
}
.detail-meta { margin-left: 20px; display: flex; flex-direction: column; justify-content: center; }
.hanviet-main { font-size: 1.6rem; font-weight: 700; color: #333; margin-bottom: 5px; }
.pinyin { color: #666; font-style: italic; }

.meaning-group { margin-bottom: 15px; line-height: 1.6; color: #444; }
.meaning-label { color: var(--primary-red); font-weight: bold; margin-right: 5px; }

.empty-state { text-align: center; color: #aaa; margin-top: 100px; }
.empty-state i { font-size: 4rem; margin-bottom: 20px; color: #e0d0b0; }

/* --- MOBILE RESPONSIVE --- */
.mobile-toggle { display: none; color: white; font-size: 1.2rem; cursor: pointer; margin-right: 15px; }
.overlay { display: none; position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.5); z-index: 40; }

@media (max-width: 768px) {
    .mobile-toggle { display: block; }
    .brand span { display: none; }
    .left-panel { position: absolute; left: -100%; top: 0; bottom: 0; width: 85%; transition: 0.3s; box-shadow: 2px 0 10px rgba(0,0,0,0.2); }
    .left-panel.open { left: 0; }
    .overlay.active { display: block; }
    .detail-card { padding: 15px; }
    .big-char { font-size: 3rem; }
}