@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300..700&display=swap');

/* styles.css */
/* General styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*:before,
*:after {
    background-color: black !important;
}

div,
p,
h1,
h2,
h3,
section,
main,
header,
footer,
button,
select,
input,
span,
a {
    background-color: black !important;
    font-family: 'Comfortaa', sans-serif !important;
}

body {
    font-family: 'Comfortaa', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: black;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: black;
}

#app-container {
    background-color: black !important;
    margin: 0 !important;
    padding: 0 !important;
}

#app-container * {
    font-family: 'Comfortaa', sans-serif !important;
}

header {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #7f8c8d;
    font-size: 14px;
}

.logo {
    height: 60px;
    margin-right: 20px;
}

h1 {
    font-size: 28px;
    color: #2c3e50;
}

h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

main {
    margin-bottom: 40px;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #7f8c8d;
    font-size: 14px;
}


/* Button styles */
.button-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.button {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.button:hover {
    background-color: #2980b9;
}

/* Grid styles */
.grid-container {
    display: grid;
    /* Reduce minmax to allow more items per row if space permits */
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 5px;
    margin-top: 10px;
    /* Ensure it uses full width */
    width: 100%;
}

.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Dynamic font size: shrinks with viewport, but has min and max limits */
    font-size: clamp(8px, 0.8vw, 12px);
    text-align: center;
    overflow: hidden;
    line-height: 1;
    /* Tightest line height */
    padding-bottom: 2px;
}

.grid-item img {
    /* Add bottom margin for spacing between image and date */
    margin-bottom: 8px;
    width: 100%;
    /* Use aspect ratio to keep cells consistent in the 8x6 grid */
    aspect-ratio: 16/9;
    object-fit: contain;
    cursor: pointer;
    background-color: transparent;
    display: block;
    margin: 0 auto;
}

.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgb(0, 0, 0);
    /* Fallback color */
    background-color: rgba(0, 0, 0, 0.9);
    /* Black w/ opacity */
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.wakatoon-seasons-container {
    margin-top: 0;
    padding-top: 0;
}

.wakatoon-series-root,
.wakatoon-catalog-root {
    padding-top: 0;
    margin-top: 0;
}

#wakatoon-series-root,
#wakatoon-catalog-root {
    margin: 0 !important;
    padding: 0 !important;
    background-color: black !important;
}

.wakatoon-loading-text,
.wakatoon-error-text {
    margin: 0 !important;
    padding: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    line-height: 1 !important;
}

p.wakatoon-loading-text,
p.wakatoon-error-text {
    margin: 0 !important;
    padding: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

#wakatoon-series-root>p,
#wakatoon-catalog-root>p {
    margin: 0 !important;
    padding: 0 !important;
}