/* style.css (FINAL version for Projector Scroll Fix) */

/* --- CRITICAL FIX: Disable primary page scroll --- */
body {
    overflow: hidden; /* Stops the main browser scrollbar from appearing */
    
    font-family: 'Arial', sans-serif;
    /* High contrast for projector screens */
    background-color: #121212; 
    color: #E0E0E0; 
    margin: 0;
    padding: 10px; 
    line-height: 1.4; 
}

h1 {
    font-size: 2.5rem; 
    color: #4CAF50; 
    text-align: center;
    margin-bottom: 5px;
    border-bottom: 3px solid #4CAF50; 
    padding-bottom: 8px;
}

h2 {
    font-size: 1.5rem; 
    color: #CCCCCC;
    text-align: center;
    margin-bottom: 10px; 
}

/* --- SCROLLING VIEWPORT CONTAINER --- */
.queue-wrapper {
    /* Fixed height relative to viewport (85% of screen height) */
    height: 85vh; 
    
    /* CRITICAL CHANGE: Increase width to 1200px or even 1400px */
    max-width: 1300px; /* Example: Increased width */
    
    margin: 0 auto;
    padding: 0 2%; 
    overflow-y: auto; 
}

/* --- THE QUEUE LIST (Updated for Three Columns) --- */
#queue-list {
    list-style-type: none; 
    counter-reset: queue-counter;
    padding: 0; 
    margin: 0;
    
    /* CRITICAL CHANGE: Use 3 equal-width columns */
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* Three columns, equal width */
    grid-auto-flow: row; /* Items flow naturally across the rows */
    gap: 15px; /* Spacing between grid items */
}

/* We style the LI elements as grid items */
#queue-list li {
    counter-increment: queue-counter;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px; 
    margin: 0; /* Remove old margin-bottom */
    border-radius: 6px;
    
    /* Reverting font size to your preferred 1.8rem */
    font-size: 1.8rem; 
    
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* Add custom number prefix */
#queue-list li::before {
    content: counter(queue-counter) ". ";
    font-weight: bold;
    color: #4CAF50;
    font-size: 1.4rem;
    margin-right: 15px;
}

/* 1. NEXT UP */
#queue-list li:not(.completed):first-child {
    background-color: #388E3C; 
    color: white;
    font-weight: bold;
    border: 3px solid #FFEB3B; 
    animation: pulse 1.5s infinite alternate; 
}

/* 2. WAITING */
#queue-list li:not(.completed):not(:first-child) {
    background-color: #333333; 
    color: #E0E0E0;
}

/* 3. COMPLETED */
.completed {
    background-color: #1A1A1A; 
    color: #666666 !important;
    text-decoration: line-through 3px #888888; 
    opacity: 0.6;
}

/* --- TIMESTAMP STYLING --- */
.timestamp {
    font-size: 0.9rem; 
    color: #999999;
    font-style: italic;
}

/* Keyframes remain the same */
@keyframes pulse {
    from { transform: scale(1); box-shadow: 0 0 10px rgba(76, 175, 80, 0.6); }
    to { transform: scale(1.01); box-shadow: 0 0 20px rgba(76, 175, 80, 0.8); }
}

/* --- STYLES FOR INDEX.HTML (Sign-Up Form) --- */

#signup-form {
    background-color: #1A1A1A; /* Dark background for the form block */
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4);
    border: 1px solid #333;
}

#signup-form label {
    display: block;
    font-size: 1.1rem;
    color: #CCCCCC;
    margin-bottom: 5px;
    font-weight: bold;
}

#signup-form input[type="text"] {
    width: 95%;
    padding: 12px;
    margin-bottom: 20px;
    border: 2px solid #555;
    border-radius: 4px;
    background-color: #2C2C2C; /* Slightly lighter input background */
    color: #E0E0E0;
    font-size: 1.1rem;
    transition: border-color 0.3s;
}

#signup-form input[type="text"]:focus {
    border-color: #4CAF50; /* Highlight green on focus */
    outline: none;
}

#signup-form button[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #4CAF50; /* Primary green button */
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

#signup-form button[type="submit"]:hover {
    background-color: #388E3C; /* Darker green on hover */
}

#signup-form button[type="submit"]:active {
    transform: scale(0.99);
}

#message {
    text-align: center;
    margin-top: 20px;
    font-size: 1.1rem;
    color: #FFEB3B; /* Use yellow for confirmation messages */
}

/* --- HIDE SCROLLBAR FOR QUEUE-WRAPPER (Preserves Scrolling Functionality) --- */

.queue-wrapper {
    /* (This block already exists, adding overflow fix just in case) */
    /* ... existing properties like height: 85vh; ... */
    overflow-y: scroll; /* Ensure scroll is available for JS to use */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.queue-wrapper::-webkit-scrollbar {
    width: 0px;  /* Set scrollbar width to 0 */
    background: transparent; /* Optional: Make the background clear */
}

/* Hide scrollbar for IE, Edge */
.queue-wrapper {
    -ms-overflow-style: none;  /* IE and Edge */
}

/* Hide scrollbar for Firefox */
.queue-wrapper {
    scrollbar-width: none;  /* Firefox */
}