@import url('https://fonts.googleapis.com/css2?family=Jersey+10&display=swap');


/*==MAIN==*/
html {
    font-size: 16px;
    user-select: none;
}

@media (min-width: 768px) {
  html {
    font-size: 18px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem #000000, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
    font-family: 'Jersey 10', 'Trebuchet MS', sans-serif;
    margin-bottom: 60px;
    
    background-image: url("https://w.wallhaven.cc/full/0j/wallhaven-0j1rqw.jpg");
    background-attachment: fixed;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    color: #ECDFCC;
    
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

main {
    margin-top: 8vh;
    flex: 1;
}

/*==FORM==*/

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.form-group {
    font-size: 15px;
    border-collapse: collapse;
    margin-top: 10px;
    border-color: olive;
}

.form-control {
    font-family: "Jersey 10" ,"Trebuchet MS", sans-serif;
    font-size: 14px;
    background-color: #1a1d20;
    color: #ECDFCC;
}

    .form-control:focus {
        outline: none;
        border-color: #b6ff00;
        box-shadow: 0 0 0 0.2rem #b6ff00;
        background-color: #1a1d20;
        color: #ECDFCC;
    }

.control-label {
    margin-left: 10px;
}

.form-check-label {
    margin-left: 10px;
}

/*==TITLE==*/

.headerTitle {
    opacity: 0;
    animation: fadeIn2 2s ease forwards;
}

/*==NAVBAR==*/

.navbar-custom {
    background-image: url("https://w.wallhaven.cc/full/0j/wallhaven-0j1rqw.jpg");
}

    .navbar-custom .navbar-brand,
    .navbar-custom .navbar-brand .nav-link {
        transition: 0.3s;
        color: #ECDFCC;
    }

.navbar-brand:hover {
    color: #b6ff00;
    text-shadow: 0 0 20px olivedrab;
}

.nav-link:hover {
    color: #b6ff00;
    text-shadow: 0 0 20px olivedrab;
}

.nav-link-user {
    color: #b6ff00;
    font-style: italic;
}

/*==LOADER (I got this one online but I think it's cool)==*/
.loader {
    --loader-color: #ECDFCC;

    width: 60px;
    display: flex;
    align-items: flex-start;
    aspect-ratio: 1;
}

    .loader:before,
    .loader:after {
        content: "";
        flex: 1;
        aspect-ratio: 1;
        --g: conic-gradient(from -90deg at 10px 10px,var(--loader-color) 90deg,#0000 0);
        background: var(--g), var(--g), var(--g);
        filter: drop-shadow(30px 30px 0 var(--loader-color));
        animation: l20 1s infinite;
    }

    .loader:after {
        transform: scaleX(-1);
    }

@keyframes l20 {
    0% {
        background-position: 0 0, 10px 10px, 20px 20px
    }

    33% {
        background-position: 10px 10px
    }

    66% {
        background-position: 0 20px,10px 10px,20px 0
    }

    100% {
        background-position: 0 0, 10px 10px, 20px 20px
    }
}

.loader-wrapper {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.pixel-border {
    border-image: url("../others/border_01_nobackground.png") 12 / 12px / 0 round;
    padding: 5px;
    display: inline-block;
    min-width: 100px;
}

.pixel-border2 {
    border-image: url("../others/border_04_nobackground.png") 12 / 12px / 0 round;
    padding: 5px;
    display: inline-block;
    backdrop-filter: blur(3px);
    background-color: rgba(0, 0, 0, 0.4);
}

.movie-row {
    display:flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
    margin-bottom: 1rem;
    
    max-width: 900px;
    width: 100%;
    margin-inline: auto;
    
    opacity: 0;

    animation: fadeIn 1s ease forwards;
    animation-delay: calc(var(--delayVariable) * 0.1s);
}


.col-poster { 
    width: 120px; 
    flex-shrink: 0;
}
.col-title { 
    width: 180px; 
}
.col-director { 
    width: 150px; 
}
.col-date { 
    width: 100px; 
}
.col-desc { 
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;     /* show max 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.col-actions  { 
    width: 120px; flex-shrink: 0; 
}

@media (max-width: 768px) {
    .col-desc {
        display: none;
    }
}

.Pbutton-details {
    color: #fff;
    background-color: #c1c019;
    padding: 2px 5px 2px 5px;
    font-size: 12px;
    border: 1px solid #ecdfcc;
    cursor: pointer;
    text-decoration: none;
}
.Pbutton-details:active {
    transform: translateY(5px);
}
.Pbutton-delete {
    color: #fff;
    background-color: #fb4934;
    padding: 5px 10px 5px 10px;
    font-size: 12px;
    border: 2px solid #ecdfcc;
    cursor: pointer;
    text-decoration: none;
}
.Pbutton-delete:active {
    transform: translateY(5px);
}

.detail-container {
    font-family: "Jersey 10", sans-serif;
    width: 900px;
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.detail-info {
    max-width: 500px;
}

.detail-title {
    font-size: 3rem;
}
.detail-director {
    font-size: 2rem;
}
.detail-date, .detail-genre {
    font-size: 2rem;
}
.detail-description {
    font-size: 1.6rem;
    font-style: italic;
}




/* PAGES */
/* Index */
#about1 {
    max-width: 900px;
    place-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#about1 .pixel-border2 {
    padding: 20px;
    margin: 20px;
}

#gif1 {
    display: flex;
    justify-content: center;
}

#gif1 img {
    width: 200px;
    place-self: center;
    animation: fadeIn 1s ease forwards;
}

/*==CONTACT SECTION==*/
#links1 {
    align-items: center;
}


.contact-section {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    animation: fadeIn 1s ease forwards;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #ECDFCC;
    text-decoration: none;
    font-size: 1rem;
    padding: 8px 18px;
    border: 2px solid #ECDFCC;
    transition: color 0.3s ease, border-color 0.3s ease, text-shadow 0.3s ease;
    backdrop-filter: blur(3px);
    background-color: rgba(0, 0, 0, 0.4);
}

.contact-link:hover {
    color: #b6ff00;
    border-color: #b6ff00;
    text-shadow: 0 0 10px olivedrab;
}

.contact-link:active {
    transform: translateY(3px);
}

/*==SEARCH PAGE==*/

#search-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

#search-page .pixel-border2 {
    padding: 20px;
}

.search-intro-box {
    margin: 1rem 0 2rem 0;
    animation: fadeIn 1s ease forwards;
}

.search-intro {
    font-size: 18px;
    color: #ECDFCC;
    margin: 0;
    line-height: 1.6;
}

.search-intro a {
    color: #b6ff00;
    text-decoration: none;
    transition: text-shadow 0.3s ease;
}

.search-intro a:hover {
    text-shadow: 0 0 10px olivedrab;
}

.search-input-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.search-input {
    flex: 1;
    font-size: 16px;
    padding: 0.5rem 1rem;
}

.search-btn {
    font-size: 1rem;
    padding: 8px 20px;
    white-space: nowrap;
}

/*SEARCH RESULT*/

.pixel-border img {
    display: block;
    width: 100%;
    height: auto;
    background: transparent;
}

.col-poster .pixel-border {
    background: transparent;
    line-height: 0;
}

@media (max-width: 480px) {
    .col-poster {
        width: 80px;
    }
}

/* FAVORITE */
.favorite-row .movie-row {
    place-self: center;
}

/* PONSAI */

.plant img {
    image-rendering: pixelated;
    width: 50px;
    height: 50px;
}

@media (max-width: 480px) {
    .plant img {
        width: 50px;
        height: 50px;
    }
}

.habit-row {
    place-self: center;
    display:flex;
    width: 70%;
    max-width: 630px;
    align-items: stretch;
    gap: 1rem;
    padding: 0.5rem;
    margin-bottom: 1rem;

    opacity: 0;

    animation: fadeIn 1s ease forwards;
    animation-delay: calc(var(--delayVariable) * 0.1s);

    background-color: rgba(0, 0, 0, 0.4);   /* ✅ semi-transparent dark overlay */
}

.col-habit {
    flex: 1;
    min-width: 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.col-habit.col-action {
    flex: 1.5;
}

.col-habit.col-plant {
    flex: 1;
}

.col-habit.col-plant .pixel-border {
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
}

.col-action {
    flex-shrink: 1;
    min-width: 80px;
}

.col-action button {
    white-space: nowrap;
    font-size: 0.85rem;
}

@media (max-width: 480px) {
    .habit-row {
        width: 100%;      /* full width on mobile */
    }

    .col-action {
        width: 100%;      /* button takes full row on mobile */
        text-align: center;
    }
}

.habit-form {
    align-self: center;
    width: 350px;
    animation: fadeIn 1s ease forwards;
}

.habit-form .row {
    margin: 10px;
}

.habit-input-text {
    background-color: #2b3035;
    color: #c1c019;
    border-radius: 10px;
    transition: 0.3s ease;
}

.habit-input-text:focus {
    outline: none;
    border-color: #b6ff00;
    box-shadow: 0 0 0 0.2rem #b6ff00;
}

emoji-picker {
    width: 400px;
    height: 300px;
    --border-radius: 10px;
    --emoji-size: 1rem;
}

/**/
.description-box {
    padding: 20px 20px;
    margin-bottom: 10px;
    display: flex;
    place-self: center;
}

