@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #1A282D; /* Dark Teal - Fallback for browsers that don't support gradients */
    background-image: linear-gradient(135deg, #1A282D 0%, #000000 100%); /* Gradient from dark teal to black */
    background-attachment: fixed; /* Ensures the background stays fixed during scroll */
    color: #e0e0e0;
    margin: 0;
    padding-top: 90px; /* Adjust padding to accommodate lowered navbar */
}

.navbar {
    background-color: transparent; /* Transparent background */
    border-radius: 15px; /* Rounded corners for the navbar container */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); /* Re-added darker transparent shadow */
    /* margin: 20px auto; */ /* Removed margin to allow full width for fixed position */
    max-width: fit-content; /* Adjust width to content */
    padding: 8px 15px; /* Padding inside the navbar */
    display: flex; /* Use flexbox for horizontal alignment */
    justify-content: center; /* Center items horizontally */
    align-items: center; /* Center items vertically */
    position: fixed; /* Make the navbar fixed */
    top: 20px; /* Lower the navbar */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%); /* Adjust for perfect centering */
    width: 90%; /* Occupy full width */
    z-index: 1000; /* Ensure it stays on top of other content */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

/* Navbar menu container for desktop */
.navbar-menu {
    display: flex;
    align-items: center;
    gap: 5px;
}

.theme-toggle-button {
    background-color: rgba(68, 68, 68, 0.7); /* Dark grey, slightly transparent */
    border: none;
    border-radius: 20px; /* Pill shape */
    padding: 8px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e0e0e0; /* Light text for dark theme */
    font-size: 1em;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin-left: 20px; /* Space from navigation links */
}

.theme-toggle-button:hover {
    background-color: rgba(90, 90, 90, 0.9);
    color: #ffffff;
}

.theme-toggle-button .moon-icon {
    font-size: 1.2em;
    color: #ffffff; /* White moon icon */
}

.theme-toggle-button .theme-name {
    margin-left: 5px;
}

.nav-link {
    display: flex; /* Changed to flex to align icon and text */
    align-items: center; /* Vertically align content */
    gap: 8px; /* Space between icon/circle and text */
    color: #b0b0b0; /* Light gray for inactive links */
    text-align: center;
    padding: 10px 15px; /* Adjusted padding */
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s;
    letter-spacing: 0.4px;
    white-space: nowrap; /* Prevent wrapping */
}

.nav-link:hover {
    color: #ffffff; /* Brighter on hover */
    background-color: rgba(0, 255, 255, 0.05); /* Subtle background on hover */
    border-radius: 8px; /* Rounded corners for hover effect */
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.4); /* Soft glow on hover */
}

.nav-link.active {
    color: #00FFFF; /* Turquoise for active link */
    background-color: rgba(0, 255, 255, 0.1); /* Slightly more prominent background for active */
    border-radius: 8px; /* Rounded corners for active effect */
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.6), 0 0 20px rgba(0, 255, 255, 0.4); /* Stronger glow for active */
    /* text-shadow: 0 0 8px rgba(0, 255, 255, 0.8); /* Text glow */
    border-bottom: none; /* Remove red border-bottom */
    position: relative; /* For pseudo-element positioning */
}

.nav-link.active::before {
    /* Removed for icon integration */
    content: none;
}

.nav-link .icon { /* New style for icons */
    font-size: 1.2em;
    margin-right: 5px;
    vertical-align: middle;
}

/* Burger Menu Button - Hidden on desktop */
.burger-menu-button {
    display: none; /* Hidden by default on desktop */
    background-color: rgba(68, 68, 68, 0.7);
    border: none;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    z-index: 1001;
    position: relative;
    transition: background-color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Mobile menu overlay - hidden on desktop */
.mobile-menu-overlay {
    display: none;
}

/* Mobile menu panel - hidden on desktop */
.mobile-menu-panel {
    display: none;
}

.burger-menu-button:hover {
    background-color: rgba(90, 90, 90, 0.9);
}

.burger-menu-button span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #e0e0e0;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.burger-menu-button.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.burger-menu-button.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu-button.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu Container */
.navbar-menu {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Crucial: Allow clicks through by default */
}

    .mobile-menu-overlay {
        display: none; /* Hidden by default on mobile */
    }
    .mobile-menu-overlay.active {
        display: block;
        opacity: 1;
        pointer-events: auto; /* Enable clicks when active */
    }

/* Mobile Menu Panel */
.mobile-menu-panel {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    max-width: 85%;
    height: 100%;
    background-color: #1a1a1a;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 20px 0;
    flex-direction: column;
    pointer-events: none; /* Allow clicks through by default */
}

    .mobile-menu-panel {
        display: none; /* Hidden by default on mobile */
    }
    .mobile-menu-panel.active {
        display: flex;
        right: 0;
        pointer-events: auto; /* Enable clicks when active */
    }

.mobile-menu-panel .nav-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 15px 20px;
    width: 100%;
    border-radius: 0;
    border-bottom: 1px solid #333;
    margin: 0;
    font-size: 16px;
    box-sizing: border-box;
    text-decoration: none;
}

.mobile-menu-panel .nav-link:hover {
    background-color: rgba(0, 255, 255, 0.1);
    box-shadow: none;
}

.mobile-menu-panel .nav-link.active {
    background-color: rgba(0, 255, 255, 0.15);
    box-shadow: none;
}

.mobile-menu-panel .nav-link:last-of-type {
    border-bottom: 1px solid #333;
}

.mobile-menu-panel .theme-toggle-button {
    width: calc(100% - 40px);
    margin: 20px auto;
    justify-content: center;
    display: flex;
}

/* New Year Theme for burger menu */
body.new-year-theme .burger-menu-button {
    background-color: rgba(173, 216, 230, 0.7);
}

body.new-year-theme .burger-menu-button:hover {
    background-color: rgba(150, 200, 220, 0.9);
}

body.new-year-theme .burger-menu-button span {
    background-color: #0056b3;
}

body.new-year-theme .mobile-menu-panel {
    background-color: #ffffff;
}

body.new-year-theme .mobile-menu-panel .nav-link {
    border-bottom: 1px solid #e0e0e0;
    color: #333;
}

body.new-year-theme .mobile-menu-panel .nav-link:hover {
    background-color: rgba(0, 86, 179, 0.1);
    color: #0056b3;
}

body.new-year-theme .mobile-menu-panel .nav-link.active {
    background-color: rgba(255, 69, 0, 0.1);
    color: #FF4500;
}

.container {
    background-color: #282828; /* Background for main content area, slightly lighter than navbar */
    padding: 40px;
    border-radius: 10px; /* More rounded corners */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7); /* Stronger, softer shadow */
    width: 100%;
    max-width: 1100px; /* Wider container */
    box-sizing: border-box;
    margin: 30px auto; /* More margin */
}

h1 {
    text-align: center;
    color: #ffffff; /* Brighter white */
    margin-bottom: 30px; /* More space below heading */
    font-size: 2.5em; /* Larger heading */
    font-weight: 700; /* Bolder */
    letter-spacing: 1px;
}

h2 {
    color: #e0e0e0;
    margin-top: 35px;
    margin-bottom: 20px;
    border-bottom: 1px solid #444444; /* Slightly softer border */
    padding-bottom: 8px;
    font-size: 1.8em;
    font-weight: 600;
}

.button {
    display: inline-block;
    background-color: #f44336; /* Red primary button, matching pepeland.net */
    color: #fff;
    padding: 12px 25px; /* Larger padding */
    border-radius: 8px; /* More rounded corners */
    text-decoration: none;
    text-align: center;
    margin: 10px 5px;
    transition: background-color 0.3s, transform 0.2s; /* Added transform for subtle animation */
    font-size: 1.1em;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: none; /* No border */
    cursor: pointer;
}

.button:hover {
    background-color: #d32f2f; /* Darker red on hover */
    transform: translateY(-2px); /* Subtle lift effect */
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    background-color: #2e2e2e; /* Table background */
    border-radius: 8px;
    overflow: hidden; /* Ensures rounded corners are visible */
}

.table-responsive {
    overflow-x: auto; /* Enable horizontal scrolling */
    width: 100%;
    margin-top: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    background-color: #2e2e2e;
}

.table-responsive table {
    margin-top: 0; /* Remove top margin as it's on the container now */
}

table th, table td {
    border: 1px solid #444444; /* Darker border for tables */
    padding: 12px;
    text-align: left;
}

.clickable-nickname {
    transition: all 0.2s ease;
    text-decoration: none;
}

.clickable-nickname:hover {
    text-decoration: underline;
    opacity: 0.8;
}

table th {
    background-color: #383838; /* Header background */
    color: #ffffff;
    font-weight: 600; /* Bolder headers */
    font-size: 1.05em;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Increased gap */
}

form label {
    margin-top: 10px;
    margin-bottom: 2px; /* Reduced margin to bring label closer to input */
    font-weight: 600;
    color: #e0e0e0;
    font-size: 1.05em;
}

form input[type="text"],
form input[type="date"],
form select,
form textarea {
    padding: 12px;
    border: 1px solid #555555; /* Darker border */
    border-radius: 6px; /* Slightly more rounded */
    background-color: #3a3a3a;
    color: #e0e0e0;
    box-sizing: border-box;
    font-size: 1em;
}

form input[type="text"]:focus,
form input[type="date"]:focus,
form select:focus,
form textarea:focus {
    outline: none;
    border-color: #f44336; /* Red highlight on focus */
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.4); /* Soft red glow */
}

form button[type="submit"] {
    background-color: #4CAF50; /* Green submit button */
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    margin-top: 20px;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
}

form button[type="submit"]:hover {
    background-color: #45A049; /* Darker green on hover */
    transform: translateY(-2px);
}

.delete-button {
    background-color: #f44336; /* Red */
    color: white;
    border: none;
    padding: 9px 15px; /* Adjusted padding */
    border-radius: 6px; /* More rounded */
    cursor: pointer;
    font-size: 0.95em;
    transition: background-color 0.3s ease, transform 0.2s;
}

.delete-button:hover {
    background-color: #d32f2f; /* Darker red */
    transform: translateY(-1px);
}

.remove-punishment-button {
    background-color: #ff9800; /* Orange for 'remove' */
    color: white;
    border: none;
    padding: 9px 15px; /* Adjusted padding */
    border-radius: 6px; /* More rounded */
    cursor: pointer;
    font-size: 0.95em;
    transition: background-color 0.3s ease, transform 0.2s;
}

.remove-punishment-button:hover {
    background-color: #e68a00; /* Darker orange */
    transform: translateY(-1px);
}

.add-reward-button {
    background-color: #4CAF50; /* Green */
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    margin: 10px 5px;
    transition: background-color 0.3s, transform 0.2s;
    font-size: 1.1em;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
}

.add-reward-button:hover {
    background-color: #45A049; /* Darker green on hover */
    transform: translateY(-2px);
}

/* Search and Filter Container */
.search-container {
    display: flex;
    gap: 20px; /* Increased gap */
    margin-bottom: 25px;
    align-items: center;
    background-color: #2e2e2e; /* Slightly darker background */
    padding: 20px; /* More padding */
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); /* Subtle shadow */
}

.search-container input {
    flex-grow: 1;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #555;
    background-color: #3a3a3a;
    color: #e0e0e0;
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Increased gap */
    margin-bottom: 25px;
    align-items: center;
    background-color: #2e2e2e; /* Slightly darker background */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); /* Subtle shadow */
}

.search-container label,
.filter-container label {
    color: #e0e0e0;
    font-weight: 500; /* Slightly bolder */
    font-size: 1em;
}

.filter-container input,
.filter-container select {
    padding: 12px;
    border: 1px solid #555;
    border-radius: 6px;
    background-color: #3a3a3a;
    color: #e0e0e0;
    font-size: 1em;
}

/* New design elements */
.questions-section {
    width: 100%;
    max-width: 1000px;
    margin: 40px auto;
    text-align: center;
    padding: 20px;
    background-color: #1c1c1c;
}

.questions-section h2 {
    font-size: 2.2em;
    color: #f0f0f0;
    margin-bottom: 10px;
    border-bottom: none;
}

.questions-section p {
    color: #bbb;
    font-size: 1.1em;
    margin-bottom: 30px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.card {
    background-color: #2a2a2a;
    border-radius: 10px;
    padding: 25px;
    text-align: left;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
}

.card-icon {
    font-size: 2.5em;
    color: #4CAF50;
    margin-bottom: 15px;
}

.card h3 {
    font-size: 1.4em;
    color: #f0f0f0;
    margin-bottom: 10px;
}

.card p {
    color: #bbb;
    font-size: 0.95em;
    line-height: 1.6;
    flex-grow: 1;
}

.card-button {
    display: inline-block;
    background-color: #3a3a3a;
    color: #4CAF50;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 20px;
    transition: background-color 0.2s, color 0.2s;
    align-self: flex-start; /* Align button to start */
}

.card-button:hover {
    background-color: #4CAF50;
    color: #fff;
}

/* Footer Styling */
.footer {
    background-color: #1a1a1a;
    color: #bbb;
    padding: 30px 20px;
    margin-top: 40px;
    width: 100%;
    max-width: 100%;
    text-align: center;
    box-sizing: border-box;
    border-top: 1px solid #2a2a2a;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}

.footer-section {
    flex: 1;
    min-width: 200px;
    margin: 15px;
}

.footer-section h4 {
    color: #f0f0f0;
    font-size: 1.1em;
    margin-bottom: 15px;
}

.footer-section p,
.footer-section ul {
    font-size: 0.9em;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li a {
    color: #bbb;
    text-decoration: none;
    margin-bottom: 8px;
    display: block;
}

.footer-section ul li a:hover {
    color: #4CAF50;
}

.social-icons a {
    color: #bbb;
    font-size: 1.5em;
    margin: 0 10px;
    text-decoration: none;
}

.social-icons a:hover {
    color: #4CAF50;
}

.footer-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #2a2a2a;
    font-size: 0.85em;
    color: #999;
    text-align: center;
}

.footer-bottom .logo {
    color: #4CAF50;
    font-size: 1.2em;
    font-weight: bold;
    margin-right: 10px;
}

/* Footer Links (already defined in previous step, kept for context) */
.footer-links a {
    color: #bbb;
    text-decoration: none;
    margin: 0 10px;
}

.footer-links a:hover {
    color: #4CAF50;
}

/* Modal Styling */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1001; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
    padding-top: 60px;
}

.modal-content {
    background-color: #2a2a2a; /* Dark background for modal */
    margin: 5% auto; /* 5% from the top and centered */
    padding: 30px;
    border: 1px solid #444;
    border-radius: 10px;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 700px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.6);
    position: relative;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #f0f0f0;
    text-decoration: none;
    cursor: pointer;
}

.modal-content h2,
.modal-content h3 {
    color: #f0f0f0;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.modal-content table {
    margin-top: 15px;
}

.modal-content table th,
.modal-content table td {
    border: 1px solid #444;
}

.modal-content table th {
    background-color: #3a3a3a;
}

.staff-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
    padding: 20px;
    background-color: #2e2e2e; /* Same as search/filter container */
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.staff-card {
    background-color: #1a1a1a; /* Darker background for the card */
    border-radius: 10px; /* Rounded corners for the card */
    overflow: hidden; /* Ensures image corners are rounded */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); /* Prominent shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: default;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
}

.staff-card.move-mode-active {
    cursor: move;
    border-color: #00FFFF;
}

.staff-card.move-mode-active:hover {
    transform: translateY(-8px); /* Lift effect on hover */
    box-shadow: 0 8px 20px rgba(0, 255, 255, 0.3);
    border-color: #00FFFF;
}

.staff-card:hover:not(.move-mode-active) {
    transform: translateY(-8px); /* Lift effect on hover */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
}

.staff-card.dragging {
    opacity: 0.5;
    border-color: #00FFFF;
    box-shadow: 0 8px 25px rgba(0, 255, 255, 0.4);
}

.staff-card-image {
    width: 100%;
    height: 180px; /* Fixed height for the image area */
    background-color: #333; /* Placeholder background color */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    color: #888;
    border-bottom: 1px solid #444;
    overflow: hidden; /* Ensure image content is clipped to bounds */
}

.staff-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the area while maintaining aspect ratio */
    border-radius: 10px 10px 0 0; /* Apply border-radius to the top of the image */
}

.staff-card-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allows info section to expand */
}

.staff-card-info h3 {
    color: #ffffff;
    font-size: 1.6em;
    margin: 0 0 10px 0;
    border-bottom: none; /* Remove border from card headings */
}

.staff-card-info p {
    color: #cccccc;
    font-size: 0.95em;
    margin-bottom: 5px;
    line-height: 1.4;
}

.staff-card-actions {
    padding: 0 20px 20px 20px; /* Padding for actions at the bottom */
    text-align: right; /* Align button to the right */
}

.staff-card-actions .delete-button {
    margin-top: 15px; /* Space above delete button */
}

.edit-staff-button {
    background-color: #007bff; /* A distinct blue for edit */
    color: white;
    border: none;
    padding: 9px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    transition: background-color 0.3s ease, transform 0.2s;
    margin-right: 10px; /* Space between edit and delete buttons */
}

.edit-staff-button:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
}

.form-group select {
    flex-grow: 1; /* Allow select to take available space */
}

.form-group.image-upload-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.form-group.image-upload-group img {
    margin-top: 10px;
    border-radius: 8px;
    object-fit: contain; /* Ensure the image fits within the preview area without cropping too much */
    max-width: 150px;
    max-height: 150px;
}

.form-group.image-upload-group input[type="file"] {
    max-width: 200px; /* Limit width of file input */
}

/* Online Stats Container */
.online-stats-container {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap on smaller screens */
    gap: 20px; /* Space between the weekly and monthly sections */
    margin-bottom: 20px; /* Space below the online stats section */
}

.online-stats-container .online-stats-section {
    flex: 1; /* Allow sections to grow and shrink */
    min-width: 300px; /* Minimum width for each section before wrapping */
}

/* Online Stats Sections */
.online-stats-section {
    background-color: #2e2e2e; /* Match search/filter container */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin-top: 25px;
}

.online-stats-section h3 {
    color: #ffffff;
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #444;
    padding-bottom: 8px;
}

.online-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.online-navigation button {
    background-color: #007bff; /* Blue for navigation buttons */
    color: white;
    border: none;
    padding: 6px 12px; /* Smaller padding */
    border-radius: 4px; /* Slightly less rounded */
    cursor: pointer;
    font-size: 0.8em; /* Smaller font size */
    transition: background-color 0.3s ease;
}

.online-navigation button:hover {
    background-color: #0056b3;
}

.online-navigation span {
    color: #e0e0e0;
    font-weight: 600;
    font-size: 1em; /* Adjusted to be slightly smaller with buttons */
}

/* Save buttons in online stats sections */
.online-stats-section .button {
    padding: 8px 18px; /* Smaller padding for save buttons */
    font-size: 0.95em; /* Smaller font size for save buttons */
    margin-top: 15px; /* Adjust margin */
}

#creditBadge {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: rgba(0, 0, 0, 0.3); /* Transparent dark background */
    color: #b0b0b0;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 12px;
    z-index: 1000;
    user-select: none;
    cursor: pointer; /* Make it clickable */
    transition: opacity 0.3s ease, background-color 0.3s ease;
}

#creditBadge:hover {
    background-color: rgba(0, 0, 0, 0.5);
    color: #ffffff;
}


/* New Year Theme overrides for online stats and snowman */
body.new-year-theme .online-stats-section {
    background-color: #f0f8ff; /* Light blue background */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body.new-year-theme .online-stats-section h3 {
    color: #0056b3;
    border-bottom: 1px solid #aaddff;
}

body.new-year-theme .online-navigation button {
    background-color: #007bff; /* Keep blue for New Year theme navigation buttons */
    color: white;
}

body.new-year-theme .online-navigation button:hover {
    background-color: #0056b3;
}

body.new-year-theme .online-navigation span {
    color: #333;
}


/* New Year Theme */
body.new-year-theme {
    font-family: 'Montserrat', sans-serif;
    background-color: #e0f2f7; /* Light blue - Fallback */
    background-image: linear-gradient(135deg, #e0f2f7 0%, #ffffff 100%); /* Blue-white gradient */
    background-attachment: fixed;
    color: #333; /* Default text color for light themes */
    margin: 0;
    padding-top: 90px;
    position: relative; /* For background decorations */
    overflow-x: hidden; /* Prevent horizontal scroll from decorations */
}

body.new-year-theme .navbar {
    background-color: transparent; /* Transparent for New Year theme as well */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Softer shadow for light theme */
}

body.new-year-theme .nav-link {
    color: #0056b3; /* Dark blue for inactive links */
}

body.new-year-theme .nav-link:hover {
    color: #003366; /* Even darker blue on hover */
}

body.new-year-theme .nav-link.active {
    color: #FF4500; /* Orange-red for active link in New Year theme */
}

body.new-year-theme .nav-link.active::before {
    content: none;
}

body.new-year-theme .theme-toggle-button {
    background-color: rgba(173, 216, 230, 0.7); /* Light blue, transparent */
    color: #0056b3; /* Dark blue text */
}

body.new-year-theme .theme-toggle-button:hover {
    background-color: rgba(150, 200, 220, 0.9);
    color: #003366;
}

body.new-year-theme .theme-toggle-button .moon-icon {
    color: #0056b3; /* Darker moon icon for light theme */
}

body.new-year-theme .container {
    background-color: #ffffff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1); /* Lighter shadow */
}

body.new-year-theme h1, body.new-year-theme h2 {
    color: #0056b3; /* Dark blue heading */
}

body.new-year-theme table {
    background-color: #f0f8ff; /* Light blue table background */
}

body.new-year-theme table th,
body.new-year-theme table td {
    border: 1px solid #aaddff; /* Light blue border for tables */
    color: #333;
}

body.new-year-theme table th {
    background-color: #cfe8ff; /* Lighter blue header background */
    color: #003366;
}

body.new-year-theme form label {
    color: #333;
}

body.new-year-theme form input[type="text"],
body.new-year-theme form input[type="date"],
body.new-year-theme form select,
body.new-year-theme form textarea {
    border: 1px solid #aaddff; /* Light blue border */
    background-color: #f0f8ff;
    color: #333;
}

body.new-year-theme form input[type="text"]:focus,
body.new-year-theme form input[type="date"]:focus,
body.new-year-theme form select:focus,
body.new-year-theme form textarea:focus {
    border-color: #FF4500; /* Orange-red highlight on focus */
    box-shadow: 0 0 0 2px rgba(255, 69, 0, 0.2); /* Soft orange-red glow */
}

body.new-year-theme .search-container,
body.new-year-theme .filter-container {
    background-color: #f0f8ff; /* Light blue background */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

body.new-year-theme .search-container input,
body.new-year-theme .filter-container input,
body.new-year-theme .filter-container select {
    border: 1px solid #aaddff;
    background-color: #ffffff;
    color: #333;
}

body.new-year-theme .search-container label,
body.new-year-theme .filter-container label {
    color: #333;
}

body.new-year-theme .staff-card-grid {
    background-color: #f0f8ff; /* Light blue background */
}

body.new-year-theme .staff-card {
    background-color: #ffffff;
}

body.new-year-theme .staff-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

body.new-year-theme .staff-card-image {
    background-color: #e6f7ff; /* Light blue placeholder */
    border-bottom: 1px solid #aaddff;
}

body.new-year-theme .staff-card-info h3 {
    color: #0056b3;
}

body.new-year-theme .staff-card-info p {
    color: #333;
}

body.new-year-theme .table-responsive {
    background-color: #f0f8ff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Background decorations for New Year theme */
body.new-year-theme {
    position: relative;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

body.new-year-theme::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://i.imgur.com/snowflakes.png'), url('https://i.imgur.com/snowmen.png'); /* Placeholder URLs */
    background-repeat: repeat;
    background-size: 100px, 150px; /* Adjust sizes as needed */
    opacity: 0.15; /* Subtle effect */
    pointer-events: none;
    z-index: -1;
}

body.new-year-theme::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://i.imgur.com/0ox6b46.jpeg'); /* Placeholder URL */
    background-repeat: repeat;
    background-size: 120px; /* Adjust size as needed */
    opacity: 0.1; /* Even more subtle */
    pointer-events: none;
    z-index: -1;
}

.online-rows-group {
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 8px;
    background-color: var(--secondary-background-color);
    margin-top: 10px;
}

.online-row-display {
    margin-bottom: 10px; /* Add space between the two rows of online stats */
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color); /* Optional: a subtle line to reinforce separation */
}

.online-row-display:last-child {
    margin-bottom: 0; /* No margin after the last row */
    border-bottom: none;
}

.online-row-display label {
    font-weight: bold;
    margin-right: 5px;
}

.low-online {
    background-color: #ffdddd; /* Light red for low online time */
    color: #cc0000; /* Darker red text */
    font-weight: bold;
}

/* Daily Online Table Specific Styles */
.absence-day {
    background-color: #ffcccc; /* Light red for absence */
    color: #cc0000; /* Darker red text */
    font-weight: bold;
}

.day-off {
    background-color: #ccffcc; /* Light green for day off */
    color: #008000; /* Darker green text */
    font-weight: bold;
}

/* Admin Page Button Styles */
.admin-button-group {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 30px;
}

.admin-button-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-button-description {
    color: #b0b0b0;
    font-size: 0.95em;
    line-height: 1.5;
    margin: 0;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border-left: 3px solid #00FFFF;
}

.admin-button {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 12px 25px;
    border-radius: 8px;
    border: none;
    text-align: center;
    font-size: 1.1em;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    width: 100%;
    max-width: 400px;
    align-self: flex-start;
}

.admin-button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.admin-button-danger {
    background-color: #f44336;
}

.admin-button-danger:hover {
    background-color: #d32f2f;
}

/* Rules Page Styles */
.rules-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.rule-block {
    background-color: #2e2e2e;
    border-radius: 8px;
    padding: 20px;
    border: 2px solid #404040;
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
}

.rule-block.move-mode-active {
    cursor: move;
    border-color: #00FFFF;
}

.rule-block.move-mode-active:hover {
    border-color: #00FFFF;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.2);
}

.rule-block:hover:not(.move-mode-active) {
    border-color: #555;
}

.rule-block.dragging {
    opacity: 0.5;
    border-color: #00FFFF;
    box-shadow: 0 8px 25px rgba(0, 255, 255, 0.4);
}

.rule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #404040;
}

.rule-number-display {
    font-size: 1.2em;
    font-weight: 600;
    color: #00FFFF;
}

.rule-number-value {
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    outline: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    min-width: 30px;
    display: inline-block;
}

.rule-number-value:focus {
    background-color: rgba(0, 255, 255, 0.1);
    border: 1px solid #00FFFF;
}

.rule-number-value:hover {
    background-color: rgba(0, 255, 255, 0.05);
}

/* Hours to Minutes Converter Panel */
.hours-to-minutes-converter {
    background-color: rgba(34, 34, 34, 0.8); /* Transparent dark background, same as navbar */
    border-radius: 15px; /* Rounded corners */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); /* Shadow */
    position: fixed; /* Make it fixed */
    top: 50%; /* Position from top - center vertically */
    left: calc(50% + 550px + 38px); /* 50% + half of max-width (1100px/2) + 1cm offset */
    transform: translateY(-50%); /* Center vertically */
    z-index: 1000; /* Ensure it stays on top */
    padding: 15px 20px; /* Padding inside */
    max-width: 250px; /* Maximum width */
    box-sizing: border-box;
}

.converter-title {
    color: #ffffff;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 8px;
}

.converter-table {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.converter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #e0e0e0;
    font-size: 0.9em;
    padding: 4px 0;
}

.converter-row span:first-child {
    color: #00FFFF;
    font-weight: 500;
}

.converter-row span:nth-child(2) {
    color: #888;
    margin: 0 8px;
}

.converter-row span:last-child {
    color: #ffffff;
    font-weight: 500;
}

/* New Year theme support for converter */
body.new-year-theme .hours-to-minutes-converter {
    background-color: rgba(173, 216, 230, 0.9); /* Light blue for new year theme */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

body.new-year-theme .converter-title {
    color: #0056b3;
    border-bottom: 1px solid rgba(0, 86, 179, 0.3);
}

body.new-year-theme .converter-row {
    color: #333;
}

body.new-year-theme .converter-row span:first-child {
    color: #007bff;
}

body.new-year-theme .converter-row span:nth-child(2) {
    color: #666;
}

body.new-year-theme .converter-row span:last-child {
    color: #0056b3;
}

.rule-actions {
    display: flex;
    gap: 10px;
}

.rule-delete-button {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.rule-delete-button:hover {
    background-color: #d32f2f;
}

.rule-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rule-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rule-field label {
    color: #b0b0b0;
    font-size: 0.95em;
    font-weight: 500;
}

.rule-description,
.rule-full-description {
    background-color: #1a1a1a;
    color: #e0e0e0;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #404040;
    min-height: 40px;
    outline: none;
    transition: border-color 0.3s ease;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.rule-description:focus,
.rule-full-description:focus {
    border-color: #00FFFF;
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

.rule-full-description {
    min-height: 100px;
}

.rule-description:empty:before,
.rule-full-description:empty:before {
    content: attr(data-placeholder);
    color: #666;
}

/* Creator/About Page Styles */
.creator-info-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.creator-block {
    background-color: #2e2e2e;
    border-radius: 8px;
    padding: 20px;
    border: 2px solid #404040;
    transition: all 0.3s ease;
    position: relative;
}

.creator-block:hover {
    border-color: #555;
}

.creator-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #404040;
    text-align: center;
}

.creator-header h2 {
    font-size: 1.5em;
    font-weight: 600;
    color: #00FFFF;
    margin: 0 0 15px 0;
}

.creator-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.stat-item {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 0.95em;
}

.stat-label {
    color: #b0b0b0;
    font-weight: 500;
}

.stat-value {
    color: #e0e0e0;
    font-weight: 600;
}

.creator-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.creator-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.creator-field label {
    color: #b0b0b0;
    font-size: 0.95em;
    font-weight: 500;
}

.creator-value {
    background-color: #1a1a1a;
    color: #e0e0e0;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #404040;
    font-size: 1em;
}

.creator-description {
    background-color: #1a1a1a;
    color: #e0e0e0;
    padding: 25px 30px;
    border-radius: 6px;
    border: 1px solid #404040;
    min-height: 100px;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.7;
    font-size: 1.05em;
    text-align: justify;
    text-indent: 1.5em;
}

.creator-description p {
    margin: 0 0 0.8em 0;
    text-indent: 1.5em;
}

.creator-description p:first-child {
    text-indent: 0;
}

.creator-description p:last-child {
    margin-bottom: 0;
}

.creator-description p strong:first-child {
    text-indent: 0;
    display: block;
    margin-bottom: 0.5em;
}

.creator-description strong {
    color: #00FFFF;
    font-weight: 600;
}

/* Creator Tabs */
.creator-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #404040;
    padding-bottom: 0;
}

.creator-tab {
    background-color: transparent;
    border: none;
    color: #b0b0b0;
    padding: 12px 20px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-weight: 500;
}

.creator-tab:hover {
    color: #ffffff;
    background-color: rgba(0, 255, 255, 0.1);
}

.creator-tab.active {
    color: #00FFFF;
    border-bottom-color: #00FFFF;
    background-color: rgba(0, 255, 255, 0.05);
}

.creator-tab-content {
    margin-top: 0;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Social Buttons */
.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.social-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-weight: 500;
    font-size: 1em;
}

.social-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.social-icon {
    font-size: 1.3em;
    display: inline-block;
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.social-vk .social-icon {
    font-size: 1.1em;
    font-weight: 700;
    letter-spacing: 1px;
}

.social-text {
    color: #ffffff;
    font-weight: 500;
}

/* Discord Button */
.social-discord {
    background-color: #5865F2;
    border-color: #4752C4;
}

.social-discord:hover {
    background-color: #4752C4;
    border-color: #3C45A5;
}

/* VK Button */
.social-vk {
    background-color: #0077FF;
    border-color: #0066DD;
}

.social-vk:hover {
    background-color: #0066DD;
    border-color: #0055BB;
}

/* Telegram Button */
.social-telegram {
    background-color: #0088cc;
    border-color: #0077BB;
}

.social-telegram:hover {
    background-color: #0077BB;
    border-color: #0066AA;
}

/* Screenshots Carousel */
.screenshots-carousel {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
    overflow: visible;
    border-radius: 8px;
    background-color: #1a1a1a;
    padding: 20px;
}

.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 6px;
    margin: 0 auto;
    min-height: 400px;
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease;
    will-change: transform;
    align-items: center;
    width: fit-content;
}

.carousel-slide {
    width: 85%;
    min-width: 85%;
    max-width: 85%;
    flex-shrink: 0;
    position: relative;
    margin: 0 2.5%;
    opacity: 0.5;
    transform: scale(0.9);
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.carousel-slide.active {
    min-width: 85%;
    max-width: 85%;
    width: 85%;
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.screenshot-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    object-fit: contain;
    max-height: 500px;
    min-height: 200px;
    background-color: #1a1a1a;
}

.screenshot-image[src=""],
.screenshot-image:not([src]) {
    display: none;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.95);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2.5em;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #333;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    line-height: 1;
    padding: 0;
}

.carousel-button:hover {
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transform: translateY(-50%) scale(1.15);
}

.carousel-prev {
    left: 15px;
}

.carousel-next {
    right: 15px;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #555;
    border: 2px solid #404040;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background-color: #00FFFF;
    border-color: #00FFFF;
    transform: scale(1.2);
}

.carousel-indicator:hover {
    background-color: #888;
    border-color: #888;
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Mobile devices (phones, 768px and down) */
@media screen and (max-width: 768px), 
       screen and (max-device-width: 768px),
       (max-width: 768px) {
    /* Body adjustments */
    body {
        padding-top: 70px; /* Reduced padding for mobile */
    }

    /* Navbar mobile styles - Burger Menu */
    .navbar {
        width: 100%;
        max-width: 100%;
        padding: 10px 15px;
        top: 0;
        left: 0;
        right: 0;
        transform: none;
        justify-content: space-between;
        align-items: center;
        border-radius: 0;
        background-color: rgba(26, 40, 45, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-sizing: border-box;
        position: fixed;
    }

    /* Hide regular nav links on mobile */
    .navbar-menu {
        display: none !important;
    }

    /* Show burger button on mobile */
    .burger-menu-button {
        display: flex !important;
        order: -1;
        flex-shrink: 0;
    }

    /* Hide theme toggle from navbar on mobile (it will be in mobile menu) */
    .navbar .theme-toggle-button {
        display: none !important;
    }

    /* Show mobile menu overlay and panel on mobile when active */
    .mobile-menu-overlay {
        display: none; /* Hidden by default on mobile */
    }
    .mobile-menu-overlay.active {
        display: block;
        opacity: 1;
    }

    /* Mobile menu panel should only be visible when active */
    .mobile-menu-panel {
        display: none; /* Hidden by default on mobile */
    }
    .mobile-menu-panel.active {
        display: flex;
    }

    /* Container adjustments */
    .container {
        padding: 20px 15px;
        margin: 15px auto;
        max-width: 100%;
        width: calc(100% - 30px);
        box-sizing: border-box;
    }

    /* Headings */
    h1 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

    h2 {
        font-size: 1.4em;
        margin-top: 25px;
        margin-bottom: 15px;
    }

    /* Search and filter containers */
    .search-container,
    .filter-container {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .search-container input {
        width: 100%;
    }

    .filter-container label,
    .search-container label {
        width: 100%;
    }

    .filter-container input,
    .filter-container select {
        width: 100%;
    }

    /* Buttons */
    .button {
        width: 100%;
        margin: 10px 0;
        padding: 12px 20px;
        font-size: 1em;
    }

    /* Tables - make horizontally scrollable */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
        width: 100%;
    }

    /* Make all tables scrollable on mobile */
    table {
        font-size: 0.9em;
        min-width: 600px; /* Minimum width to maintain readability */
        width: 100%;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table thead,
    table tbody,
    table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }

    table thead {
        display: table-header-group;
    }

    table tbody {
        display: table-row-group;
    }

    table th,
    table td {
        padding: 8px 6px;
        font-size: 0.9em;
    }

    /* Forms */
    form {
        gap: 12px;
    }

    form label {
        font-size: 0.95em;
    }

    form input[type="text"],
    form input[type="date"],
    form select,
    form textarea {
        padding: 10px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    /* Card grid - single column on mobile */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .card {
        padding: 20px;
    }

    /* Staff card grid */
    .staff-card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }

    .staff-card-image {
        height: 150px;
    }

    .staff-card-info {
        padding: 15px;
    }

    .staff-card-info h3 {
        font-size: 1.3em;
    }

    .staff-card-actions {
        padding: 0 15px 15px 15px;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .edit-staff-button,
    .delete-button {
        width: 100%;
        margin: 0;
    }

    /* Online stats container */
    .online-stats-container {
        flex-direction: column;
    }

    .online-stats-section {
        padding: 15px;
        margin-top: 20px;
    }

    .online-stats-section h3 {
        font-size: 1.2em;
    }

    /* Modal */
    .modal-content {
        width: 95%;
        padding: 20px;
        margin: 10% auto;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-section {
        margin: 10px 0;
    }

    /* Admin buttons */
    .admin-button {
        width: 100%;
        max-width: 100%;
    }

    .admin-button-group {
        gap: 20px;
    }

    /* Rules page */
    .rule-block {
        padding: 15px;
    }

    .rule-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .rule-actions {
        width: 100%;
    }

    .rule-delete-button {
        width: 100%;
    }

    /* Creator/About page */
    .creator-tabs {
        flex-wrap: wrap;
        gap: 5px;
    }

    .creator-tab {
        padding: 10px 15px;
        font-size: 0.9em;
    }

    .creator-block {
        padding: 15px;
    }

    .social-buttons {
        gap: 10px;
    }

    .social-button {
        padding: 12px 15px;
        font-size: 0.9em;
    }

    /* Screenshots carousel */
    .screenshots-carousel {
        padding: 15px;
    }

    .carousel-container {
        min-height: 300px;
    }

    .carousel-slide {
        width: 95%;
        min-width: 95%;
        max-width: 95%;
        margin: 0 2.5%;
    }

    .carousel-slide.active {
        width: 95%;
        min-width: 95%;
        max-width: 95%;
    }

    .carousel-button {
        width: 40px;
        height: 40px;
        font-size: 2em;
    }

    .carousel-prev {
        left: 5px;
    }

    .carousel-next {
        right: 5px;
    }

    .screenshot-image {
        max-height: 300px;
        min-height: 150px;
    }

    /* Credit badge */
    #creditBadge {
        bottom: 10px;
        left: 10px;
        font-size: 10px;
        padding: 6px 10px;
    }

    /* Hours to minutes converter - hide on mobile or reposition */
    .hours-to-minutes-converter {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        max-width: 100%;
        margin: 20px auto;
    }

    /* Questions section */
    .questions-section {
        padding: 15px;
        margin: 20px auto;
    }

    .questions-section h2 {
        font-size: 1.6em;
    }

    .questions-section p {
        font-size: 1em;
    }
}

/* Small mobile devices (phones, 480px and down) */
@media screen and (max-width: 480px),
       screen and (max-device-width: 480px),
       (max-width: 480px) {
    body {
        padding-top: 70px;
    }

    .navbar {
        max-height: 60px;
        padding: 5px 8px;
    }

    .nav-link {
        font-size: 11px;
        padding: 6px 8px;
    }

    .theme-toggle-button {
        font-size: 0.75em;
        padding: 5px 10px;
        margin-left: 5px;
    }

    .container {
        padding: 15px 10px;
        margin: 15px auto;
        width: calc(100% - 10px);
    }

    h1 {
        font-size: 1.5em;
    }

    h2 {
        font-size: 1.2em;
    }

    table {
        font-size: 0.8em;
        min-width: 500px;
    }

    table th,
    table td {
        padding: 6px 4px;
    }

    .card {
        padding: 15px;
    }

    .card-icon {
        font-size: 2em;
    }

    .card h3 {
        font-size: 1.2em;
    }

    .staff-card-image {
        height: 120px;
    }

    .staff-card-info h3 {
        font-size: 1.1em;
    }

    .online-stats-section {
        padding: 12px;
    }

    .modal-content {
        width: 98%;
        padding: 15px;
    }

    .carousel-button {
        width: 35px;
        height: 35px;
        font-size: 1.8em;
    }

    #creditBadge {
        font-size: 9px;
        padding: 5px 8px;
    }
}

/* Landscape orientation on mobile */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .navbar {
        max-height: 60px;
    }

    .container {
        padding: 15px;
    }
}

/* Tablet devices (768px to 1024px) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 95%;
        padding: 30px 25px;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .staff-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .navbar {
        width: 95%;
    }

    .nav-link {
        font-size: 14px;
        padding: 9px 12px;
    }
}
