/* --- Global Styles & Variables --- */
:root {
    --primary-color: #3cbf13;
    --secondary-color: #c3c100;
}

body {
    font-family: Arial, sans-serif;
    background-color: #121212;
    color: #ffffff;
    margin: 0;
    /* MODIFIED: Added 240px of bottom padding on mobile to prevent overlap */
    padding: 20px 20px 240px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

/* --- Main Content Container --- */
.container {
    background-color: #1e1e1e;
    border: 2px solid var(--primary-color, #3cbf13);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    animation: fadeIn 1s ease-in-out;
    width: 100%;
    max-width: 550px;
    box-sizing: border-box;
    padding: clamp(1.5rem, 6vw, 2.5rem); /* Increased base padding for mobile */
}

.container:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px var(--primary-color, #3cbf13);
}

/* --- Typography (Fluid) --- */
h1, h2 {
    color: var(--primary-color, #3cbf13);
    margin: 0 0 15px 0;
    font-size: clamp(2rem, 7vw, 2.5rem); /* Increased base font size */
}

#period, #time_remaining, #fortnite {
    color: var(--secondary-color, #c3c100);
    font-weight: bold;
    margin: 10px 0;
    font-size: clamp(1.5rem, 6vw, 2rem); /* Increased base font size */
}

li
{
    color: var(--secondary-color, #c3c100);
    font-weight: bold;
    margin: 10px 0;
    font-size: clamp(1.5rem, 6vw, 2rem);
}

aside.container {
    margin-left: 2rem;
    margin-right: 2rem;

}

/* --- Bottom Container (Mobile-First: Centered by Default) --- */
.checkbox-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%); /* Center by default for mobile */
    width: max-content;
    max-width: 95%;

    background-color: #1e1e1e;
    border: 2px solid var(--primary-color, #3cbf13);
    border-radius: 12px; /* More rounded corners */
    padding: 12px; /* MODIFIED: Reduced padding to make container more compact */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    animation: fadeIn 1s ease-in-out;
}

.checkbox-container:hover {
    transform: translateX(-50%) scale(1.05); /* Keep centered on hover */
}

/* --- Mobile Visibility Improvements --- */
.custom-checkbox {
    width: 28px; /* Larger checkbox */
    height: 28px;
    display: inline-block;
    position: relative;
    background-color: #1e1e1e;
    border: 2px solid var(--primary-color, #3cbf13);
    border-radius: 6px;
    cursor: pointer;
    vertical-align: middle;
    transition: background-color 0.2s ease-in-out;
}

.custom-checkbox input {
    display: none;
}

.custom-checkbox span::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    background-color: var(--secondary-color, #c3c100);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s ease-in-out;
    border-radius: 4px;
}

.custom-checkbox input:checked + span::after {
    transform: translate(-50%, -50%) scale(1);
}

.checkbox-label {
    display: inline-block;
    vertical-align: middle;
    margin-left: 12px;
    font-size: 1.2rem; /* Larger label text */
    color: #ffffff;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #f56565; /* red */
    animation: pulse 2s infinite;
}
.indicator.live {
    background-color: #48bb78; /* green */
}
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}
/* Helper class to align the indicator and text */
.live-counter-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 1rem;
}

a {
    display: block; /* Make links take full width for easier tapping */
    background-color: var(--primary-color, #3cbf13);
    color: var(--secondary-color, #c3c100);
    padding: 10px 20px; /* MODIFIED: Reduced padding */
    text-align: center;
    text-decoration: none;
    border: 3px solid var(--secondary-color, #c3c100);
    border-radius: 5px;
    margin-top: 10px; /* MODIFIED: Reduced margin */
    text-shadow: 0 0 2px rgba(0, 0, 0, 122);
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
    font-size: 1.1rem; /* Larger link text */
}
a:hover {
    background-color: var(--secondary-color, #c3c100);
    color: var(--primary-color, #3cbf13);
    border: 3px solid var(--primary-color, #3cbf13);
    border-radius: 5px;
}

/* --- All other styles remain the same --- */

button {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: var(--primary-color, #3cbf13);
    color: var(--secondary-color, #c3c100);
    cursor: pointer;
    font-size: 1rem;
    text-shadow: 0 0 2px rgba(0, 0, 0, 122);
    border: 3px solid var(--secondary-color, #c3c100);
    border-radius: 5px;
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

button:hover {
    background-color: var(--secondary-color, #c3c100);
    color: var(--primary-color, #3cbf13);
    border-radius: 5px;
    border: 3px solid var(--primary-color, #3cbf13);
}

body.light-theme, .container.light-theme, .checkbox-container.light-theme {
    background-color: #ffffff;
    color: #000000;
    border-color: var(--primary-color, #3cbf13);
}
.checkbox-label.light-theme { color: #121212; }

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

table, th, td {
    width: 100%; border-collapse: collapse; padding: 10px;
    border: 1px solid var(--primary-color, #3cbf13);
}
th { background-color: var(--primary-color, #3cbf13); color: #ffffff; }
td { background-color: #1e1e1e; }
.delete-icon { cursor: pointer; color: #ff0000; }
form { display: flex; flex-direction: column; max-width: 600px; margin: 0 auto; background-color: #1e1e1e; padding: 20px; border: 2px solid var(--primary-color, #3cbf13); border-radius: 10px; }
label { margin-top: 10px; font-weight: bold; color: var(--secondary-color, #c3c100); }
#messages { height: 300px; overflow-y: auto; overflow-wrap: break-word; padding: 10px; margin-bottom: 10px; box-sizing: border-box; }
input[type="time"], select, input[type="text"], input[type="password"], input[type="color"] {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 5px;
    background-color: #121212;
    color: #ffffff;
    width: 100%;
    box-sizing: border-box;
    border: none;
}

input[type="text"]::placeholder, input[type="password"]::placeholder {
    color: var(--secondary-color, #c3c100);
}

input[type="color"] {
    padding: 10px;
    border: 2px solid var(--secondary-color, #c3c100);
    background-color: #1e1e1e;
    color: #ffffff;
    font-size: 1rem;
}

input[type="hidden"] {
    display: none;
}


/* --- Desktop Layout (for screens wider than tablets) --- */
@media (min-width: 769px) {
    body {
        /* Reset body padding for desktop */
        padding: 20px;
    }

    .checkbox-container {
        /* On desktop, move it to the left */
        left: 20px;
        transform: none; /* Remove the centering transform */
    }

    .checkbox-container:hover {
        transform: scale(1.05); /* Use simple scale for hover on desktop */
    }

    /* You can optionally resize elements back down for desktop if needed */
    .custom-checkbox { width: 20px; height: 20px; }
    .custom-checkbox span::after { width: 10px; height: 10px; }
    .checkbox-label { font-size: 1rem; }
    a { padding: 10px 25px; font-size: 1rem; display: inline-block; } /* Revert display for side-by-side */
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Keep it behind other elements */
}
