/* ===================
   BASE STYLES
=================== */
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: transparent;
    color: white;
    text-align: center;
    overflow-x: hidden;
}

#content {
    position: relative;
    z-index: 2; /* content above stars */
}

/* ===================
   HEADER
=================== */
h1 {
    margin-top: 20px;
    font-size: 2em;
    color: #00bfff;
    text-shadow: 0 0 5px #00bfff;
}

/* ===================
   CONTROLS
=================== */
#controls {
    margin: 15px auto;
}
input[type="text"] {
    padding: 8px 12px;
    width: 90%;  /* responsive width on mobile */
    max-width: 250px;
    border-radius: 5px;
    border: 1px solid #00bfff;
    background-color: rgba(0,0,0,0.3);
    color: white;
}

/* ===================
   CATEGORIES CONTAINER
=================== */
#categories-container {
    display: flex;
    flex-direction: column; /* stack categories vertically */
    align-items: center;    /* center horizontally */
    max-width: 900px;
    margin: 0 auto;
    gap: 15px;              /* space between categories */
}

/* ===================
   COLLAPSIBLE CATEGORIES
=================== */
details {
    width: auto;              /* box width adjusts to content */
    max-width: 800px;         /* optional max width */
    border-radius: 5px;
    background-color: rgba(0,0,0,0.5);
    padding: 10px;
    color: white;
    transition: background-color 0.3s;
    text-align: left;
    margin: 0 auto;           /* center box horizontally */
}

summary {
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2em;
    color: #00bfff;
    text-shadow: 0 0 5px #00bfff;
    display: block;
    text-align: center; /* center summary text */
}

summary:hover {
    text-shadow: 0 0 15px #00bfff;
}

/* ===================
   TABLES
=================== */
.table-wrapper {
    width: 100%;
    overflow-x: auto;   
    -webkit-overflow-scrolling: touch; /* smooth scrolling on mobile */
}

.table-wrapper table {
    width: 100%;             
    min-width: 400px;        
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    border: 1px solid #00bfff;
    padding: 6px 10px;
    text-align: left;
    font-size: 0.9em;
}

th {
    background-color: #005f99;
    color: white;
}

tr:nth-child(even) { 
    background-color: rgba(0,95,153,0.2); 
}

/* ===================
   LEARNED CHECKBOX
=================== */
.learned-checkbox {
    transform: scale(1.2);
    cursor: pointer;
}

/* ===================
   STAR CANVAS
=================== */
#stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* behind everything */
    pointer-events: none;
}

/* ===================
   MEDIA QUERIES FOR MOBILE
=================== */
@media screen and (max-width: 600px) {
    h1 {
        font-size: 1.5em;
    }

    summary {
        font-size: 1em;
    }

    th, td {
        font-size: 0.85em;
        padding: 4px 6px;
    }

    details {
        width: 95%;
    }

    input[type="text"] {
        width: 95%;
    }

    .table-wrapper table {
        min-width: 300px; /* allow smaller tables to scroll */
    }
}
