:root {
  /* This is our default "Movie" theme color */
  --primary-accent: #e66b70; 
}

/* WHEN the body has the class "theme-tv", this rule will activate */
body.theme-tv {
  /* It overrides the variable with the "TV Show" theme color */
  --primary-accent: #86fccb;
}
body {
     font-family: "Raleway", sans-serif;
    background-color: #181319;
    color: var(--primary-accent);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
}
.comfortaa-font {
  font-family: "Comfortaa", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

.container {
    width: 100%;
    max-width: 800px;
}
.logo {
    display: block;
    margin: 20px auto 40px;
    max-width: 250px;
    height: auto;
}

/* --- Search and Toggle Controls --- */
.search-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

/* --- RETRO SEARCH BAR STYLES --- */
.input-container {
    width: 250px; 
    position: relative;
}

.icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.input {
    width: 100%;
    height: 50px; /* Matched height with new toggle */
    padding: 10px;
    transition: .2s linear;
    border: 2.5px solid #e0e0e0; 
    font-size: 14px;
    letter-spacing: 2px;
    background-color: #181319; 
    color: var(--primary-accent); 
    box-sizing: border-box;
    font-family: "Comfortaa", sans-serif; /* Ensure font is consistent */
}

.input:focus {
    outline: none;
    border: 2.5px solid var(--primary-accent);
    box-shadow: -5px -5px 0px var(--primary-accent);
}

.input-container:hover > .icon {
    animation: anim 1s linear infinite;
}

@keyframes anim {
    0%,
    100% {
        transform: translateY(-50%) scale(1);
    }

    50% {
        transform: translateY(-50%) scale(1.1);
    }
}

.icon svg path {
    stroke: #e0e0e0;
}

/* --- NEW 3D TOGGLE SWITCH STYLES --- */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #aaa;
}
.new-switch-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.label {
  height: 50px;
  width: 100px;
  background-color: #333;
  border-radius: 25px;
  box-shadow: inset 0 0 5px 2px rgba(0, 0, 0, 0.5), 
              0 5px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.4s;
  -webkit-tap-highlight-color: transparent;
}

.label:hover {
  transform: perspective(100px) rotateX(5deg) rotateY(-5deg);
}

#search-type-toggle:checked ~ .label:hover {
  transform: perspective(100px) rotateX(-5deg) rotateY(5deg);
}

#search-type-toggle {
  display: none;
}

#search-type-toggle:checked ~ .label::before {
  left: 55px;
  background-color: #86fccb;
  background-image: linear-gradient(315deg, #86fccb 0%, #a2ffe1 70%);
  box-shadow: 0 2px 5px rgba(134, 252, 203, 0.4), 
              5px 5px 10px rgba(0, 0, 0, 0.3);
  transition: 0.4s;
}

.label::before {
  position: absolute;
  content: "";
  height: 40px;
  width: 40px;
  border-radius: 50%;
  background-color: #f22727;
  background-image: linear-gradient(
    130deg,
    #cccccc 10%,
    #ff9393 11%,
    #f04949 62%
  );
  left: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3), 10px 10px 10px rgba(0, 0, 0, 0.3);
  transition: 0.4s;
}


/* --- RESULTS GRID --- */
#results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    position: relative;
}
/* Add this to your CSS, maybe near the results grid styles */
#results-title {
  color: var(--primary-accent); /* Your primary accent color */
  text-align: left;
  font-family: "Raleway", sans-serif;
  font-weight: 250;
  font-size: 25px;
  margin-bottom: 20px; /* Space between title and results */
  padding-bottom: 10px; /* Space between text and the border */
  border-bottom: 2px solid #333; /* A subtle separator line */
}

.title-card {
    background-color: #1e1e1e;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #333;
    text-align: center;
    transition: transform 0.2s ease-in-out;
    cursor: pointer;
}

.title-card:hover {
    transform: scale(1.05);
}

.title-card img {
    width: 100%;
    height: 300px;
    object-fit: contain; 
    border-radius: 5px;
    background-color: #1e1e1e; 
}

.title-card h2 {
    margin-top: 10px;
    font-size: 1.1em;
    color: var(--primary-accent);
    min-height: 48px; 
}

.title-card p {
    font-size: 0.9em;
    color: #aaa;
}

/* --- LOADER AND ERROR STYLES --- */
#loader {
  width: 50px;
  height: 50px;
  background-color: #86fccb;
  border-radius: 50%;
  box-shadow: -15px -15px 15px #e66b70, 15px -15px 15px #9bedcb, 15px 15px 15px #52dec2, -15px 15px 15px #9bedcb, -15px 0 15px #1874f6, 15px 0 15px #02e6ff;
  animation: rotate 2s infinite;
  transform: rotate(0) scale(0.8);
  margin: 20px auto;
  display: none; /* Controlled by JS */
}

@keyframes rotate {
  0% {
    transform: rotate(360deg) scale(0.8);
  }
  50% {
    transform: rotate(0) scale(1.2);
  }
}
.error {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  width: 320px;
  padding: 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: start;
  background: #EF665B;
  border-radius: 8px;
  box-shadow: 0px 0px 5px -3px #111;
  margin: 20px auto;
}
.error__icon {
  width: 20px;
  height: 20px;
  transform: translateY(-2px);
  margin-right: 8px;
}
.error__icon path {
  fill: #fff;
}
.error__title {
  font-weight: 500;
  font-size: 14px;
  color: #fff;
}
.error__close {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-left: auto;
}
.error__close path {
    fill: #fff;
}

/* --- MODAL STYLES --- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background-color: #181319;
    border-radius: 10px;
    border: 1px solid var(--primary-accent);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column; 
    position: relative;
    padding: 20px;
    box-shadow: 0px 0px 30px rgba(134, 252, 203, 0.4);
}

@media (min-width: 768px) {
    .modal-content {
        flex-direction: row; 
        align-items: flex-start;
    }
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10;
}

.modal-poster-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .modal-poster-area {
        width: 300px; 
    }
}

.modal-poster-area img {
    width: 100%;
    max-width: 300px; 
    height: auto; 
    object-fit: contain;
    border-radius: 8px;
}

.modal-poster-area .tagline {
    font-style: italic;
    color: #aaa;
    margin-top: 15px;
    padding: 0 10px;
}

.modal-info {
    flex-grow: 1; 
    padding-left: 0;
    text-align: left; 
}

@media (min-width: 768px) {
    .modal-info {
        padding-left: 20px;
    }
}

.modal-info h2 {
    color: var(--primary-accent);
    margin-top: 0;
    text-align: left;
}

.trivia, .cast-section, .watch-section {
    margin-top: 20px;
    border-top: 1px solid #333;
    padding-top: 15px;
    text-align: left;
}

.trivia p, .cast-section p, .watch-section p {
    margin: 5px 0;
    color: #e0e0e0;
}

.cast-section h3, .watch-section h3 {
    color: var(--primary-accent);
    margin-bottom: 10px;
}

/* Cast List Styles */
.cast-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    font-size: 0.9em;
    color: #aaa;
}
.cast-list li {
    padding: 2px 0;
}

/* Where to Watch Styles */
.provider-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-start; 
}
.provider-item {
    background-color: #2a2a2a;
    border-radius: 8px;
    padding: 5px;
    display: flex;
    align-items: center;
}
.provider-item img {
    width: 40px;
    height: 40px;
    border-radius: 5px;
}
body.theme-tv .surprise-btn-slide {
  /* When the TV theme is on, flip c1 to the Movie color */
  color: #86fccb;
}
.surprise-btn-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  color: #e66b70; 
  text-shadow: 0 0 2px black;

  cursor: pointer;
  border: solid 2px #181319; /* Dark border */
  letter-spacing: 1px;
  font-weight: 600;
  font-size: 17px;
  font-family: "Raleway", sans-serif;
  /* box-shadow: -5px -5px 15px var(--primary-accent); */
  background-color: #181319; /* Hooked into your theme! */
  box-shadow: 0 0 0 2px black;
  border: None;
  z-index: 1;
  border-radius: 50px;
  position: relative;
  overflow: hidden;
  transition: all 0.5s ease;
  min-width: 250px; /* Lock the width to prevent resizing */
}

.surprise-btn-slide:active {
  transform: scale(0.98);
  transition: all 100ms ease;
}

.surprise-btn-slide svg {
  transition: all 0.5s ease;
  z-index: 2;
}

.surprise-btn-slide .play {
  transition: all 0.5s ease;
  transition-delay: 300ms;
}

.surprise-btn-slide:hover svg {
  transform: scale(3) translate(50%);
}

.surprise-btn-slide .now {
  position: absolute;
  left: 0;
  transform: translateX(-100%);
  transition: all 0.5s ease;
  z-index: 2;
}

.surprise-btn-slide:hover .now {
  transform: translateX(100%); /* Adjusted for better centering */
  transition-delay: 300ms;
}

.surprise-btn-slide:hover .play {
  transform: translateX(200%);
  transition-delay: 300ms;
}
.button-wrapper {
  
  display: flex;
  justify-content: center; /* This is for horizontal centering of the button */
  margin-top: 40px;      /* Adds some space above the button */
  margin-bottom: 40px;   /* Adds some space below the button */
}
.gradient-border-wrap {
  position: relative;
  z-index: 0;
  border-radius: 50px; /* Rounding happens here */
  overflow: hidden;
  padding: 4px; /* This is the border thickness */
  background: linear-gradient(45deg, #e66b70, #86fccb);
}
.logo {
  /* ... your other logo styles are here ... */
  cursor: pointer; /* This is the line to add */
}
