-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
175 lines (151 loc) · 5.74 KB
/
style.css
File metadata and controls
175 lines (151 loc) · 5.74 KB
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
:root {
--primary: #4f46e5;
--bg: #f8fafc;
--card: #ffffff;
--text: #0f172a;
--text-muted: #64748b;
--accent: #d97706;
--border: #e2e8f0;
--phonetic: #6366f1;
--page-margin: 40px; /* New variable for edge spacing */
}
body.dark-mode {
--bg: #020617;
--card: #0f172a;
--text: #f8fafc;
--text-muted: #94a3b8;
--border: #1e293b;
}
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
background-color: var(--bg);
color: var(--text);
transition: background 0.3s ease;
overflow-x: hidden;
}
/* --- Main Layout Container --- */
.main-content {
flex: 1;
padding: 60px var(--page-margin); /* Adds large margin to the left/right */
max-width: 900px; /* Keeps the dictionary from getting too wide on big screens */
margin: 0 auto;
transition: opacity 0.3s;
}
/* Panel Hiding Logic */
.panel {
position: fixed;
right: 0;
top: 0;
width: 320px;
height: 100%;
background: var(--card);
box-shadow: -10px 0 30px rgba(0,0,0,0.1);
z-index: 1000;
padding: 30px;
box-sizing: border-box;
transform: translateX(105%);
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.panel.open { transform: translateX(0); }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.panel-header h3 { margin: 0; font-size: 1.4rem; }
/* Navigation */
nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 60px; padding: 20px 0; }
.logo { font-size: 28px; font-weight: 800; color: var(--primary); }
.logo span { color: var(--accent); }
.nav-link {
background: var(--card); border: 1px solid var(--border); color: var(--text);
font-weight: 600; cursor: pointer; padding: 10px 20px; border-radius: 10px; transition: 0.2s;
}
.nav-link:hover { border-color: var(--primary); color: var(--primary); }
/* Search Area */
.search-area { position: relative; max-width: 600px; margin: 0 auto 50px; }
.input-wrapper { display: flex; gap: 10px; background: var(--card); padding: 8px; border-radius: 14px; border: 1px solid var(--border); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
input { flex: 1; border: none; background: transparent; color: var(--text); padding: 12px; font-size: 16px; outline: none; }
#search-btn { background: var(--primary); color: white; border: none; padding: 0 24px; border-radius: 10px; cursor: pointer; font-weight: 600; }
.autocomplete-items {
position: absolute;
top: calc(100% + 8px);
left: 0;
right: 0;
background: var(--card);
border: 1px solid var(--border);
border-radius: 12px;
box-shadow: 0 10px 25px rgba(0,0,0,0.1);
z-index: 99;
overflow: hidden;
display: none;
}
.autocomplete-items.active { display: block; }
.autocomplete-items div { padding: 14px 18px; cursor: pointer; border-bottom: 1px solid var(--border); transition: 0.2s; }
.autocomplete-items div:hover { background: #f1f5f9; color: var(--primary); }
/* --- RESULT CARD SPACING --- */
.result-card {
background: var(--card);
padding: 40px;
border-radius: 20px;
border: 1px solid var(--border);
margin-top: 30px;
box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}
.word-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 35px;
padding-bottom: 20px;
border-bottom: 2px solid var(--bg);
}
.phonetic-text { color: var(--phonetic); font-size: 1.2rem; font-weight: 500; margin-left: 15px; }
.meaning-section { margin-bottom: 45px; }
.pos-label {
color: var(--primary);
font-weight: 800;
font-style: italic;
margin-bottom: 15px;
display: block;
text-transform: uppercase;
font-size: 0.85rem;
letter-spacing: 1px;
}
.definition-list { padding-left: 25px; line-height: 1.8; }
.definition-list li { margin-bottom: 15px; }
.synonyms { margin-top: 25px; padding-top: 15px; }
.synonym-tag {
display: inline-block;
background: #eef2ff;
color: var(--primary);
padding: 8px 16px;
border-radius: 12px;
margin: 8px 8px 0 0;
font-size: 13px;
cursor: pointer;
font-weight: 600;
transition: 0.2s;
}
.synonym-tag:hover { background: var(--primary); color: white; transform: translateY(-2px); }
/* --- SIDEBAR & SETTINGS LISTS --- */
#stars-list { list-style: none; padding: 0; }
#stars-list li {
background: var(--bg); padding: 18px; border-radius: 12px;
margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center;
border: 1px solid var(--border); cursor: pointer;
}
.remove-btn { color: #ef4444; background: none; border: none; cursor: pointer; font-weight: 800; font-size: 12px; }
.divider { height: 1px; background: var(--border); margin: 35px 0; }
.setting-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.danger-btn { background: #fee2e2; color: #dc2626; width: 100%; padding: 15px; border: none; border-radius: 12px; cursor: pointer; font-weight: 700; }
/* Switch Toggle */
.switch { position: relative; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .3s; border-radius: 20px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; }
input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(20px); }
/* Responsive Adjustments for smaller screens */
@media (max-width: 600px) {
:root { --page-margin: 20px; }
.result-card { padding: 25px; }
.main-content { padding-top: 30px; }
}