:root {
    --background-color: #FFFAF0;
    --text-color: #000000;
    --primary-color: #2563eb;
    --secondary-color: #e5e7eb;
    --sub-container-color: #f0f0f0;
    --error-color: #dc2626;
    --success-color: #6ec617;
    --text-color: #000000;
    --hover-color: #f1f5f9;
    --success-message-background: #d4edda;
}


.dark-mode {
    --background-color: #121212;
    --text-color: #ffffff;
    --primary-color: #1d4ed8;
    --secondary-color: #374151;
    --sub-container-color: #2d3748;
    --button-color: #1f2937;
    --error-color: #f87171;
    --success-color: #4ade80;
    --text-color: #ffffff;
    --hover-color: #323d4d;
    --success-message-background: #2e7d32;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--background-color);
    color: var(--text-color);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Mobile layout adjustments */
@media (max-width: 768px) {
    body {
        padding-bottom: 20px; /* Reduced since bottom buttons are hidden */
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }
    
    .rooms-container {
        flex: 1;
        overflow-y: auto;
        max-height: none; /* Remove max-height to allow full expansion */
        min-height: 300px; /* Minimum height to ensure scrollability */
        margin-bottom: 20px;
        padding-bottom: 20px;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }
}

h1 {
    font-size: 24px;
    margin-bottom: 20px;
}

.input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

input {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid var(--secondary-color);
    border-radius: 4px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 16px;
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease; /* Add transition */
}

.room-directions {
    padding: 8px 2px;
}

.p-directions {
    padding: 4px 10px;
}

.add-button {
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
}

.add-button:hover {
    background-color: #1d4ed8;
}

.error {
    color: var(--error-color);
    margin-bottom: 20px;
    padding: 10px;
    background-color: #fee2e2;
    border-radius: 4px;
    display: none;
}

.status {
    color: var(--text-color);
    margin-bottom: 20px;
    padding: 10px;
    background-color: var(--success-color);
    border-radius: 4px;
    display: none;
}

.filler {
    color: var(--text-color);
    margin-bottom: 20px;
    padding: 10px;
    background-color: var(--success-color);
    border-radius: 4px;
    visibility: hidden;
}

.room-card {
    background-color: var(--sub-container-color);
    padding: 16px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
}


.room-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.control-button {
    background: none;
    border: 1.5px solid currentColor;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    padding: 0;
}

.btn-up {
    color: #22c55e;
}

.btn-up:hover {
    background-color: #f0fdf4;
}

.btn-stop {
    width: 60px;
    color: #6b7280;
}

.btn-stop:hover {
    background-color: #f3f4f6;
}

.btn-down {
    color: #ef4444;
}

.btn-down:hover {
    background-color: #fef2f2;
}

.btn-remove {
    color: #6b7280;
    border: none;
}

.btn-remove:hover {
    background-color: #f3f4f6;
}

.empty-state {
    text-align: center;
    color: #6b7280;
    margin-top: 40px;
}

.room-number {
    font-size: 16px;
    font-weight: 500;
}

    .report-container {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 1000;
}

.report-form {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    width: 300px;
    margin-bottom: 10px;
    display: none;
}

.success-message, .error-message {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--background-color);
    padding: 10px;
    border-radius: 4px;
    width: 200px;
    margin-bottom: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.report-container {
    text-align: center;
    margin: 20px 0;
}

.report-button {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.report-button:hover {
    background-color: #2980b9;
}

.report-form {
    display: none;
    margin-top: 20px;
}

.submit-report-button {
    padding: 8px 16px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.submit-report-button:hover {
    background-color: #27ae60;
}

textarea {
    width: 100%;
    max-width: 500px;
    height: 100px;
    margin: 10px 0;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
}

.success-message {
    color: var(--success-color);
    margin-top: 10px;
    display: none;
    background-color: var(--success-message-background);
}

.error-message {
    color: var(--error-color);
    margin-top: 10px;
    display: none;
}

.stats-buttons-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.stats-button {
    padding: 8px 16px;
    background-color: rgba(61, 146, 255, 0.9);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.stats-button:hover {
    background-color: rgba(164, 176, 190, 0.9);
}

/* Hamburger Menu Icon */
.menu-icon {
    position: fixed;
    top: 20px;
    right: 20px;
    cursor: pointer;
    z-index: 1002;
    width: 30px;
    height: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-icon span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(menu-text);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-icon.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

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

.menu-icon.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    right: -250px;
    width: 250px;
    height: 100%;
    background-color: var(--background-color);
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1001;
    padding-top: 60px;
}

.sidebar.active {
    right: 0;
}

/* Sidebar Links */
.sidebar-link {
    display: block;
    padding: 15px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.3s ease;
    font-size: 16px;
}

.sidebar-link:hover {
    background-color: rgba(61, 146, 255, 0.1);
}

/* Logout button in sidebar - red color for visibility */
.sidebar-logout {
    display: flex !important;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--secondary-color);
    margin-top: 10px;
    background-color: #dc2626 !important;
    color: white !important;
}

.sidebar-logout:hover {
    background-color: #b91c1c !important;
}

.sidebar-logout .logout-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) saturate(100%) invert(1);
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.menu-button {
    position: fixed;
    top: 20px;
    right: 20px;
    cursor: pointer;
    z-index: 1002;
    background-color: var(--button-color);
    padding: 8px 16px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
}

.menu-button:hover {
    background-color: var(--hover-color);
}

.menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    margin: 3px 0;
    transition: all 0.3s ease;
}

.menu-button.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

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

.menu-text {
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
}

.teams-button {
    display: flex;
    align-items: center;
    background-color: #4d4e83;
    color: white;
    border: none;
    padding: 7px 12px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
}
.teams-button img {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

.toggle-switch {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 60px;
    height: 34px;
}

.toggle-switch-checkbox {
    display: none;
}

.toggle-switch-label {
    display: block;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #ddd;
    border-radius: 34px;
    position: relative;
}

.toggle-switch-inner {
    display: block;
    width: 200%;
    margin-left: -100%;
    transition: margin 0.25s ease-in-out 0s;
    background-color: #ccc;
}

.toggle-switch-inner:before, .toggle-switch-inner:after {
    display: block;
    float: left;
    width: 50%;
    height: 30px;
    padding: 0;
    line-height: 30px;
    font-size: 14px;
    color: white;
    font-family: Trebuchet, Arial, sans-serif;
    box-sizing: border-box;
}

.toggle-switch-inner:before {
    content: "☀️";
    padding-left: 5px;
    background-color: #2563eb;
    color: white;
}

.toggle-switch-inner:after {
    content: "🌙";
    padding-right: 5px;
    padding-bottom: 5px;
    background-color: #121212;
    color: white;
    text-align: right;
}

.toggle-switch-switch {
    display: block;
    width: 24px;
    margin: 4px;
    background: #fff;
    position: absolute;
    top: 0;
    bottom: 0;
    right: 25px;
    border: 1px solid #ddd;
    border-radius: 34px;
    transition: all 0.25s ease-in-out 0s;
}

.toggle-switch-checkbox:checked + .toggle-switch-label .toggle-switch-inner {
    margin-left: 0;
}

.toggle-switch-checkbox:checked + .toggle-switch-label .toggle-switch-switch {
    right: 0px;
}

.toggle-switch-label {
    border: none; /* Remove border */
}

.toggle-switch-switch {
    border: none; /* Remove border */
}

.bug-bounty-link {
    position: fixed;
    bottom: 20em; /* Increased to avoid overlap with 'Need Help' button */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: var(--button-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-size: 14px;
    transition: background-color 0.3s ease, color 0.3s ease;
    z-index: 1000;
}

.bug-bounty-link:hover {
    background-color: var(--hover-color);
}

.bug-bounty-link img {
    width: 24px;
    height: 24px;
}



.report-container {
    position: fixed;
    bottom: 140px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 1001;  /* Increased to be above bug bounty link */
}

.bug-bounty-link {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    /*padding: 8px 16px;*/
    background-color: var(--background-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-size: 14px;
    transition: background-color 0.3s ease, color 0.3s ease;
    z-index: 1000;
}
.logo {
    width: 180px;  /* Increased from 128px */
    height: 180px; /* Increased from 128px */
    object-fit: contain;
    background: transparent;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px; /* Slightly increased margin for better spacing */
    padding-top: 30px;  /* Slightly increased padding for better spacing */
}

/* If you're using dark mode, ensure logo remains visible */
.dark-mode .logo {
    filter: brightness(1);
}

.welcome-message {
    font-size: 1.5em;
    color: var(--text-color);
    text-align: center;
    margin: 20px 0;
    transition: color 0.5s ease;
    font-weight: bold;
}

/* Update the Teams button container position */
.report-container {
    position: fixed;
    bottom: 80px;  /* Adjusted from 140px */
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 1001;
}

/* Update the bug bounty link position */
.bug-bounty-link {
    position: fixed;
    bottom: 50px;  /* Adjusted from 100px */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--background-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-size: 14px;
    transition: background-color 0.3s ease, color 0.3s ease;
    z-index: 1000;
}

/* Create a container for all bottom elements */
.bottom-buttons-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;  /* Adds consistent spacing between elements */
    padding: 1rem;
    background: linear-gradient(to top, var(--background-color) 90%, transparent);
}

/* Update report container (Teams button) */
.report-container {
    position: static;  /* Remove fixed positioning */
    transform: none;   /* Remove transform */
    margin: 0;
}

/* Update bug bounty link */
.bug-bounty-link {
    position: static;  /* Remove fixed positioning */
    transform: none;   /* Remove transform */
    margin: 0;
    width: fit-content;
}

.shirt-campaign-dm {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.shirt-campaign-dm img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Nickname feature styles */
.room-info {
    display: block;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 200px;
}

.room-nickname {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    background-color: transparent;
    color: var(--text-color);
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
}

.room-nickname:hover {
    background-color: var(--background-color);
    border-color: var(--secondary-color);
}

.room-nickname:focus {
    background-color: var(--background-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.room-nickname::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.room-number {
    font-weight: 600;
    white-space: nowrap;
    min-width: 60px;
}

.room-card {
    flex-wrap: wrap;
    gap: 12px;
}

/* Hide help button on smaller screens */
@media (max-width: 1200px) {
    .report-container {
        /* Keep Need Help button visible on mobile */
    }
}
