body, html {
    margin: 0;
    padding: 0;
    font-family: 'Lato', Arial, sans-serif;
    background-color: #1a1a1a;
    color: #ccc;
}

header {
    background-color: #333;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

p {
    font-size: 16px;
}

a,
a:visited,
a:hover,
a:focus {
    text-decoration: none;
    text-decoration-color: transparent;
    text-underline-offset: 0;
}

/*
a:hover {
    text-decoration: none;
}

a:visited {
    text-decoration: none;
}
*/

.logo {
    width: 80px;
    height: auto;
    flex: 0 0 auto; /* Do not grow or shrink */
    margin-top: 5px;
}

.tmdb-logo {
    width: 110px;
    height: auto;
    flex: 0 0 auto; /* Do not grow or shrink */
    margin-top: 5px;
}

.topicon {
    width: 16px;
    height: auto;
    padding-top: 2px;
    vertical-align: top;
}

.navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1; /* Allow navigation to grow and take remaining space */
	  margin: 0px 64px 0px 0px; /* logo 80px - topicon 16px */
}

.footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1; /* Allow navigation to grow and take remaining space */
	  margin: 10px 0px 10px 0px; /* was 20px 0px 20px 0px */
}

.nav-link {
    text-decoration: none;
    color: #bbb; /* was ccc */
    font-size: 16px;
    margin: 0 15px; /* Adjust spacing between top bar navigation links */
    transition: color 0.3s;
}

.nav-link-footer {
    font-size: 15px;
}

.nav-link:hover {
    color: #fff;
}

.nav-link-current {
    color: #fff;
    /*color: #fcfbd5;*/
}

.text-link {
    text-decoration: none;
    color: #fcfbd5;
    transition: color 0.3s;
}

.text-link:hover {
    color:  #f5f7ae; /* was fdffbb */
}

.text-link-current {
    color:  #f5f7ae; /* was fdffbb */
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    padding: 0px 15px;
}

.movie-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.movie-grid-item img {
    width: 100%;
    height: auto; /* was 272px on desktop, wrong on mobile */
    border-radius: 5px;
    filter: brightness(80%);
    filter: grayscale(20%);
}

.movie-grid-item-image {
  width: 100%; /* or a specific width */
  aspect-ratio: 180 / 272; /* Width to height ratio */
  /*background-color: lightblue;*/ /* Just to visualize */
}

.movie-grid-item-title {
    color: #fcfbd5;
    font-size: 14px;
    margin-top: 8px; /* Movie grid space between image and title */
    text-align: center;
    white-space: nowrap;        /* Prevents text from wrapping to the next line */
    overflow: hidden;           /* Hides the overflowing content */
    text-overflow: ellipsis;    /* Adds the ellipsis (...) at the end */
    width: 180px;
}

.movie-grid-item-subtitle {
    color: #bbb;
    font-size: 12px;
    margin-top: 4px; /* Movie grid space between title and subtitle */
    text-align: center;
    margin-bottom: 8px;

    white-space: nowrap;        /* Prevents text from wrapping to the next line */
    overflow: hidden;           /* Hides the overflowing content */
    text-overflow: ellipsis;    /* Adds the ellipsis (...) at the end */
    width: 180px;
}

.prev-next-spacer {
    display: flex;
    /*align-items: center;*/
    justify-content: center;
    flex-grow: 1; /* Allow navigation to grow and take remaining space */
	  /*margin: 20px 0px 20px 0px;*/
    font-size: 14px;
}

.form-container {
    display: flex;
    justify-content: space-between;
}

.page-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 15px 1px; /* row/col gap between page wide sections */
    margin: 15px auto;
    padding: 0px;
    width: 100%;
    max-width: 800px;
}

.page-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%; /* Ensure the item takes the full height of the grid area */
    padding: 0 10px;
}

.page-item-custom-pad {
    padding: 0 15px;
}

.page-item-full-width {
    grid-column: span 2;
}

.table-container {
    /*padding-left: 30px;*/
    /*padding-right: 15px;*/
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.table-container-half {
    /*padding: 10px;*/
    box-sizing: border-box;
    text-align: center;
}

.hidden {
    visibility: hidden;
}

.details-video-poster-container {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.details-video-poster-item {
    width: 100%;
    height: 100%;
    border-radius: 10px; /* Rounded corners */

    &.clickable {
        cursor: pointer;
    }
}

.details-title {
    flex-grow: 1;
    color: #fcfbd5;
    font-size: 24px;
    text-align: center;
}

.details-link-previous {
    width:      22px;
    height:     22px;
    border:     0px;
    margin:     3px 18px 1px 5px;
    background: url("/img/left.svg"), linear-gradient(transparent, transparent) no-repeat;
    background-size: 22px;
}

.details-link-next {
    width:      22px;
    height:     22px;
    border:     0px;
    margin:     3px 5px 1px 18px;
    background: url("/img/right.svg"), linear-gradient(transparent, transparent) no-repeat;
    background-size: 22px;
}

.details-movie-info {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: #bbb;
}

.details-movie-info th {
    text-align: left;
    padding-left: 5px;
    font-weight: normal;
}

.details-movie-info td {
    text-align: right;
    padding-right: 5px;
}

.details-movie-plot {
    width: 100%;
    margin-bottom: 2px;
    border-collapse: collapse;
    font-size: 15.5px;
    color: #ccc;
}

.details-movie-plot td {
    text-align: justify;
    padding-left: 5px;
    padding-right: 5px;
}

.details-vote-buttons-container {
    display: flex;
    justify-content: center;
    /*margin-bottom: 20px; */
}

.details-vote-buttons-container button {
    font-size: 14px;
    padding: 5px 12px;
    margin: 0 2px;
    background-color: #444;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-family: Arial, sans-serif;

    &.selbutton {
        background-color: #888; /* was #666; */
    }
}

.details-vote-buttons-container button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.details-streaming-link {
    font-size: 14px;
    color: #bbb;
    text-align: center;
    white-space: wrap;
}

@media (pointer: fine) {
    .details-vote-buttons-container button:hover {
        background-color: #666;
    }
}

.details-ref-links-left, .details-ref-links-right {
  flex: 1;                 /* Each takes up the remaining space */
  display: flex;           /* Aligns text within the divs */
  align-items: center;     /* Centers content vertically */
}

.details-ref-links-middle {
  width: 50px;             /* Fixed width of 50px for the middle column */
  display: flex;
  align-items: center;
  justify-content: center; /* Center content horizontally and vertically */
}

.details-ref-links-left {
  justify-content: flex-end; /* right-align */
  font-size: 14px;
}

.details-ref-links-right {
  justify-content: flex-start; /* left-align */
  font-size: 14px;
}

.login-captcha {
    height: 30px;
    width: 80px;
    margin: 0px 8px;
    border-radius: 5px;
}

input[type="text"] {
    height: 30px;
    padding: 10px 15px;
    margin: 0px 8px;
    background-color: #333;
    border: 1px solid #444;
    border-radius: 5px;
    color: #bbb; /* was: #ffffff */
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s, background-color 0.3s;
}

.input-text-small {
  width: 80px;
}

.input-text-large {
  width: 130px;
}

input[type="text"]::placeholder {
    color: #777;
}

input[type="text"]:focus {
    border-color: #888888; /*#fcfbd5;*/ /*#007BFF;*/
    background-color: #444;
    outline: none;
}

input[type="submit"] {
    height: 30px;
    padding: 5px 20px;
    margin: 0px 8px;
    font-size: 16px;
    color: #bbb; /* was: #ffffff */
    background-color: #444444; /*#666666;*/
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

input[type="submit"]:hover {
    background-color: #666666; /*0056b3;*/
}

input[type="submit"]:active {
    background-color: #555555; /*#004080;*/
}

select {
    height: 30px;
    /*width: 120px;*/
    padding: 5px 15px; /* top/bottom, right/left */
    margin: 0px 8px;
    background-color: #333;
    border: 1px solid #444;
    border-radius: 5px;
    color: #bbbbbb; /* ffffff;*/
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s, background-color 0.3s;
    appearance: none; /* Remove default arrow to allow custom styling */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><path fill="%23ffffff" d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

label {
    display: inline-block;
    margin-right: 10px;
    color: #cccccc;
    font-size: 16px;
    font-weight: bold;
    vertical-align: middle;
    line-height: 40px; /* Match the height of the select box */
}

@supports (-moz-appearance:none) {
    select {
        padding: 5px 35px 5px 15px; /* top, right, bottom, left */
    }
}

.similar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.fine-line {
    flex: 1;
    border: none;
    border-top: 1px solid #ccc;
}

.ad-container {
    margin-top: 10px;
    display: block;
    border: 1px solid #aaa; /* was: ccc */
    border-radius: 10px;
    background-color: transparent;
    text-align: center;
    padding: 5px 0px;
}

.ad-title {
    color: #e8e8e8; /* old: #d6d5b5; and: fcfbd5 */
    font-size: 14px;
    margin-top: 4px;
    text-transform: uppercase;
}

.ad-content {
    color: #aaa; /* was: ccc */
    font-size: 13px;
    margin-top: 3px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.ad-link {
    text-decoration: none;
    display: block;
    color: inherit; /* prevent default link color */
}

.ad-link:hover .ad-container {
    /*border-color: #fcfbd5;*/ /* Optional: highlight border on hover */
    cursor: pointer;
}

/* custom style for mobile devices */
@media (max-width: 600px) {

    .page-container {
        grid-template-columns: 1fr;
    }

    .page-item-full-width {
        grid-column: span 1;
    }

    .table-container {
        /*padding-left: 6px;*/
        /*padding-right: 6px;*/
        display: grid;
        grid-template-columns: 1fr;
    }

    .page-item {
        /* removed for mobile ad layout: display: flex;*/
        align-items: center;
        justify-content: center;
        height: 100%;
        padding: 0 10px;
    }

    .page-item-custom-pad {
        padding: 0 15px;
    }

    .logo {
        width: 60px;
    }

    .topicon {
        width: auto;
        height: 10px;
        padding-top: 5px;
    }

    .nav-link {
        font-size: 11px;
        margin: 0px 5px;
    }

    header {
        padding: 7px 8px; /* SAME? */
    }

    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .movie-grid-item-title {
        font-size: 11px;
        margin-top: 8px;
        width: 150px;
    }

    .movie-grid-item-subtitle {
        font-size: 10px;
        margin-top: 4px;
        margin-bottom: 8px;
        width: 150px;
    }

    .details-title {
        flex-grow: 1;
        color: #fcfbd5;
        font-size: 18px;
        text-align: center;
    }

    .details-link-previous {
        width:      18px;
        height:     18px;
        border:     0px;
        margin:     3px 16px 1px 5px;
        background: url("/img/left.svg"), linear-gradient(transparent, transparent) no-repeat;
        background-size: 18px;
    }

    .details-link-next {
        width:      18px;
        height:     18px;
        border:     0px;
        margin:     3px 5px 1px 16px;
        background: url("/img/right.svg"), linear-gradient(transparent, transparent) no-repeat;
        background-size: 18px;
    }

    .details-vote-buttons-container button {
        font-size: 14px;
        padding: 5px 8px;
        margin: 0 1.5px;
    }

    .details-movie-info-first {
        margin-bottom: 10px; /* creates space between movie info group on mobile */
    }

    select {
        height: 30px;
        /*width: 100px;*/
        padding: 5px 12px;
        margin: 0px 5px;
        font-size: 14px;
    }

    .navigation {
	      margin: 1px 0px 0px 0px;
    }

    input[type="text"] {
        margin: 0px 0px;
    }

    input[type="submit"] {
        margin: 0px 4px;
    }
}
