Repository navigation
Expand file tree
/
Copy pathstyle.css
More file actions
147 lines (124 loc) · 8.79 KB
/
Copy pathstyle.css
File metadata and controls
147 lines (124 loc) · 8.79 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
:root {
--bg-color: #eef2f6;
--surface-color: #ffffff;
--text-primary: #1e293b;
--text-secondary: #64748b;
--border-color: #e2e8f0;
--primary-color: #3b82f6;
--success-color: #10b981;
--danger-color: #ef4444;
--key-color: #eab308;
--shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.08);
--shadow-float: 0 20px 40px -10px rgba(0,0,0,0.15);
}
[data-theme="dark"] {
--bg-color: #0b0f19;
--surface-color: #161b22;
--text-primary: #f1f5f9;
--text-secondary: #94a3b8;
--border-color: #30363d;
--primary-color: #3b82f6;
--shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.5);
--shadow-float: 0 20px 40px -10px rgba(0,0,0,0.8);
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', system-ui, sans-serif; }
body {
background-color: var(--bg-color); color: var(--text-primary);
height: 100vh; display: flex; flex-direction: column; overflow: hidden;
transition: background-color 0.3s ease, color 0.3s ease;
}
/* --- Top Navigation --- */
.top-nav {
height: 60px; background-color: var(--surface-color); display: flex;
justify-content: space-between; align-items: center; padding: 0 20px;
z-index: 20; box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.nav-left, .nav-right { display: flex; align-items: center; gap: 10px; }
.logo { font-weight: 700; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; margin-right: 10px; color: var(--primary-color); }
.nav-btn, .theme-toggle, .mobile-menu-btn, .close-sidebar-btn {
background: transparent; border: none; color: var(--text-primary);
display: flex; align-items: center; gap: 6px; padding: 8px 14px;
border-radius: 8px; cursor: pointer; font-size: 0.9rem; font-weight: 500; transition: all 0.2s;
}
.nav-btn:hover, .theme-toggle:hover, .mobile-menu-btn:hover { background-color: rgba(128,128,128,0.1); }
.theme-toggle, .mobile-menu-btn { font-size: 1.2rem; border-radius: 50%; padding: 10px; color: var(--text-secondary); }
.mobile-menu-btn { display: none; } /* Hidden on desktop */
.close-sidebar-btn { display: none; margin-left: auto; font-size: 1.2rem; padding: 4px; }
/* --- Workspace & Floating Sidebar --- */
.workspace { display: flex; flex: 1; overflow: hidden; padding: 20px; gap: 20px; position: relative; }
.sidebar {
width: 280px; background-color: var(--surface-color); border-radius: 20px;
box-shadow: var(--shadow-soft); display: flex; flex-direction: column; overflow: hidden;
margin-bottom: 20px; z-index: 100; transition: left 0.3s ease;
}
.sidebar-overlay {
display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
background: rgba(0,0,0,0.5); z-index: 90; opacity: 0; transition: opacity 0.3s ease;
}
.sidebar-header { padding: 20px; font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; gap: 10px; background-color: rgba(0,0,0,0.02); }
[data-theme="dark"] .sidebar-header { background-color: rgba(255,255,255,0.02); }
.sidebar-content { flex: 1; overflow-y: auto; padding: 20px; }
.tree-view ul { list-style: none; padding-left: 20px; }
.tree-view summary { cursor: pointer; padding: 8px 0; display: flex; align-items: center; gap: 8px; color: var(--text-primary); font-weight: 500; user-select: none; }
.tree-view li { margin: 6px 0; color: var(--text-secondary); font-size: 0.95rem; display: flex; align-items: center; gap: 8px; }
.active-db { color: var(--primary-color) !important; font-weight: 700 !important; }
.active-db i { color: var(--primary-color) !important; }
/* --- Editors & Results --- */
.editor-area { flex: 1; display: flex; flex-direction: column; gap: 20px; margin-bottom: 20px; min-width: 0; }
.editor-container, .results-container {
background-color: var(--surface-color); border-radius: 20px;
box-shadow: var(--shadow-soft); display: flex; flex-direction: column; overflow: hidden;
position: relative;
}
.editor-container { flex: 1.5; }
.results-container { flex: 1; }
.editor-tabs, .results-tabs { display: flex; background-color: rgba(0,0,0,0.02); padding: 0 10px; border-bottom: 1px solid var(--border-color); overflow-x: auto;}
[data-theme="dark"] .editor-tabs, [data-theme="dark"] .results-tabs { background-color: rgba(255,255,255,0.02); }
.tab { padding: 12px 16px; font-size: 0.85rem; cursor: pointer; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; border-bottom: 2px solid transparent; font-weight: 500; white-space: nowrap; transition: color 0.2s;}
.tab.active { border-bottom-color: var(--primary-color); color: var(--primary-color); }
#sql-input { flex: 1; width: 100%; border: none; resize: none; padding: 20px; font-family: 'Consolas', monospace; font-size: 1rem; background-color: var(--surface-color); color: var(--text-primary); outline: none; line-height: 1.6; }
.results-content { flex: 1; position: relative; overflow: auto; padding: 20px; font-family: 'Consolas', monospace; font-size: 0.9rem; }
table { width: 100%; border-collapse: collapse; text-align: left; background: var(--surface-color); }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--border-color); white-space: nowrap; }
th { color: var(--text-secondary); font-weight: 600; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.5px; }
#diagram-container { width: 100%; height: 100%; min-height: 400px; background-image: radial-gradient(var(--border-color) 1px, transparent 1px); background-size: 20px 20px; position: relative; overflow: auto; }
.schema-card { position: absolute; width: 220px; background-color: var(--surface-color); border-radius: 12px; box-shadow: var(--shadow-float); border: 1px solid var(--border-color); display: flex; flex-direction: column; overflow: hidden; cursor: grab; transition: box-shadow 0.2s; z-index: 1; }
.schema-card:active { cursor: grabbing; box-shadow: var(--shadow-soft); z-index: 10; }
.schema-card-header { background-color: var(--primary-color); color: white; padding: 10px 15px; font-weight: 600; font-family: 'Segoe UI', sans-serif; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; user-select: none; }
.schema-card-row { padding: 8px 15px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--border-color); font-size: 0.85rem; font-family: 'Consolas', monospace; }
.schema-card-row:last-child { border-bottom: none; }
.col-name { color: var(--text-primary); font-weight: 500;}
.col-type { color: var(--text-secondary); font-size: 0.75rem;}
.autocomplete-items { position: absolute; background-color: var(--surface-color); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: var(--shadow-float); z-index: 100; list-style: none; padding: 6px; margin: 0; max-height: 220px; overflow-y: auto; display: none; min-width: 180px; }
.autocomplete-items li { padding: 10px 14px; cursor: pointer; color: var(--text-primary); font-family: 'Consolas', monospace; font-size: 0.9rem; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.autocomplete-items li .type-badge { font-size: 0.7rem; color: var(--text-secondary); background: rgba(128,128,128,0.1); padding: 3px 8px; border-radius: 6px; text-transform: uppercase; font-family: 'Segoe UI', sans-serif; font-weight: 600; }
.autocomplete-items li:hover, .autocomplete-items li.active { background-color: var(--primary-color); color: white; }
.autocomplete-items li:hover .type-badge, .autocomplete-items li.active .type-badge { color: white; background: rgba(255,255,255,0.2); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
/* ==========================================
MOBILE RESPONSIVENESS
========================================== */
@media (max-width: 850px) {
.workspace { padding: 10px; flex-direction: column; gap: 10px; }
/* Top Nav Adjustments */
.top-nav { padding: 0 10px; }
.btn-text, .logo-text { display: none; } /* Hide text, keep icons */
.nav-btn { padding: 10px; border-radius: 50%; }
.mobile-menu-btn { display: block; padding: 10px; }
.close-sidebar-btn { display: block; }
/* Slide-in Sidebar */
.sidebar {
position: fixed; top: 0; left: -320px; height: 100vh; margin: 0;
border-radius: 0 20px 20px 0; z-index: 100; box-shadow: 20px 0 40px rgba(0,0,0,0.2);
}
.sidebar.active { left: 0; }
.sidebar-overlay.active { display: block; opacity: 1; }
/* Editors Adjustments */
.editor-area { margin-bottom: 0; flex: none; height: calc(100vh - 80px); }
.editor-container { flex: 1; border-radius: 12px; }
.results-container { flex: 1; border-radius: 12px; }
.tab { font-size: 0.8rem; padding: 10px 12px; }
#sql-input { padding: 10px; font-size: 0.95rem; }
}