/* Reset & CSS Variables */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #000000;
    color: #ffffff;
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* Screen Flash Overlay */
.flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
}

/* 100ms Flash animation */
.flash-active {
    animation: flashAnim 100ms ease-out forwards;
}

@keyframes flashAnim {
    0% {
        opacity: 0.9;
    }
    100% {
        opacity: 0;
    }
}

/* Click-to-Start Overlay (pure black, static white text) */
.click-start-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.click-start-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.start-text-container {
    text-align: center;
}

.start-prompt {
    font-size: 1.5rem;
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    user-select: none;
}

.start-subprompt {
    font-size: 1rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
    user-select: none;
}

/* Floating Settings & Help Panel (strictly #000 and #fff, top-left alignment) */
.settings-panel {
    position: fixed;
    top: 2rem;
    left: 2rem;
    background: #000000;
    border: 2px solid #ffffff;
    border-radius: 0px; /* Sharp corners for simplistic design */
    width: 280px;
    padding: 1.25rem;
    z-index: 1005; /* Always on top, hoverable even on start overlay */
    opacity: 0; /* Fully hidden by default */
    pointer-events: none; /* Disable pointer actions while hidden */
    transition: opacity 0.2s ease-in-out;
}

/* Show settings panel when hovering ANYWHERE on the page body */
body:hover .settings-panel {
    opacity: 1;
    pointer-events: auto; /* Enable pointer interaction once visible */
}

.help-message {
    color: #ffffff;
    border-bottom: 1px solid #ffffff;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
}

.help-message h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    color: #ffffff;
}

.help-message p {
    font-size: 0.8rem;
    line-height: 1.4;
    color: #ffffff;
}

.credits {
    font-size: 0.7rem;
    margin-top: 0.5rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.setting-item {
    display: flex;
    align-items: center;
}

/* LARGE BLACK & WHITE CHECKBOXES */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    user-select: none;
    width: 100%;
}

/* Hide default checkbox */
.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Custom Checkbox - Large Size */
.custom-checkbox {
    position: relative;
    height: 28px;
    width: 28px;
    background-color: #000000;
    border: 2px solid #ffffff;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Checked state */
.checkbox-container input:checked ~ .custom-checkbox {
    background-color: #ffffff;
    border-color: #ffffff;
}

/* Custom Checkmark indicator */
.custom-checkbox::after {
    content: "";
    position: absolute;
    display: none;
}

/* Show checkmark when checked */
.checkbox-container input:checked ~ .custom-checkbox::after {
    display: block;
}

/* Draw the black checkmark on white background */
.checkbox-container .custom-checkbox::after {
    left: 8px;
    top: 3px;
    width: 8px;
    height: 14px;
    border: solid #000000;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* Checkbox Labels */
.setting-label {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.flex-column {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.input-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-left: 40px; /* Aligns with label beside the 28px custom checkbox */
}

#special-ding-users {
    width: 100%;
    background: #000000;
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 0.4rem;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
}

#special-ding-users:focus {
    background: #ffffff;
    color: #000000;
}

.input-help {
    font-size: 0.7rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive alignment */
@media (max-width: 768px) {
    .settings-panel {
        top: 1rem;
        left: 1rem;
        width: calc(100% - 2rem);
    }
}
