352 lines
No EOL
5.5 KiB
CSS
352 lines
No EOL
5.5 KiB
CSS
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
font-family: Arial, sans-serif;
|
|
}
|
|
|
|
body {
|
|
background-color: #f5f5f5;
|
|
display: flex;
|
|
justify-content: center;
|
|
padding: 20px;
|
|
}
|
|
|
|
.container {
|
|
width: 100%;
|
|
max-width: 800px;
|
|
background-color: white;
|
|
border-radius: 10px;
|
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
|
padding: 20px;
|
|
}
|
|
|
|
h1 {
|
|
text-align: center;
|
|
margin-bottom: 20px;
|
|
color: #333;
|
|
}
|
|
|
|
/* Game Info Styles */
|
|
.game-info {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 20px;
|
|
padding: 10px;
|
|
background-color: #f0f0f0;
|
|
border-radius: 5px;
|
|
}
|
|
|
|
.player-info {
|
|
display: flex;
|
|
gap: 20px;
|
|
}
|
|
|
|
.player {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: 10px;
|
|
border-radius: 5px;
|
|
opacity: 0.7;
|
|
transition: all 0.3s;
|
|
}
|
|
|
|
.player.active {
|
|
background-color: #e3f2fd;
|
|
opacity: 1;
|
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.player-symbol {
|
|
font-size: 24px;
|
|
font-weight: bold;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.player-name {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.player-score {
|
|
font-size: 18px;
|
|
font-weight: bold;
|
|
margin-top: 5px;
|
|
}
|
|
|
|
.game-controls {
|
|
display: flex;
|
|
gap: 10px;
|
|
}
|
|
|
|
button {
|
|
padding: 10px 15px;
|
|
border: none;
|
|
border-radius: 5px;
|
|
background-color: #4CAF50;
|
|
color: white;
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
transition: background-color 0.3s;
|
|
}
|
|
|
|
button:hover {
|
|
background-color: #45a049;
|
|
}
|
|
|
|
#resetBtn {
|
|
background-color: #f44336;
|
|
}
|
|
|
|
#resetBtn:hover {
|
|
background-color: #d32f2f;
|
|
}
|
|
|
|
/* Game Board Styles */
|
|
.game-board {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
grid-gap: 10px;
|
|
margin: 0 auto 30px;
|
|
max-width: 400px;
|
|
}
|
|
|
|
.cell {
|
|
aspect-ratio: 1/1;
|
|
background-color: #e0e0e0;
|
|
border-radius: 5px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 48px;
|
|
font-weight: bold;
|
|
cursor: pointer;
|
|
transition: all 0.3s;
|
|
}
|
|
|
|
.cell:hover {
|
|
background-color: #d0d0d0;
|
|
}
|
|
|
|
.cell.x {
|
|
color: #f44336;
|
|
}
|
|
|
|
.cell.o {
|
|
color: #2196F3;
|
|
}
|
|
|
|
.cell.highlight {
|
|
background-color: #ffeb3b;
|
|
}
|
|
|
|
/* Modal Styles */
|
|
.modal {
|
|
display: none;
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
z-index: 100;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.modal.show {
|
|
display: flex;
|
|
}
|
|
|
|
.modal-content {
|
|
background-color: white;
|
|
padding: 30px;
|
|
border-radius: 10px;
|
|
max-width: 500px;
|
|
width: 90%;
|
|
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.modal h2 {
|
|
margin-bottom: 20px;
|
|
text-align: center;
|
|
color: #333;
|
|
}
|
|
|
|
.timer-container {
|
|
width: 100%;
|
|
height: 30px;
|
|
background-color: #f0f0f0;
|
|
border-radius: 15px;
|
|
margin-bottom: 15px;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.timer-bar {
|
|
height: 100%;
|
|
width: 100%;
|
|
background-color: #4CAF50;
|
|
border-radius: 15px;
|
|
transition: width 1s linear;
|
|
}
|
|
|
|
.timer-text {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
font-weight: bold;
|
|
color: #333;
|
|
}
|
|
|
|
.timer-bar.warning {
|
|
background-color: #FFC107;
|
|
}
|
|
|
|
.timer-bar.danger {
|
|
background-color: #F44336;
|
|
}
|
|
|
|
.question-text {
|
|
font-size: 28px;
|
|
margin-bottom: 30px;
|
|
line-height: 1.6;
|
|
text-align: center;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.answer-options {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 15px;
|
|
margin-bottom: 25px;
|
|
}
|
|
|
|
.answer-option {
|
|
padding: 20px;
|
|
border: 3px solid #ddd;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
transition: all 0.3s;
|
|
font-size: 22px;
|
|
text-align: center;
|
|
}
|
|
|
|
.answer-option:hover {
|
|
background-color: #f5f5f5;
|
|
border-color: #bbb;
|
|
}
|
|
|
|
.answer-option.selected {
|
|
border-color: #2196F3;
|
|
background-color: #e3f2fd;
|
|
}
|
|
|
|
.answer-option.correct {
|
|
border-color: #4CAF50;
|
|
background-color: #e8f5e9;
|
|
}
|
|
|
|
.answer-option.incorrect {
|
|
border-color: #f44336;
|
|
background-color: #ffebee;
|
|
}
|
|
|
|
.feedback {
|
|
text-align: center;
|
|
font-weight: bold;
|
|
margin-top: 25px;
|
|
min-height: 30px;
|
|
font-size: 24px;
|
|
padding: 15px;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.feedback.correct {
|
|
color: #4CAF50;
|
|
background-color: #e8f5e9;
|
|
border: 3px solid #4CAF50;
|
|
}
|
|
|
|
.feedback.incorrect {
|
|
color: #f44336;
|
|
background-color: #ffebee;
|
|
border: 3px solid #f44336;
|
|
}
|
|
|
|
/* Settings Styles */
|
|
.settings {
|
|
margin-top: 30px;
|
|
padding: 20px;
|
|
background-color: #f9f9f9;
|
|
border-radius: 5px;
|
|
}
|
|
|
|
.settings h3 {
|
|
margin-bottom: 15px;
|
|
color: #333;
|
|
}
|
|
|
|
.setting-group {
|
|
margin-bottom: 15px;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.setting-group label {
|
|
width: 120px;
|
|
font-weight: bold;
|
|
color: #555;
|
|
}
|
|
|
|
.setting-group select {
|
|
flex: 1;
|
|
padding: 8px;
|
|
border-radius: 5px;
|
|
border: 1px solid #ddd;
|
|
font-size: 16px;
|
|
background-color: white;
|
|
}
|
|
|
|
#applySettingsBtn {
|
|
margin-top: 10px;
|
|
background-color: #2196F3;
|
|
}
|
|
|
|
#applySettingsBtn:hover {
|
|
background-color: #1976D2;
|
|
}
|
|
|
|
/* RTL Support for Arabic */
|
|
[lang="ar"] {
|
|
direction: rtl;
|
|
text-align: right;
|
|
}
|
|
|
|
/* Responsive Styles */
|
|
@media (max-width: 600px) {
|
|
.game-info {
|
|
flex-direction: column;
|
|
gap: 15px;
|
|
}
|
|
|
|
.cell {
|
|
font-size: 36px;
|
|
}
|
|
|
|
.setting-group {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.setting-group label {
|
|
margin-bottom: 5px;
|
|
width: 100%;
|
|
}
|
|
|
|
.setting-group select {
|
|
width: 100%;
|
|
}
|
|
} |