mirror of
https://github.com/mudabbir-ahmad/peworkshop.git
synced 2026-10-07 19:50:20 +00:00
346 lines
7.8 KiB
CSS
346 lines
7.8 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 */
|
|
display: block; /* Change from flex to block for proper scrolling */
|
|
}
|
|
|
|
.treasure-map {
|
|
position: relative;
|
|
width: fit-content; /* Change from 100% to fit-content to allow natural svg size */
|
|
min-width: 100%; /* Ensure it's at least full width */
|
|
height: fit-content;
|
|
min-height: 100%;
|
|
display: flex; /* Keep flex for alignment */
|
|
justify-content: flex-end; /* Align to the right */
|
|
align-items: flex-start; /* Align to the top */
|
|
}
|
|
|
|
/* SVG container for better scrolling and zooming */
|
|
.svg-container {
|
|
position: relative;
|
|
width: fit-content; /* Allow natural width */
|
|
height: fit-content; /* Allow natural height */
|
|
display: block; /* Change to block for proper scrolling */
|
|
overflow: visible; /* Show content beyond boundaries */
|
|
z-index: 5; /* Ensure it's above the background */
|
|
}
|
|
|
|
.svg-container svg {
|
|
max-width: none; /* Remove max-width limitation */
|
|
width: auto;
|
|
height: auto;
|
|
display: block;
|
|
object-fit: none; /* Don't constrain the SVG */
|
|
position: relative;
|
|
}
|
|
|
|
/* Force SVG elements to show properly with z-index */
|
|
.svg-container svg * {
|
|
transform-box: fill-box;
|
|
}
|
|
|
|
/* Ensure the clue points overlay is always on top */
|
|
.svg-container svg .clue-points-overlay {
|
|
position: relative !important;
|
|
z-index: 9999 !important;
|
|
pointer-events: all !important;
|
|
}
|
|
|
|
/* Make clue points very visible with stronger styling */
|
|
.svg-container .clue-point {
|
|
fill-opacity: 1 !important;
|
|
stroke-opacity: 1 !important;
|
|
pointer-events: all !important;
|
|
cursor: pointer !important;
|
|
stroke-width: 3px !important;
|
|
r: 14px !important;
|
|
filter: drop-shadow(0px 0px 5px rgba(0, 0, 0, 0.7)) !important;
|
|
}
|
|
|
|
/* Remove the default map background when we have the processed SVG */
|
|
.svg-container + .map-background {
|
|
display: none;
|
|
}
|
|
|
|
/* Map background - only shown when SVG is loading */
|
|
.map-background {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0; /* Align to the right */
|
|
width: 100vw; /* Full viewport width */
|
|
height: auto;
|
|
background-image: url("/images/map.svg");
|
|
background-size: auto; /* Don't resize the background */
|
|
background-position: top right; /* Position at top right */
|
|
background-repeat: no-repeat;
|
|
z-index: 3; /* Lower z-index than the processed SVG */
|
|
}
|
|
|
|
/* Circle elements in the SVG map - attach to a container class */
|
|
.svg-container circle {
|
|
cursor: pointer;
|
|
transition: fill 0.3s ease; /* Only transition the fill color, not size */
|
|
}
|
|
|
|
.svg-container circle:hover {
|
|
fill: #ffb74d !important; /* Only change color on hover, no movement */
|
|
}
|
|
|
|
/* Circle elements in the SVG map - attach to a container class */
|
|
.svg-container circle.clue-point {
|
|
cursor: pointer;
|
|
transition: fill 0.3s ease, stroke-width 0.3s ease;
|
|
pointer-events: all; /* Ensure clicks are detected */
|
|
stroke-width: 2px;
|
|
r: 8; /* Set a minimum radius for all clue points */
|
|
}
|
|
|
|
/* Improve circle visibility and interactivity */
|
|
.svg-container circle.clue-point {
|
|
cursor: pointer !important;
|
|
transition: all 0.3s ease;
|
|
pointer-events: all !important;
|
|
stroke-width: 2px;
|
|
r: 12px; /* Larger radius for better visibility and easier clicks */
|
|
z-index: 10;
|
|
position: relative;
|
|
}
|
|
|
|
/* Enhance hover effect */
|
|
.svg-container circle.clue-point:hover {
|
|
fill: #ffb74d !important; /* Orange hover color */
|
|
stroke: #ff6d00 !important;
|
|
stroke-width: 4px !important;
|
|
transform: scale(1.2);
|
|
z-index: 20;
|
|
filter: drop-shadow(0px 0px 4px rgba(0, 0, 0, 0.5));
|
|
}
|
|
|
|
/* Invisible click areas for easier interaction */
|
|
.svg-container circle.clue-point-click-area {
|
|
pointer-events: all !important;
|
|
cursor: pointer !important;
|
|
opacity: 0.01; /* Nearly invisible but still interactive */
|
|
z-index: 5;
|
|
}
|
|
|
|
/* Create custom animation for the current clue */
|
|
@keyframes clue-point-pulse {
|
|
0% {
|
|
stroke-width: 3px;
|
|
transform: scale(1);
|
|
filter: drop-shadow(0px 0px 2px rgba(255, 152, 0, 0.7));
|
|
}
|
|
50% {
|
|
stroke-width: 5px;
|
|
transform: scale(1.2);
|
|
filter: drop-shadow(0px 0px 8px rgba(255, 152, 0, 0.9));
|
|
}
|
|
100% {
|
|
stroke-width: 3px;
|
|
transform: scale(1);
|
|
filter: drop-shadow(0px 0px 2px rgba(255, 152, 0, 0.7));
|
|
}
|
|
}
|
|
|
|
.svg-container circle.clue-point:hover {
|
|
fill: #ffb74d !important; /* Orange hover color */
|
|
stroke: #ff6d00;
|
|
stroke-width: 3px;
|
|
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: 100%;
|
|
width: 100%;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
z-index: 50;
|
|
background-color: rgba(105, 181, 168, 0.8);
|
|
}
|
|
|
|
.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: fixed; /* Changed from sticky to fixed */
|
|
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 */
|
|
margin: 0; /* Added margin property */
|
|
height: auto; /* Added height property */
|
|
}
|
|
|
|
.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;
|
|
}
|
|
|
|
/* Refresh map button styling */
|
|
.refresh-map-button {
|
|
position: fixed;
|
|
bottom: 80px;
|
|
right: 20px;
|
|
background-color: rgba(104, 84, 60, 0.9);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 8px;
|
|
padding: 8px 16px;
|
|
font-size: 14px;
|
|
cursor: pointer;
|
|
z-index: 1000;
|
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.refresh-map-button:hover {
|
|
background-color: rgba(104, 84, 60, 1);
|
|
}
|
|
|
|
/* 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;
|
|
}
|
|
}
|