* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ffeb3b;
    --primary-dark: #ffc107;
    --accent-color: #ff9800;
    --accent-dark: #e68a00;
    --secondary-color: #ffd54f;
    --text-color: #333;
    --link-color: #007bff;
    --link-hover-color: #0056b3;
    --grey: #888;
    --grey-light: #ddd;
    --text-dark: #8b4513;
    --background-color: #fff9e6;
    --white: #ffffff;
    --shadow-color: rgba(0,0,0,0.1);
    --border-color: #eee;
    --success-color: #d4edda;
    --success-text: #155724;
    --success-border: #c3e6cb;
    --error-color: #f8d7da;
    --error-text: #721c24;
    --error-border: #f5c6cb;
    --warning-color: #ffeb3b;
    --warning-text: #db8400;
    --warning-border: #ffc107;

    --width-full: 1200px;
    --width-meduim: 800px;
    --width-narrow: 500px;

    --table-header-bg: #fff3e0;
    --table-row-hover: #fcf7e8;
    --table-border: #f5f5f5;
    --table-text: #555;
    
    --font-mono: 'Fira Code', monospace;
    --font-sans: 'Open Sans', sans-serif;

}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-sans);
}

p {
    margin-bottom: 1rem;
}

h1, h2 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

h1.main-title {
    color: var(--text-color);
    text-align: center;
    font-size: 3em;
}

/* Basic link styling for the entire page */
a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

.success {
    color: green;
}

.error {
    color: red;
}

.info {
    color: var(--grey);
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    font-family: var(--font-mono);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Ensure connection status is aligned to the right on desktop */
@media (min-width: 769px) {
    .connection-status {
        text-align: right;
    }
}

.connection-status p {
    margin: 0.25rem 0
}

.connection-status .status-normal {
    color: green;
    font-weight: bold;
}

.connection-status .status-down {
    color: red;
    font-weight: bold;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-dark);
}

.logo a {
    text-decoration: none;
    color: inherit;
}

.logo img {
    max-width: 60px;
    height: auto;
    margin: -18px 0;
}

.logo span {
    color: var(--accent-color);
}

/* Navigation Menu */
nav {
    background-color: var(--primary-color);
    padding: 0.8rem 0;
    /* box-shadow: 0 2px 10px var(--shadow-color); */
    margin-bottom: 2rem;
    border-top: 2px solid black;
    border-bottom: 2px solid black;
    font-family: var(--font-mono);
}

nav ul {
    max-width: var(--width-full);
    margin: 0 auto;
    padding: 0 1rem;
    list-style: none;
    display: flex;
}

nav li {
    border-left: 1px solid var(--grey);
    border-right: 1px solid var(--grey);
}

nav li:first-child {
    border-left: none;
}

nav li:last-child {
    border-right: none;
}

nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    padding: 0.8rem 1rem;
    transition: background-color 0.3s;
    white-space: nowrap;
}

nav a:hover {
    color: var(--text-dark);
    background-color: var(--secondary-color);
    text-decoration: none;
}

nav a.active {
    background-color: var(--accent-color);
    margin: 0 -2px;
    padding: 0.8rem calc(1rem + 2px);
    color: var(--white);
    z-index: 1;
    position: relative;
}

/* Show dropdown when clicked */
.show {
    display: block;
}

/* Table Styles */
table.table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: var(--white);
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow-color);
}

table.table th,
table.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--table-border);
}

table.table th {
    background-color: var(--accent-color);
    color: var(--white);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--table-border);
}

table.table tr:hover {
    background-color: var(--table-row-hover);
}

table.table tr:last-child td {
    border-bottom: none;
}

/* Responsive table */
@media (max-width: 768px) {
    table.table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
}

/* Form styles */
form div {
    margin-bottom: 15px;
}

form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

form input[type="text"],
form input[type="number"],
form input[type="date"],
form input[type="time"],
form select,
form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 16px;
    box-sizing: border-box;
    background-color: var(--white);
}

form input[type="text"]:focus,
form input[type="number"]:focus,
form select:focus,
form textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

/* New CSS class for narrow inputs */
.input-narrow {
    max-width: 200px;
}

form button,
form input[type="submit"],
.btn {
    background-color: #4CAF50;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

form button:hover,
.btn:hover {
    background-color: #45a049;
}

form button:active,
.btn:active {
    transform: translateY(1px);
}

/* Add lighter placeholder text */
input[type="text"]::placeholder,
textarea::placeholder {
    color: var(--grey)
}

ul.errors {
    color: #DD0000;
    padding: 0;
    list-style: none;
}

pre.console {
    text-align: left;
    background-color: black;
    color: #00FF00;
    padding: 10px;
    border-radius: 5px;
}

#popup {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    display: none;
    color: white;
}
#popup.success {
    background-color: green;
}
#popup.error {
    background-color: red;
}

.centred {
    text-align: center;
}

/* Plain lists */
ul.links {
    list-style-type: none;
    padding: 0;
}

ul.links li {
    margin: 0.4rem 0;
}

ul.links li:last-child {
    border-bottom: none;
}

ul.links .info {
    font-size: 0.9em;
    text-decoration: none;
}

/* Style for small links (like font size controls) */
.small-links {
    font-size: 0.9em;
}

.small-links a {
    color: var(--link-color);
    text-decoration: none;
}

.small-links a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

/* Shared Section Styles */
.section {
    background: var(--white);
    /* border-radius: 10px;
    box-shadow: 0 4px 15px var(--shadow-color); */
    padding: 1rem 2rem 2rem;
    margin-bottom: 2rem;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid var(--grey-light)
}

.section-title {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

hr {
    border: 0;
    height: 2px;
    background-color: var(--primary-color);
    margin: 1.5rem 0;
}

/* Hero Section */

.hero-section {
    border-radius: 10px;
}

.prawn .hero-section {
    text-align: center;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 2rem;
    background-image: url('../img/prawn.jpg');
    height: 500px;
    background-size: contain;
}

.ascii-art {
    background-color: black;
    font-family: var(--font-mono);
    display: inline-block;
    font-size: 8px;
}

.lemons .hero-section {
    background: black;
    text-align: center;
    position: relative;
    overflow-x: hidden;
}

.lemons .hero-section h1 {
    font-family: var(--font-mono);
    margin: 1rem 0 0;
    color: var(--primary-color);
    position:absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%); /* Fine-tune centering */
}

.hero-content {
    background: rgba(255, 255, 255, 0.7);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px var(--shadow-color);
    max-width: 80%;
    backdrop-filter: blur(4px);
}

.hero-content h1 {
    color: var(--text-color);
}

.hero-content p {
    color: var(--text-color);
    font-size: 1.2rem;
}

.lemon-image {
    max-width: 400px;
    height: auto;
    border-radius: 10px;
    margin: 1rem 0;
}

/* Search Section */
.search-section {
    text-align: center;
}

.search-bar {
    display: flex;
    max-width: 700px;
    margin: 0 auto;
}

.search-bar input[type="text"] {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--secondary-color);
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
    outline: none;
}

.search-bar button,
.search-bar input[type="submit"] {
    background: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 0 2rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.search-bar button:hover {
    background: var(--accent-dark);
}

.panel-title {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.event-list {
    list-style: none;
}

.event-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
}

.event-item:last-child {
    border-bottom: none;
}

.event-time {
    background: var(--primary-color);
    color: var(--text-dark);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 1rem;
    min-width: 80px;
    text-align: center;
}

.event-item h3 {
    color: var(--accent-color);
    margin-bottom: 0.3rem;
}

.event-item.internet-down .event-time {
    background: var(--error-color);
}

.event-item.internet-down h3 {
    color: var(--error-text);
}

.event-item.internet-restored .event-time {
    background: var(--success-color);
}

.event-item.internet-restored h3 {
    color: var(--success-text);
}

.event-content p {
    color: #666;
    line-height: 1.5;
    margin-bottom: 0;
}

.streaming-menu {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 1rem;
}

.streaming-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--text-color);
    text-decoration: none;
    padding: 1rem;
    border: none;
    border-radius: 0;
    transition: all 0.3s ease;
    background-color: black;
}

/* Responsive behavior for grid layouts */
@media (max-width: 768px) {
    .streaming-menu {
        grid-template-columns: 1fr;
    }
}

.streaming-item:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px var(--shadow-color);
    text-decoration: none;
}

.streaming-item-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.streaming-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 0.5rem;
}

.streaming-label {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--accent-color);
}

.container {
    max-width: var(--width-full);
    margin: 0 auto;
    padding: 0 1rem;
}

.width-medium {
    max-width: var(--width-meduim);
}

.width-narrow {
    max-width: var(--width-narrow);
}

.width-medium-centered {
    max-width: var(--width-meduim);
    margin: 15px auto;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
}

.alert.success {
    background-color: var(--success-color);
    color: var(--success-text);
    border: 1px solid var(--success-border);
}

.alert.error {
    background-color: var(--error-color);
    color: var(--error-text);
    border: 1px solid var(--error-border);
}

.alert.warning {
    background-color: var(--warning-color);
    color: var(--warning-text);
    border: 1px solid var(--warning-border);
}

/* Prominent Sign Alert - for LED signs */
.sign-alert {
    background-color: #ff0000 !important; /* Bright red background */
    color: #ffff00 !important; /* Bright yellow text */
    font-size: 1.5rem !important; /* Slightly smaller text */
    font-weight: bold !important;
    padding: 1rem !important; /* Reduced padding */
    border: 3px solid #ff9900 !important; /* Thinner orange border */
    border-radius: 8px !important;
    text-align: center !important;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.8) !important; /* Reduced glow */
    animation: pulse 1s infinite !important; /* Pulsing effect */
    margin: 1rem 0 !important;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.flashed-alerts .alert {
    opacity: 1;
    transition: opacity 2s ease-out;
}

.flashed-alerts .alert.fade-out {
    opacity: 0;
}

.wide {
    width: 100%;
    max-width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav li {
        margin: 1rem 0.5rem;
        border: none;
    }
    
    .search-bar {
        flex-direction: column;
    }
    
    .search-bar input {
        border-radius: 4px;
        margin-bottom: 1rem;
    }
    
    .search-bar button {
        border-radius: 4px;
        padding: 1rem;
    }
}

/* Events Page Styles */
.events-container {
    margin-bottom: 2rem;
}

.event-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
}

.event-item:last-child {
    border-bottom: none;
}

.event-time {
    background: var(--primary-color);
    color: var(--text-dark);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 1rem;
    min-width: 80px;
    text-align: center;
}

.event-item h3 {
    color: var(--accent-color);
    margin-bottom: 0.3rem;
}

.event-content p {
    color: #666;
    line-height: 1.5;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.pagination .btn {
    background-color: var(--primary-color);
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s;
}

.pagination .btn:hover {
    background-color: var(--secondary-color);
}

.pagination span {
    font-weight: bold;
}

a.btn {
    background-color: #4CAF50;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    text-decoration: none;
}

a.btn:hover {
    background-color: #45a049;
    text-decoration: none;
}

.m-top {
    margin-top: 1rem;
}

.m-bottom {
    margin-bottom: 1rem;
}

/* Margins to match sections */
.m-top-section {
    margin-top: 2rem;
}

.m-bottom-section {
	margin-bottom: 2rem;
}

/* Back link styling */
.back-link {
	margin: 1.5rem 0 0;
	text-align: center;
}

.back-link a {
	color: var(--link-color);
	text-decoration: none;
	display: inline-block;
	position: relative;
	text-decoration: none;
}

.back-link a::before {
	content: "←";
	margin-right: 0.5rem;
	color: var(--link-color);
}

.back-link a:hover span {
	color: var(--link-hover-color);
	text-decoration: underline;
}

.back-link a:hover::before {
	color: var(--link-hover-color);
}

.error-section {
    border-radius: 10px;
    background: black;
    text-align: center;
}

.ascii-art-bug {
    text-align: left;
    background-color: black;
    font-family: var(--font-mono);
    display: inline-block;
    font-size: 12px;
    color: #00ff00;
}

.monospace-error {
    background-color: black;
    font-family: var(--font-mono);
    display: inline-block;
    font-size: 12px;
    color: #00ff00;
    margin-bottom: 2rem;
    max-width: 500px;
}

/* Hidden class for UI elements */
.hidden {
    display: none;
}

/* Main Menu Styles (used in menu.html and games.html) */
div.main-menu {
    padding: 20px 0;
}

.main-menu table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.main-menu th,
.main-menu td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.main-menu th {
    background-color: var(--table-header-bg);
    color: var(--text-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.main-menu tr:hover {
    background-color: var(--table-row-hover);
}

.main-menu tr:last-child td {
    border-bottom: none;
}

.main-menu h3 {
    margin: 0;
    color: var(--accent-color);
    font-size: 1.3rem;
}

.main-menu .section-header {
    background-color: var(--white);
    border-bottom: 2px solid var(--primary-color);
    padding: 10px 15px;
}

.main-menu .section-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.main-menu .menu-item {
    padding: 8px 15px;
}

.main-menu .menu-item a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
}

.main-menu .menu-item a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

.main-menu .description {
    color: var(--grey);
    font-size: 0.9rem;
}
