 /* Import fonts */
 @import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Quicksand:wght@400;700&display=swap');


 * {
     box-sizing: border-box;
 }

 #tabs,
 .tab,
 .button-container {
     max-width: 100%;
     overflow-x: hidden;
     /* Prevent any content overflow */
 }

 .button-container {
     flex-wrap: wrap;
     max-width: 100%;
     /* Prevent items from exceeding container width */
     overflow-x: hidden;
     /* Hide any extra overflow */
 }

 .tab {
     width: 100%;
     /* Ensures consistency */
     height: 100%;
     /* Prevent stray elements */
     overflow: hidden;
     left: 0;
     top: 0;
 }

 .tab:not(.active) {
     visibility: hidden;
     /* Hide inactive tabs completely */
 }



 html,
 body {
     margin: 0;
     padding: 0;
     overflow-x: hidden;
     /* Prevent horizontal scrolling */
     width: 100%;
     box-sizing: border-box;
     /* Ensures padding and borders are included in width calculations */
 }


 /* Festive Theme */
 body {
     font-family: 'Quicksand', sans-serif;
     background-color: #fff8e1;
     color: #333;
     margin: 0;
     padding: 0;
 }

 header {
     background-color: #D32F2F;
     color: white;
     text-align: center;
     padding: 1rem;
     font-family: 'Pacifico', cursive;
 }

 .section {
     padding: 1rem;
     margin-bottom: 4rem;
     text-align: center;
 }

 .tab {
     display: none;
     /* Fully hide inactive tabs */
     position: absolute;
     /* Prevent them from occupying space */
     top: 0;
     left: 0;
     width: 100%;
     /* Ensures consistent layout */
     height: 100%;
     /* Ensures no stray elements are visible */
     overflow: hidden;
     /* Hides any content */
 }

 .tab.active {
     display: block;
     /* Show only the active tab */
     position: relative;
     /* Restore normal layout for the active tab */
     height: auto;
     /* Allow the active tab to expand as needed */
     overflow: visible;
 }

 #tabs {
     position: relative;
     /* Contain all tabs */
     height: auto;
     /* Adjust height dynamically based on the active tab */
     overflow: hidden;
     /* Prevent hidden tabs from being scrollable */
 }


 .rule-list li.grayed {
     background-color: #ccc;
     /* Gray background */
     color: #999;
     /* Dimmed text */
     pointer-events: none;
     /* Disable click interaction */
     opacity: 0.6;
 }


 .pub-list,
 .rule-list {
     margin: 0;
     padding: 0;
     list-style: none;
 }

 .pub-list li,
 .rule-list li {
     padding: 0.5rem;
     margin: 0.5rem 0;
     background-color: #fff;
     border: 1px solid #FFD700;
     border-radius: 5px;
     cursor: pointer;
 }

 .pub-list li.selected,
 .rule-list li.selected {
     background-color: #388E3C;
     color: white;
     font-weight: bold;
 }


 .button {
     display: inline-block;
     margin: 0.5rem;
     padding: 10px 20px;
     background-color: #D32F2F;
     color: white;
     border: none;
     border-radius: 5px;
     cursor: pointer;
     font-size: 16px;
     transition: background-color 0.3s ease;
 }

 .button:hover {
     background-color: #B71C1C;
 }

 .button-container {
     display: flex;
     justify-content: center;
     gap: 1rem;
     margin-top: 20px;
 }

 footer {
     background-color: #D32F2F;
     color: white;
     text-align: center;
     padding: 0.5rem;
     font-size: 0.8rem;
     position: fixed;
     bottom: 0;
     left: 0;
     width: 100%;
     height: auto;
     z-index: 1000;
     /* Ensure it stays above all content */
 }



 #final-map {
     position: relative;
     /* Prevents overlap issues */
     height: 300px;
     /* Fixed height */
     margin-bottom: 5rem;
     /* Space before footer */
     border: 2px solid #FFD700;
     border-radius: 8px;
     overflow: hidden;
     /* Prevents unwanted expansion */
 }



 .summary {
     background-color: #fff;
     border: 1px solid #FFD700;
     border-radius: 8px;
     padding: 1rem;
     margin: 1rem 0;
     box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
     font-family: 'Quicksand', sans-serif;
     max-width: 400px;

 }

 #summary-container {
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     margin: 0 auto;
     max-width: 800px;
     /* Adjust width for desktop */
 }

 #map {
     width: 100%;
     max-width: 600px;
     margin: 0 auto;
     border: 2px solid #FFD700;
     border-radius: 8px;
 }

 .summary h3 {
     color: #388E3C;
     margin-bottom: 0.5rem;
 }

 .message {
     color: #D32F2F;
     font-weight: bold;
 }

 .pub-box {
     background-color: #fff;
     padding: 20px;
     border-radius: 8px;
     box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
     border: 1px solid #FFD700;
     max-width: 300px;
     text-align: center;
     margin: 20px auto;
 }

 .pub-box h3 {
     margin: 0;
     color: #388E3C;
     font-family: 'Pacifico', cursive;
 }

 .summary {
     width: 100%;
     /* Full width for responsiveness */
     max-width: 400px;
     /* Fixed width for consistency */
     box-sizing: border-box;
     /* Include padding and border */
     margin: 10px auto;
     /* Center the boxes */
     text-align: center;
 }

 #rule-indicator {
     color: #388E3C;
     /* Same color as h3 */
     font-family: 'Pacifico', cursive;
     /* Match the font */
     font-size: 1.5rem;
     /* Adjust font size to match */
     margin-bottom: 0.5rem;
     /* Consistent spacing */
     text-align: center;
     /* Ensure alignment matches */
 }

 #summary-container {
     display: flex;
     flex-wrap: wrap;
     justify-content: center;
     /* Center boxes in the container */
     gap: 20px;
     /* Consistent spacing */
 }

 .pub-box p {
     margin: 10px 0 0;
     color: #666;
 }

 /* Timer Styling */
 .timer-section {
     background-color: #FFD700;
     border-radius: 8px;
     padding: 20px;
     margin: 20px auto;
     max-width: 400px;
     color: #333;
     box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
     font-size: 18px;
     font-family: 'Quicksand', sans-serif;
 }

 .timer-section h2 {
     margin-bottom: 10px;
     color: #D32F2F;
     font-size: 24px;
     font-family: 'Pacifico', cursive;
 }


 .final-view-top {
     display: flex;
     justify-content: center;
     margin-bottom: 10px;
 }

 .final-view-bottom {
     display: flex;
     justify-content: space-evenly;
     margin-top: 10px;
 }

 .timer-section p {
     margin: 10px 0;
     font-weight: bold;
     color: #333;
 }

 .timer-section span {
     font-size: 22px;
     color: #388E3C;
 }

 #timer-next-button {
     font-size: 18px;
     padding: 15px 25px;
     width: 100%;
     max-width: 350px;
     font-weight: bold;
     margin: 10px auto;
     display: block;
 }




 .grayed {
     background-color: #ccc;
     color: #999;
     pointer-events: none;
     opacity: 0.6;
 }





 /* Modal Background */
 .modal {
     display: none;
     /* Hidden by default */
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     background: rgba(0, 0, 0, 0.5);
     z-index: 1000;
     justify-content: center;
     align-items: center;
     backdrop-filter: blur(5px);
 }

 /* Modal Content */
 .modal-content {
     background: white;
     padding: 20px;
     border-radius: 8px;
     text-align: center;
     box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
     max-width: 300px;
     width: 90%;
 }

 /* Buttons in Modal */
 .modal-buttons {
     display: flex;
     justify-content: space-between;
     margin-top: 20px;
 }

 #final-view {
     padding-bottom: 5rem;
     /* Ensures space for the footer */
     box-sizing: border-box;
 }

 #assigned-rules-display {
     color: #333;
     /* Darker text for readability */
     font-family: 'Quicksand', sans-serif;
     /* Clean font style */
     font-size: 1.2rem;
     /* Slightly larger font */
     font-weight: bold;
     /* Emphasize the text */
 }



 #final-screen {
     background: linear-gradient(to bottom, #FF0000, #00FF00);
     color: white;
     text-align: center;
     padding: 2rem;
     animation: fadeIn 2s ease;

     /* Ensure it fills the viewport */
     height: 100vh;
     /* Full height of the viewport */
     display: flex;
     flex-direction: column;
     justify-content: center;
     align-items: center;
     margin: 0;
     /* Remove any margins that might break the layout */
     box-sizing: border-box;
     /* Include padding in the height */
 }

 @keyframes fadeIn {
     from {
         opacity: 0;
     }

     to {
         opacity: 1;
     }
 }

 #final-screen h2 {
     font-family: 'Pacifico', cursive;
     font-size: 3rem;
     color: #FFD700;
     text-shadow: 0 0 10px #FFD700, 0 0 20px #FF4500;
 }


 .leaflet-marker-icon {
     background-color: #D32F2F;
     color: white;
     font-size: 16px;
     font-weight: bold;
     border: 2px solid #FFD700;
     border-radius: 50%;
     text-align: center;
     line-height: 32px;
     width: 32px;
     height: 32px;
 }

 .custom-pin-1::after {
     content: "1";
 }

 .custom-pin-2::after {
     content: "2";
 }

 .custom-pin-3::after {
     content: "3";
 }

 .custom-pin-4::after {
     content: "4";
 }

 .custom-pin-5::after {
     content: "5";
 }

 .custom-pin-6::after {
     content: "6";
 }


 #rules-section {
     text-align: center;
     padding: 2rem;
     background-color: #fff8e1;
     /* Festive background */
     color: #333;
     border-radius: 8px;
     /* Add rounded corners for a softer look */
     box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
     /* Subtle shadow for depth */
 }

 #rules-section h2 {
     font-family: 'Pacifico', cursive;
     color: #D32F2F;
     /* Festive red for the title */
     margin-bottom: 1rem;
     font-size: 2rem;
     /* Larger title for prominence */
     text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
     /* Subtle glow effect */
 }

 #rules-section p {
     font-family: 'Quicksand', sans-serif;
     font-size: 1.2rem;
     color: #555;
     margin-bottom: 1.5rem;
 }

 #rules-section ul {
     list-style-type: none;
     /* Remove default bullets */
     padding: 0;
     margin: 0;
     text-align: left;
     /* Align list to the left for readability */
     font-family: 'Quicksand', sans-serif;
 }

 #rules-section li {
     margin-bottom: 1rem;
     font-size: 1.1rem;
     color: #333;
     line-height: 1.6;
 }

 #rules-section li strong {
     color: #D32F2F;
     /* Highlight steps with festive red */
     font-weight: bold;
 }

 #rules-section li ul {
     list-style-type: disc;
     /* Add bullets for nested lists */
     padding-left: 1.5rem;
 }

 #rules-section li ul li {
     margin-bottom: 0.5rem;
     font-size: 1rem;
     color: #555;
 }

 #rules-section li ul li::before {
     content: '';
     /* Custom emojis already included in HTML */
 }

 .custom-rule-container {
     margin: 1rem 0;
     text-align: center;
 }

 .custom-pub-container {
     text-align: center;
     margin: 1rem 0;
 }

 .custom-pub-container input {
     padding: 0.5rem;
     width: 60%;
     margin-right: 0.5rem;
     border: 1px solid #FFD700;
     border-radius: 5px;
     font-size: 16px;
 }


 .custom-rule-container input {
     padding: 0.5rem;
     width: 60%;
     margin-right: 0.5rem;
     border: 1px solid #FFD700;
     border-radius: 5px;
     font-size: 16px;
 }

 .custom-rule-container button {
     padding: 0.5rem 1rem;
     font-size: 16px;
     background-color: #388E3C;
     color: white;
     border: none;
     border-radius: 5px;
     cursor: pointer;
 }

 .custom-rule-container button:hover {
     background-color: #2E7D32;
 }

 #rules-section .button-container {
     margin-top: 2rem;
 }

 #rules-section .button {
     background-color: #D32F2F;
     /* Match button to the theme */
     color: #fff;
     font-size: 1.2rem;
     padding: 0.8rem 2rem;
     border: none;
     border-radius: 5px;
     cursor: pointer;
     transition: background-color 0.3s ease;
 }

 #rules-section .button:hover {
     background-color: #B71C1C;
     /* Darker red on hover */
 }

 #rules-section .button:active {
     transform: scale(0.98);
     /* Add a press effect */
 }


 .small-button {
     font-size: 1rem;
     /* Smaller font size */
     padding: 0.5rem 1.5rem;
     /* Adjust padding */
     background-color: #D32F2F;
     /* Festive red */
     color: #fff;
     border: none;
     border-radius: 5px;
     cursor: pointer;
     transition: background-color 0.3s ease;
 }

 .small-button:hover {
     background-color: #B71C1C;
     /* Darker red on hover */
 }

 .small-button:active {
     transform: scale(0.98);
     /* Press effect */
 }

 header .small-button {
     margin-top: 1rem;
     /* Add spacing from header content */
 }