/* Admin Panel Styles */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.admin-btn {
    padding: 1.25rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    border: 1px solid #fecaca;
    background-color: #fef2f2;
    color: #991b1b;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.admin-btn:hover {
    border-color: #f87171;
    background-color: #fee2e2;
    transform: translateY(-2px);
}

.admin-btn svg {
    width: 48px;
    height: 48px;
}

/* Dashboard View */
.dashboard-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('../img/background.jpg');
    background-size: cover;
    background-position: center;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align content to the top */
    padding: 37vh 1rem 1rem; /* Start content at 37% screen height */
}

#dashboard-content-wrapper {
    width: 100%;
    max-width: 720px;
    max-height: calc(63vh - 1rem); /* Max height relative to new start position */
    overflow-y: auto;
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem; /* Reduced space between header/list/footer */
}

.dashboard-header {
    font-size: 2.5rem;
    font-weight: 700;
    color: #8f1111;
    margin-bottom: 1rem; /* Reduced space after header */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    text-align: center;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.dashboard-header:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

#participant-list-container {
    width: 100%;
    display: grid;
    gap: 0; /* Dramatically reduced vertical spacing */
    justify-items: center; /* Center items within grid columns */
}

#participant-list-container.two-columns {
    grid-template-columns: repeat(2, 1fr);
    max-width: 700px; /* Reduced total width for 2-col view */
}

.participant-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.2rem 0.2rem;
    width: fit-content; /* Adjust width to content for centering */
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    background-color: transparent;
    border: none;
    cursor: pointer;
}

.participant-item:hover .participant-name {
    color: #3733ad;
    text-shadow: none;
}

.participant-icon {
    width: 40px;
    height: 40px;
    margin-right: 1rem;
    flex-shrink: 0;
}

.participant-name {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1f2937; /* --text-color */
    text-shadow: 1px 1px 1px #fff;
    transition: color 0.2s;
}

.dashboard-empty-message {
    text-align: center;
    padding: 2rem;
    font-size: 1.5rem;
    font-weight: 500;
    color: #6b7280; /* --subtle-text-color */
    width: 100%;
    grid-column: 1 / -1;
}

.dashboard-footer {
    font-size: 2rem;
    font-weight: 500;
    color: #1f2937;
    margin-top: 1rem; /* Reduced space before footer */
    background-color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
    word-break: break-all;
}

.dashboard-footer .dashboard-footer-link {
    color: #25529c;
    font-weight: 700;    
}

/* Time Change Popup Styles */
#time-change-popup {
    z-index: 2100; /* Ensure it's on top of the dashboard view (z-index: 2000) */
}

.time-popup-content {
    max-width: 500px;
}

.time-adjuster {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.time-display {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: monospace;
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    background-color: #eef2ff;
    border-radius: 8px;
    min-width: 120px;
    text-align: center;
}

.time-btn {
    width: 48px;
    height: 48px;
    font-size: 2rem;
    font-weight: bold;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: #f9fafb;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.time-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.time-btn:active {
    transform: scale(0.95);
}

#btn-time-close {
    width: auto;
    min-width: 120px;
}

/* Participant Details Popup Styles */
#participant-details-popup {
    z-index: 2100;
}
.participant-popup-content {
    max-width: 450px;
    text-align: left;
}
.participant-popup-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    word-break: break-all;
}
#participant-popup-details, #participant-popup-no-details {
    margin-bottom: 1.5rem;
}
#participant-popup-details p {
    margin-bottom: 0.5rem;
    color: var(--subtle-text-color);
}
#participant-popup-no-details p {
     color: var(--subtle-text-color);
}
.participant-popup-content .button-group {
    justify-content: flex-end;
}

/* Edit Names Modal Styles */
#edit-names-modal {
    z-index: 2100;
}

.edit-names-modal-content {
    max-width: 500px; /* Wider modal for two textareas */
    width: 95%;
}

.edit-names-container {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    justify-content: center; /* Center the textareas if they don't fill the space */
}

.edit-names-container textarea {
    font-family: monospace;
    font-size: 0.9rem;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    resize: vertical; /* Allow vertical resize */
    line-height: 1.2; /* Better spacing for monospace */
}

/* Shared PIN input style */
.pin-input {
    width: 100%;
    max-width: 20ch; /* Approx 20 characters wide */
    margin: 0.5rem auto 0; /* Center the input */
}

/* Reset Modal Styles */
#reset-modal {
    z-index: 2100;
}

.reset-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.reset-actions .btn {
    width: 100%;
    background-color: #f3f4f6; /* A neutral default */
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.reset-actions .btn:hover {
     background-color: #e5e7eb;
}

.reset-actions .btn.selected {
    background-color: var(--error-color);
    color: white;
    border-color: #b91c1c;
}

.reset-actions .btn.selected:hover {
    background-color: #b91c1c;
}
