-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
185 lines (155 loc) · 5.35 KB
/
styles.css
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
/* General Body Styles */
body {
font-family: 'Arial', sans-serif;
background: linear-gradient(to right, #6a82fb, #da22ff); /* Blue to purple gradient */
color: #333;
margin: 0;
padding: 30px;
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
overflow-x: hidden;
}
header {
text-align: center;
margin-bottom: 30px;
}
header h1 {
color: #ffffff; /* Adjusted for better visibility against the bright background */
margin-bottom: 0.5em;
}
#adjectiveDisplay {
color: #ffffff; /* Adjusted for better visibility against the bright background */
margin-top: 20px; /* Adjust this value to move it down */
font-size: 2em; /* Increase the size if needed */
}
header p {
font-size: 1.5em;
color: #ffffff; /* Maintaining readability */
max-width: 800px;
}
main {
width: 100%;
max-width: 600px;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
}
.control-group {
display: flex;
flex-direction: column; /* Stack buttons vertically */
align-items: center; /* Center-align items within each group */
margin: 10px; /* Space around each group */
flex: 1 0 30%;
color: #ffffff; /* Adjusted for better visibility against the bright background */
}
.control-group h3 {
font-size: 2em; /* Increased size */
}
#controls {
display: flex;
justify-content: space-around; /* Align items in the center of the container */
flex-wrap: wrap; /* Allow items to wrap as needed */
align-items: center; /* Aligns items vertically in the center */
width: 100%; /* Ensures the container takes full width */
max-width: 960px; /* Sets a max-width to prevent overstretch on larger screens */
margin: 50px auto; /* Centers the container and adds vertical space */
}
.rating-button {
background-color: #4ecdc4; /* Cyan-like color */
color: white;
border: none;
border-radius: 5px;
padding: 15px 25px;
font-size: calc(12px + 1.5vw);
text-align: center;
width: 100%;
cursor: pointer;
margin: 5px;
transition: all 0.3s ease, transform 0.2s ease;
}
.rating-button.selected {
background-color: #134e48; /* This color will be used to highlight the selected button */
color: white;
}
.rating-button:hover {
background-color: #134e48; /* Darker shade for hover */
}
footer {
text-align: center;
color: #ffffff; /* for better visibility */
margin-top: auto;
width: 100%;
padding: 20px 0;
}
/* Tooltip styling */
.info {
position: relative; /* Needed to position the tooltip */
cursor: help; /* Changes the cursor to indicate clickable/helpful item */
text-decoration: underline; /* Underline to indicate interactivity */
}
.info:hover::after {
content: attr(data-info); /* Uses the content from data-info attribute for the tooltip */
position: absolute; /* Positions relative to the parent .info element */
left: 0;
bottom: 100%; /* Positions the tooltip above the span element */
background-color: #333; /* Tooltip background color */
color: white; /* Text color inside the tooltip */
padding: 5px 10px; /* Padding inside the tooltip */
border-radius: 4px; /* Rounded corners for the tooltip */
white-space: nowrap; /* Ensures the tooltip text stays on one line */
box-shadow: 0 2px 6px rgba(0,0,0,0.2); /* Optional: adds shadow for better visibility */
z-index: 1000; /* Ensures the tooltip is above other content */
opacity: 0; /* Start with tooltip invisible */
transition: opacity 0.3s ease-in-out; /* Smooth transition for appearing */
pointer-events: none; /* Prevents tooltip from interfering with clicks */
}
.info:hover::after {
opacity: 1; /* Make the tooltip visible on hover */
}
.error-message, .feedback-message {
position: fixed;
bottom: 10px;
left: 50%;
transform: translateX(-50%);
background-color: #f44336; /* Red background for error */
color: white;
padding: 10px;
border-radius: 5px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
z-index: 1000;
opacity: 0;
animation: fadeInOut 5s forwards;
}
.feedback-message {
background-color: #4CAF50; /* Green background for success */
}
@keyframes fadeInOut {
0%, 100% { opacity: 0; }
10%, 90% { opacity: 1; }
}
/* Responsive Design Adjustments */
@media (max-width: 768px) {
header p, footer p {
font-size: 0.9em; /* Smaller text on smaller devices */
}
#controls {
flex-direction: column; /* Stack controls vertically on smaller screens */
margin-top: 30px; /* Reduced top margin */
}
#adjectiveDisplay {
font-size: 1.5em; /* Smaller font size for the loading text on smaller screens */
}
.rating-button {
padding: 10px 20px; /* Smaller padding for smaller devices */
font-size: 16px; /* Smaller font size for smaller screens */
}
.control-group {
flex: 1 0 100%; /* Makes each group take full width of the container */
}
.control-group h3 {
font-size: 1.8em; /* Adjust size as needed */
}
}