Files
game-timer/styles.css
2025-03-22 22:35:45 +01:00

261 lines
4.3 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: Arial, sans-serif;
}
body {
background-color: #f5f5f5;
color: #333;
overflow-x: hidden;
}
.app-container {
max-width: 100%;
margin: 0 auto;
min-height: 100vh;
display: flex;
flex-direction: column;
}
.header {
background-color: #2c3e50;
color: white;
padding: 1rem;
display: flex;
justify-content: space-between;
align-items: center;
position: fixed;
top: 0;
width: 100%;
z-index: 10;
}
.game-controls {
text-align: center;
flex: 1;
}
.game-button {
background-color: #3498db;
color: white;
border: none;
padding: 0.5rem 1rem;
border-radius: 4px;
font-size: 1rem;
cursor: pointer;
}
.header-buttons {
display: flex;
gap: 0.5rem;
}
.header-button {
background-color: transparent;
color: white;
border: none;
font-size: 1.2rem;
cursor: pointer;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
}
.header-button:hover {
background-color: rgba(255, 255, 255, 0.1);
}
.carousel-container {
margin-top: 70px;
width: 100%;
overflow: hidden;
flex: 1;
touch-action: pan-x;
}
.carousel {
display: flex;
transition: transform 0.3s ease;
height: calc(100vh - 70px);
}
.player-card {
min-width: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 1rem;
transition: all 0.3s ease;
}
.active-player {
opacity: 1;
}
.inactive-player {
opacity: 0.6;
}
/* New styles for timer active state */
.player-timer {
font-size: 4rem;
font-weight: bold;
margin: 1rem 0;
padding: 0.5rem 1.5rem;
border-radius: 12px;
position: relative;
}
/* Timer background effect when game is running */
.timer-active {
background-color: #ffecee; /* Light red base color */
box-shadow: 0 0 15px rgba(231, 76, 60, 0.5);
animation: pulsate 1.5s ease-out infinite;
}
/* Timer of a player that has run out of time */
.timer-finished {
color: #e74c3c;
text-decoration: line-through;
opacity: 0.7;
}
/* Pulsating animation */
@keyframes pulsate {
0% {
box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
background-color: #ffecee;
}
50% {
box-shadow: 0 0 20px 0 rgba(231, 76, 60, 0.5);
background-color: #ffe0e0;
}
100% {
box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
background-color: #ffecee;
}
}
.player-image {
width: 120px;
height: 120px;
border-radius: 50%;
background-color: #ddd;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 1rem;
overflow: hidden;
}
.player-image img {
width: 100%;
height: 100%;
object-fit: cover;
}
.player-image i {
font-size: 3rem;
color: #888;
}
.player-name {
font-size: 1.5rem;
margin-bottom: 0.5rem;
font-weight: bold;
}
.modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.7);
display: flex;
align-items: center;
justify-content: center;
z-index: 20;
opacity: 0;
pointer-events: none;
transition: opacity 0.3s ease;
}
.modal.active {
opacity: 1;
pointer-events: auto;
}
.modal-content {
background-color: white;
padding: 2rem;
border-radius: 8px;
width: 90%;
max-width: 500px;
}
.form-group {
margin-bottom: 1rem;
}
.form-group label {
display: block;
margin-bottom: 0.5rem;
font-weight: bold;
}
.form-group input {
width: 100%;
padding: 0.5rem;
border: 1px solid #ddd;
border-radius: 4px;
}
.form-buttons {
display: flex;
justify-content: space-between;
margin-top: 1rem;
}
.form-buttons button {
padding: 0.5rem 1rem;
border: none;
border-radius: 4px;
cursor: pointer;
flex: 1;
margin: 0 0.5rem;
}
.form-buttons button:first-child {
margin-left: 0;
}
.form-buttons button:last-child {
margin-right: 0;
}
.delete-button-container {
margin-top: 1rem;
}
.save-button {
background-color: #27ae60;
color: white;
}
.cancel-button {
background-color: #e74c3c;
color: white;
}
.delete-button {
background-color: #e74c3c;
color: white;
width: 100%;
}