/* Define the soft light mode colors */
:root {
    --bg-color: #f4f3ee; 
    --text-color: #2c2c2c; 
    --muted-color: #9a9a9a;
    --toggle-hover: #e6e5e0;
}

/* Define the cosmic dark mode colors */
[data-theme="dark"] {
    --bg-color: #100820;     /* Deep midnight cosmic purple */
    --text-color: #f1edfa;   /* Crisp, slightly cool off-white */
    --muted-color: #7b6898;  /* Muted starlight lavender */
    --toggle-hover: #1e113a; /* Slightly lighter purple for hover states */
}

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    text-align: center;
    user-select: none;
    cursor: pointer;
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#law-container {
    max-width: 900px;
    padding: 40px;
}

#law-text {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 20px 0;
    transition: opacity 0.15s ease-in-out;
}

#instruction {
    font-size: 1rem;
    color: var(--muted-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

.fade-out {
    opacity: 0;
}

/* Theme Toggle Button Styling */
#theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--muted-color);
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
    z-index: 10;
}

#theme-toggle:hover {
    background-color: var(--toggle-hover);
    color: var(--text-color);
}

#theme-icon {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    #law-text {
        font-size: 2rem;
    }
}

#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

[data-theme="dark"] #starfield {
    opacity: 1;
}

#credit-footer {
    position: fixed;
    bottom: 20px;
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted-color);
    letter-spacing: 0.5px;
    z-index: 10;
    transition: color 0.3s ease;
}

#credit-footer a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

#credit-footer a:hover {
    opacity: 0.7;
}