equal-2-step / src /App.css
elyor-ml's picture
equal step 2 game
0b49cb3
/* Main container */
.equal-game {
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 2rem;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
font-family: 'Arial', sans-serif;
}
/* Loading state */
.loading {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
font-size: 1.5rem;
font-weight: bold;
color: white;
}
/* Question title */
.question-title {
font-size: 3rem;
font-weight: bold;
color: white;
text-align: center;
margin-bottom: 2rem;
text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
/* Comparison container */
.comparison-container {
display: flex;
align-items: center;
justify-content: center;
gap: 3rem;
margin-bottom: 3rem;
flex-wrap: wrap;
}
/* Side container */
.side-container {
background: white;
border-radius: 20px;
padding: 2rem;
box-shadow: 0 8px 25px rgba(0,0,0,0.15);
min-width: 300px;
max-width: 400px;
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.side-container.clickable {
cursor: pointer;
}
.side-container.clickable:hover {
transform: scale(1.05);
box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}
/* Emoji grid */
.emoji-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
gap: 8px;
max-width: 300px;
justify-items: center;
}
.emoji-item {
font-size: 2rem;
display: block;
animation: popIn 0.3s ease-out;
}
@keyframes popIn {
0% {
transform: scale(0);
}
80% {
transform: scale(1.1);
}
100% {
transform: scale(1);
}
}
/* Count display */
.count-display {
font-size: 2.5rem;
font-weight: bold;
color: #333;
background: #f0f0f0;
border-radius: 50%;
width: 80px;
height: 80px;
display: flex;
align-items: center;
justify-content: center;
border: 3px solid #ddd;
}
/* VS divider */
.vs-divider {
font-size: 2rem;
font-weight: bold;
color: white;
background: rgba(255,255,255,0.2);
border-radius: 50%;
width: 80px;
height: 80px;
display: flex;
align-items: center;
justify-content: center;
text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
/* Answer buttons for step 1 */
.answer-buttons {
display: flex;
gap: 2rem;
justify-content: center;
flex-wrap: wrap;
}
.answer-btn {
padding: 1.5rem 3rem;
font-size: 1.5rem;
font-weight: bold;
border: none;
border-radius: 15px;
cursor: pointer;
transition: all 0.3s ease;
min-width: 150px;
box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.equal-btn {
background: linear-gradient(45deg, #4CAF50, #45a049);
color: white;
}
.equal-btn:hover {
background: linear-gradient(45deg, #45a049, #4CAF50);
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.not-equal-btn {
background: linear-gradient(45deg, #f44336, #d32f2f);
color: white;
}
.not-equal-btn:hover {
background: linear-gradient(45deg, #d32f2f, #f44336);
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
/* Step 2 instruction */
.step2-instruction {
font-size: 1.2rem;
color: white;
text-align: center;
margin-top: 1rem;
background: rgba(255,255,255,0.1);
padding: 1rem 2rem;
border-radius: 10px;
backdrop-filter: blur(10px);
}
/* Feedback message */
.feedback-message {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: white;
color: #333;
font-size: 2rem;
font-weight: bold;
padding: 2rem 3rem;
border-radius: 20px;
box-shadow: 0 10px 30px rgba(0,0,0,0.3);
z-index: 1000;
animation: feedbackPop 0.5s ease-out;
}
@keyframes feedbackPop {
0% {
transform: translate(-50%, -50%) scale(0);
}
80% {
transform: translate(-50%, -50%) scale(1.1);
}
100% {
transform: translate(-50%, -50%) scale(1);
}
}
/* Responsive design */
@media (max-width: 768px) {
.question-title {
font-size: 2rem;
margin-bottom: 1.5rem;
}
.comparison-container {
gap: 2rem;
flex-direction: column;
}
.side-container {
min-width: 250px;
max-width: 300px;
padding: 1.5rem;
}
.vs-divider {
width: 60px;
height: 60px;
font-size: 1.5rem;
}
.emoji-item {
font-size: 1.5rem;
}
.count-display {
width: 60px;
height: 60px;
font-size: 2rem;
}
.answer-buttons {
flex-direction: column;
align-items: center;
gap: 1rem;
}
.answer-btn {
padding: 1rem 2rem;
font-size: 1.2rem;
min-width: 200px;
}
.feedback-message {
font-size: 1.5rem;
padding: 1.5rem 2rem;
}
}
@media (max-width: 480px) {
.equal-game {
padding: 1rem;
}
.question-title {
font-size: 1.5rem;
}
.side-container {
min-width: 200px;
max-width: 250px;
padding: 1rem;
}
.emoji-grid {
max-width: 200px;
}
.emoji-item {
font-size: 1.2rem;
}
}