Files
game-timer/css/styles.css

480 lines
8.4 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;
margin-bottom: 60px; /* Add some space for the footer */
width: 100%;
overflow: hidden;
flex: 1;
touch-action: pan-x;
}
.carousel {
display: flex;
transition: transform 0.3s ease;
height: calc(100vh - 70px);
}
/* Adjust the preview image in the modal to maintain consistency */
#imagePreview.player-image {
width: 180px; /* Slightly smaller than the main display but still larger than original 120px */
height: 180px;
margin: 0.5rem auto;
}
.player-card {
min-width: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 2rem; /* Increased from 1rem for more spacing */
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: 240px; /* Doubled from 120px */
height: 240px; /* Doubled from 120px */
border-radius: 50%;
background-color: #ddd;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 2rem; /* Increased from 1rem */
overflow: hidden;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Added shadow for better visual presence */
}
.player-image img {
width: 100%;
height: 100%;
object-fit: cover;
}
.player-image i {
font-size: 6rem; /* Doubled from 3rem */
color: #888;
}
.player-name {
font-size: 3rem; /* Doubled from 1.5rem */
margin-bottom: 1rem; /* Increased from 0.5rem */
font-weight: bold;
text-align: center;
}
.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%;
}
/* Add these styles to your styles.css file */
.image-input-container {
display: flex;
gap: 10px;
align-items: center;
margin-bottom: 10px;
}
.camera-button {
background-color: #3498db;
color: white;
border: none;
padding: 0.5rem;
border-radius: 4px;
cursor: pointer;
display: flex;
align-items: center;
gap: 5px;
}
.camera-button:hover {
background-color: #2980b9;
}
/* Optional: Hide the default file input appearance and use a custom button */
input[type="file"] {
max-width: 120px;
}
.camera-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #000;
z-index: 30;
display: none;
flex-direction: column;
}
.camera-container.active {
display: flex;
}
.camera-view {
flex: 1;
position: relative;
overflow: hidden;
}
.camera-view video {
width: 100%;
height: 100%;
object-fit: cover;
}
.camera-controls {
display: flex;
justify-content: space-around;
padding: 1rem;
background-color: #222;
}
.camera-button-large {
width: 60px;
height: 60px;
border-radius: 50%;
background-color: #fff;
border: 3px solid #3498db;
cursor: pointer;
}
.camera-button-cancel {
background-color: #e74c3c;
color: white;
border: none;
padding: 0.5rem 1rem;
border-radius: 4px;
cursor: pointer;
}
.app-footer {
background-color: #2c3e50;
color: white;
padding: 1rem;
text-align: center;
font-size: 0.9rem;
margin-top: auto; /* This pushes the footer to the bottom when possible */
}
.author-info {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.3rem;
}
/* Push notification controls */
.push-notification-controls {
margin-right: 10px;
}
.notification-status-container {
margin: 1rem 0;
padding: 1rem;
background-color: #f8f9fa;
border-radius: 4px;
}
.notification-status p {
margin-bottom: 0.5rem;
}
.advanced-options {
margin-top: 1rem;
display: flex;
justify-content: space-between;
border-top: 1px solid #eee;
padding-top: 1rem;
}
.advanced-options button {
padding: 0.5rem 1rem;
border: none;
border-radius: 4px;
cursor: pointer;
flex: 1;
margin: 0 0.5rem;
}
.advanced-options button:first-child {
margin-left: 0;
}
.advanced-options button:last-child {
margin-right: 0;
}
/* Status indicators */
.status-granted {
color: #28a745;
font-weight: bold;
}
.status-denied {
color: #dc3545;
font-weight: bold;
}
.status-default {
color: #ffc107;
font-weight: bold;
}
.status-active {
color: #28a745;
font-weight: bold;
}
.status-inactive {
color: #6c757d;
font-weight: bold;
}
/* Service Worker Message Monitor Styles */
.message-monitor-section {
margin-top: 1.5rem;
padding-top: 1rem;
border-top: 1px solid #eee;
}
.message-monitor-section h3 {
margin-bottom: 0.5rem;
}
.monitor-controls {
display: flex;
justify-content: space-between;
margin: 0.5rem 0;
}
.action-button {
background-color: #6c757d;
color: white;
border: none;
padding: 0.5rem 1rem;
border-radius: 4px;
cursor: pointer;
width: 100%;
}
.action-button:hover {
background-color: #5a6268;
}
.message-output {
background-color: #f8f9fa;
border: 1px solid #dee2e6;
border-radius: 4px;
padding: 0.75rem;
margin-top: 0.5rem;
height: 150px;
overflow-y: auto;
font-size: 0.85rem;
white-space: pre-wrap;
}