CSS · 3992 bytes Raw Blame History
1 /* Main styles for paralASCII */
2
3 /* CSS Variables */
4 :root {
5 --color-primary: #0f0;
6 --color-secondary: #ff0;
7 --color-danger: #f00;
8 --color-background: #000;
9 --color-text: #0f0;
10 --font-mono: 'Courier New', Courier, monospace;
11 --char-width: 6px;
12 --char-height: 12px;
13 --control-bg: rgba(0, 0, 0, 0.8);
14 --control-border: rgba(0, 255, 0, 0.3);
15
16 /* Dynamic variables set by JS */
17 --rainbow-speed: 2s;
18 --audio-brightness: 1;
19 }
20
21 /* Reset and base styles */
22 * {
23 margin: 0;
24 padding: 0;
25 box-sizing: border-box;
26 }
27
28 html, body {
29 width: 100%;
30 height: 100%;
31 overflow: hidden;
32 }
33
34 body {
35 background-color: var(--color-background);
36 color: var(--color-text);
37 font-family: var(--font-mono);
38 font-size: 14px;
39 line-height: 1;
40 }
41
42 /* Visualizer container */
43 #visualizer {
44 position: fixed;
45 top: 0;
46 left: 0;
47 width: 100vw;
48 height: 100vh;
49 font-size: 10px;
50 line-height: 1;
51 white-space: pre;
52 overflow: hidden;
53 letter-spacing: 0;
54 margin: 0;
55 padding: 0;
56 font-family: var(--font-mono);
57 z-index: 1;
58 text-shadow: 0 0 10px currentColor,
59 0 0 20px currentColor,
60 0 0 30px currentColor;
61 transition: color 0.1s ease-out;
62 }
63
64 /* Info display */
65 .info {
66 position: absolute;
67 bottom: 20px;
68 left: 50%;
69 transform: translateX(-50%);
70 font-size: 14px;
71 opacity: 0.9;
72 text-align: center;
73 z-index: 100;
74 background: var(--control-bg);
75 padding: 10px 20px;
76 border-radius: 5px;
77 text-shadow: 0 0 5px var(--color-primary);
78 backdrop-filter: blur(10px);
79 border: 1px solid var(--control-border);
80 transition: opacity 0.3s ease-out;
81 }
82
83 .info.hidden {
84 opacity: 0;
85 pointer-events: none;
86 }
87
88 /* Error message */
89 .error-message {
90 position: absolute;
91 top: 50%;
92 left: 50%;
93 transform: translate(-50%, -50%);
94 background: var(--color-danger);
95 color: white;
96 padding: 20px 30px;
97 border-radius: 10px;
98 font-size: 16px;
99 box-shadow: 0 0 20px var(--color-danger);
100 z-index: 200;
101 display: none;
102 max-width: 80%;
103 text-align: center;
104 }
105
106 .error-message.visible {
107 display: block;
108 animation: shake 0.5s ease-out;
109 }
110
111 @keyframes shake {
112 0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
113 10% { transform: translate(-51%, -50%) rotate(-1deg); }
114 20% { transform: translate(-49%, -50%) rotate(1deg); }
115 30% { transform: translate(-51%, -50%) rotate(0deg); }
116 40% { transform: translate(-49%, -50%) rotate(1deg); }
117 50% { transform: translate(-50%, -50%) rotate(-1deg); }
118 60% { transform: translate(-52%, -50%) rotate(0deg); }
119 70% { transform: translate(-48%, -50%) rotate(-1deg); }
120 80% { transform: translate(-51%, -50%) rotate(1deg); }
121 90% { transform: translate(-49%, -50%) rotate(0deg); }
122 }
123
124 /* Loading state */
125 .loading {
126 position: absolute;
127 top: 50%;
128 left: 50%;
129 transform: translate(-50%, -50%);
130 font-size: 24px;
131 color: var(--color-primary);
132 text-shadow: 0 0 20px var(--color-primary);
133 animation: pulse 1s ease-in-out infinite;
134 }
135
136 @keyframes pulse {
137 0%, 100% { opacity: 1; }
138 50% { opacity: 0.5; }
139 }
140
141 /* Accessibility */
142 .visually-hidden {
143 position: absolute;
144 width: 1px;
145 height: 1px;
146 padding: 0;
147 margin: -1px;
148 overflow: hidden;
149 clip: rect(0, 0, 0, 0);
150 white-space: nowrap;
151 border: 0;
152 }
153
154 /* Focus styles */
155 :focus {
156 outline: 2px solid var(--color-primary);
157 outline-offset: 2px;
158 }
159
160 /* Selection */
161 ::selection {
162 background-color: var(--color-primary);
163 color: var(--color-background);
164 }
165
166 /* Scrollbar (if needed) */
167 ::-webkit-scrollbar {
168 width: 8px;
169 height: 8px;
170 }
171
172 ::-webkit-scrollbar-track {
173 background: var(--color-background);
174 }
175
176 ::-webkit-scrollbar-thumb {
177 background: var(--color-primary);
178 border-radius: 4px;
179 }
180
181 ::-webkit-scrollbar-thumb:hover {
182 background: var(--color-secondary);
183 }