Files
peworkshop/app/(main)/map/map.module.css
T
2025-03-15 16:30:04 +00:00

227 lines
4.1 KiB
CSS

.map-page {
display: flex;
flex-direction: column;
width: 100%;
height: 100vh; /* Full viewport height */
overflow: hidden; /* Hide overflow at page level */
position: relative;
background-color: #69b5a8;
}
.map-banner {
background-color: #68543c;
color: white;
padding: 15px;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 2px solid #4a3c2a;
z-index: 10;
flex-shrink: 0; /* Prevent banner from shrinking */
}
.team-name {
font-size: 18px;
font-weight: bold;
flex: 1;
text-align: left;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding-right: 5px;
}
.elapsed-time {
text-align: center;
padding: 5px 10px;
background-color: rgba(0, 0, 0, 0.2);
border-radius: 8px;
flex: 0 0 auto; /* Don't grow or shrink */
margin: 0 10px;
}
.time-value {
font-size: 18px;
font-weight: bold;
}
.team-code {
font-size: 16px;
font-weight: bold;
flex: 1;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding-left: 5px;
}
/* Map container takes all available space */
.map-container {
flex: 1; /* Take all available space */
position: relative;
width: 100%;
height: 100%;
background-color: #69b5a8; /* Background color */
overflow: auto; /* Enable scrolling */
}
.treasure-map {
position: relative; /* Changed from absolute to relative */
width: 100%;
height: 100%;
min-width: 100%;
min-height: 100%;
}
/* SVG container for better scrolling and zooming */
.svg-container {
position: relative;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
overflow: auto;
}
.svg-container svg {
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
display: block;
transform-origin: center center;
}
/* Map background - display as full-page map */
.map-background {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
min-width: 100%;
min-height: 100%;
background-image: url("/images/map.svg");
background-size: contain; /* Change back to contain for proper aspect ratio */
background-position: center;
background-repeat: no-repeat;
z-index: 5;
}
/* Circle elements in the SVG map - attach to a container class */
.svg-container circle {
cursor: pointer;
transition: fill 0.3s ease, transform 0.3s ease;
}
.svg-container circle:hover {
fill: #ffb74d !important;
transform: scale(1.1);
}
/* Remaining styles unchanged */
.map-svg {
width: 100% !important; /* Override Next.js Image default width */
height: auto !important; /* Override Next.js Image default height */
max-width: none; /* Allow image to grow beyond container */
object-fit: contain;
display: block;
}
.loading-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
width: 100%;
}
.loading-spinner {
border: 4px solid #f3f3f3;
border-top: 4px solid #68543c;
border-radius: 50%;
width: 40px;
height: 40px;
animation: spin 1s linear infinite;
margin-bottom: 20px;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.map-error {
padding: 20px;
text-align: center;
}
/* Navigation bar - now sticky at the bottom */
.nav-bar {
display: flex;
justify-content: space-around;
background-color: white;
border-top: 1px solid #ddd;
padding: 10px 0;
position: sticky; /* Sticky positioning */
bottom: 0; /* Stick to bottom */
left: 0;
width: 100%;
box-sizing: border-box;
z-index: 100; /* Ensure it stays on top */
flex-shrink: 0; /* Prevent navbar from shrinking */
}
.nav-item {
display: flex;
flex-direction: column;
align-items: center;
text-decoration: none;
color: #666;
flex: 1;
padding: 8px 0;
}
.nav-icon {
font-size: 22px;
margin-bottom: 3px;
}
.nav-label {
font-size: 12px;
}
.nav-item.active {
color: #68543c;
}
/* Make sure the map is responsive */
@media (max-width: 480px) {
.team-name {
font-size: 16px;
}
.team-code {
font-size: 14px;
}
.time-value {
font-size: 16px;
}
.nav-icon {
font-size: 20px;
}
.nav-label {
font-size: 11px;
}
}