@import url('css/bottom-nav-v2.css?v=6');

/* Poster Creation Page Styles */

/* Login page styles */
.login-container {
  width: 100%;
  max-width: 400px;
  margin: 100px auto;
  text-align: center;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  background-color: #fff;
}

.login-options {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s;
}

.login-btn img {
  height: 24px;
}

.google-btn {
  background-color: #fff;
  color: #444;
  border: 1px solid #ddd;
}

.google-btn:hover {
  background-color: #f8f8f8;
}

.amazon-btn {
  background-color: #ff9900;
  color: #000;
  border: 1px solid #ff9900;
}

.amazon-btn:hover {
  background-color: #ffb74d;
}


.create-poster-page {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.search-container {
    position: relative;
    margin-bottom: 20px;
}

.search-container input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.search-result {
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-result img {
    border-radius: 4px;
}

.search-result span {
    flex: 1;
}

.selected-show-container {
    text-align: center;
    margin: 20px 0;
}

.show-details img {
    max-width: 300px;
    border-radius: 8px;
}

.create-poster-btn {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 16px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.processing-error {
    color: #d32f2f;
    background: #ffebee;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

.processing-success {
    color: #388e3c;
    background: #e8f5e9;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.photo-preview-container {
    position: relative;
    display: inline-block;
    margin: 10px 0;
}

#photoPreview {
    max-width: 100%;
    display: block;
}

#facesOverlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.face-rect {
    position: absolute;
    border: 2px solid #00ff00;
    cursor: pointer;
    pointer-events: auto;
}

.face-rect.selected {
    border-color: #ff0000;
}

#faceButtons {
    margin: 10px 0;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.face-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 15px 0;
}

.face-button {
    padding: 8px 15px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.face-button:hover {
    background: #45a049;
}

.face-button.selected {
    background: #2196F3;
    transform: scale(1.05);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.poster-actions {
    margin-top: 20px;
}

.poster-actions button {
    margin: 0 10px;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.alexa-command-section {
    margin: 20px 0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.alexa-input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    flex: 1;
    font-size: 16px;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    /* Fallback per browser che non supportano backdrop-filter */
    background: rgba(18, 18, 18, 0.95);
    /* Effetto liquid glass per browser moderni */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    height: 60px !important;
    z-index: 1000;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
    width: 20%;
    height: 100%;
}

.nav-item:active {
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.nav-icon {
    font-size: 22px !important;
    margin-bottom: 4px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-label {
    font-size: 11px !important;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    padding: 0 2px;
}

.nav-item.active {
    color: #8ef5c0; /* lime-turchese Watchies */
}

.recommendation-container {
    transition: opacity 0.3s ease;
}

.key-elements {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.key-elements .shows-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    justify-content: center;
}

.key-elements .button-group {
    text-align: center;
    margin: 20px 0;
}

.show-description {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .show-description {
        grid-template-columns: 1fr;
    }

    .show-poster img {
        max-width: 100%;
        height: auto;
    }

    .key-elements .shows-scroll {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

.load-more-button {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background: #333333;
    color: #FFFFFF;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

.stat-segment.other {
    background-color: #808080;
}

.liked-shows-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.liked-shows-table th,
.liked-shows-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.liked-shows-table th {
    background: rgba(0, 0, 0, 0.2);
    font-weight: bold;
}

.liked-shows-table .genre-tag {
    display: inline-block;
    margin: 2px;
    padding: 2px 6px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.8em;
}

/* Responsive styles for all screen sizes */
@media screen and (max-width: 1200px) {
    .container {
        width: 95%;
        padding: 10px;
    }

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

@media screen and (max-width: 768px) {
    .shows-scroll {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .hero-section {
        height: 12vh;
    }

    .hero-content h1 {
        font-size: 22px;
    }

    .button-group {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 3px;
        margin-bottom: 5px;
    }

    .profile-container {
        padding: 10px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .show-card {
        min-width: unset;
    }
}

@media screen and (max-width: 480px) {
    .hero-section {
        min-height: 25vh !important;
        max-height: none !important;
        padding-bottom: 5px;
    }
    .hero-content h1 {
        font-size: 14px;
        margin-top: 0;
        margin-bottom: 3px;
    }

    .shows-scroll {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 5px;
        padding: 12px;
    }

    .show-card h3 {
        font-size: 0.7em;
        padding: 4px;
    }

    .show-card p {
        padding: 0 4px 4px;
        font-size: 0.65em;
    }

    .bottom-nav {
        padding: 5px 0;
        height: 45px;
    }

    .nav-icon {
        font-size: 18px;
    }

    .nav-label {
        font-size: 9px;
    }

    .rating-buttons {
        gap: 3px;
    }

    .thumb-button {
        width: 35px;
        height: 35px;
        font-size: 1.5em;
    }

    .friend-request-section form {
        flex-direction: column;
        gap: 5px;
    }

    .shows-section {
        padding: 10px;
    }

    .shows-section h2 {
        font-size: 16px;
        margin: 5px 0;
    }

    .action-buttons a {
        padding: 4px 8px;
        font-size: 0.8em;
    }

    .cache-stats-container {
        margin: 10px;
        padding: 8px;
        font-size: 0.8rem;
    }
}

/* Ensure buttons and interactive elements are touch-friendly on mobile */
@media (hover: none) and (pointer: coarse) {
    .cta-button,
    .load-more-button,
    .thumb-button,
    .action-buttons a {
        min-height: 28px;
        padding: 4px 8px;
        font-size: 0.8em;
    }

    .cta-button .icon {
        font-size: 1em;
    }

    .shows-scroll {
        -webkit-overflow-scrolling: touch;
    }
}

/* Specifiche ottimizzazioni per iPhone */
@media screen and (max-width: 414px) {
    .hero-section {
        min-height: 28vh !important;
    }

    .cta-button {
        min-width: auto;
        padding: 3px 6px;
        font-size: 0.75em;
    }

    .cta-button .icon {
        font-size: 0.9em;
    }

    .button-group.mood-selector {
        gap: 1px;
        margin: 0;
    }

    .hero-content h1 {
        font-size: 13px;
        margin: 2px 0;
    }
}
.show-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
}

.rating-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.thumb-button {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: #f0f0f0;
    transition: background-color 0.2s;
}

.thumb-button.active {
    background: #4CAF50;
    color: white;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.show-info .action-buttons {
    justify-content: flex-start;
}

.show-info .watchlist-button,
.show-info .dislike-button {
    padding: 8px 16px;
    font-size: 14px;
}

.watchlist-button, .dislike-button {
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9em;
    text-align: center;
}

.watchlist-button {
    background: #4CAF50;
    color: white;
}

.dislike-button {
    background: #f44336;
    color: white;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #141414;
    color: white;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
    width: 100%;
}

/* Increase max-width for very large screens */
@media screen and (min-width: 1600px) {
    .container {
        max-width: 1600px;
    }
    
    .section-container {
        max-width: 1600px;
    }
}

@media screen and (max-width: 768px) {
    .container {
        padding: 10px;
    }

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

    .header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .search-box input {
        width: 100%;
        margin: 0 0 10px 0;
    }

    .show-card h3 {
        font-size: 0.9rem;
    }

    .show-card p {
        font-size: 0.8rem;
    }

    .nav-button, .back-button, .watchlist-button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 480px) {
    .shows-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }
}

h1 {
    text-align: center;
    margin: 20px 0;
}

.platform {
    margin: 40px 0;
}

h2 {
    margin-bottom: 20px;
    color: #e50914;
}

.shows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
    width: 100%;
}

.show-card {
    transition: opacity 0.3s ease-out;
    width: 100%;
    background: #222;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
    height: fit-content;
}

.rating-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 10px 0;
}

.thumb-button {
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid #666;
    border-radius: 50%;
    cursor: pointer;
    font-size: 2.2em;
    opacity: 0.8;
    transition: all 0.3s;
    padding: 12px;
    margin: 0 5px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb-button:hover {
    opacity: 1;
    transform: scale(1.1);
    border-color: #999;
}

.thumb-button.active {
    opacity: 1;
    color: #2196F3;
    border-color: #2196F3;
    transform: scale(1.2);
    background: rgba(33, 150, 243, 0.2);
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.5), inset 0 0 10px rgba(33, 150, 243, 0.3);
    text-shadow: 0 0 10px rgba(33, 150, 243, 0.8);
}

.friend-rating {
    text-align: center;
    font-size: 1.5em;
    margin: 5px 0;
    color: #2196F3;
}

.friend-rating {
    text-align: center;
    font-size: 1.2em;
    margin: 5px 0;
}

.friend-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px;
}

.add-to-watchlist-btn {
    background-color: #4CAF50;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9em;
    transition: background-color 0.3s;
}

.add-to-watchlist-btn:hover {
    background-color: #45a049;
}

.already-in-watchlist {
    color: #888;
    font-size: 0.9em;
    font-style: italic;
}

.watchlist-container {
    margin-top: 20px;
}

.empty-watchlist {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
}

.empty-message {
    color: #6c757d;
    font-size: 1.1em;
    margin: 15px 0;
}

.platform {
    margin-bottom: 30px;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


.show-card {
    background: #222;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
    position: relative;
}

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

.show-card img {
    width: 100%;
    height: auto;
}

.show-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.rating-bar {
    width: 50px;
    height: 8px;
    background: linear-gradient(to right, #f00, #ff0, #0f0);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.rating-fill {
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    position: absolute;
    right: 0;
    top: 0;
}

.rating-text {
    font-size: 12px;
    margin-left: 5px;
}

.show-card h3 {
    padding: 5px;
    font-size: 0.8rem;
}

.show-card p {
    padding: 0 5px 5px;
    color: #999;
    font-size: 0.7rem;
}

.show-overview {
    padding: 40px 5px 5px;
    color: #ccc;
    font-size: 0.7rem;
    max-height: 80px;
    overflow-y: auto;
    line-height: 1.3;
}

.show-director, .show-country, .show-cast {
    padding: 0 10px 5px;
    color: #ccc;
    font-size: 0.85rem;
}

.show-director strong, .show-country strong, .show-cast strong {
    color: #fff;
}

.search-box {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: #222;
    border-radius: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.search-box textarea {
    width: 80%;
    min-height: 120px;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #333;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    resize: vertical;
}

.search-box input {
    padding: 8px;
    margin-right: 10px;
    border-radius: 4px;
    border: 1px solid #444;
    background: #333;
    color: white;
}

.search-box button {
    padding: 8px 16px;
    background: #e50914;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.search-box button:disabled {
    background: #666;
    cursor: not-allowed;
}

.progress-container {
    margin: 10px auto;
    text-align: center;
    width: 100%;
    max-width: 300px;
}

.progress-container.active {
    display: block;
}

.progress-percentage {
    font-size: 14px;
    margin-bottom: 5px;
    font-weight: bold;
    color: white;
}

.progress-bar {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.progress-fill {
    height: 100%;
    background-color: #4CAF50;
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 5px;
}

.traffic-light.red {
    background-color: #f44336;
    animation: pulse 1.5s infinite;
}

/* Miglioramenti per navigazione Fire TV */
.firetv-mode .section-title {
  font-size: 1.4em;
  margin: 20px 0 10px 0;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
}

.firetv-mode-indicator {
  position: fixed;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 10px;
  border-radius: 5px;
  z-index: 9999;
  transition: opacity 1s ease;
}

/* Stile più visibile per l'elemento con focus */
.firetv-focus {
  transform: scale(1.05) !important;
  box-shadow: 0 0 20px rgba(0, 162, 255, 0.9) !important;
  border: 2px solid #00a2ff !important;
  z-index: 100 !important;
  outline: none !important;
  transition: all 0.2s ease !important;
}

/* Evidenzia sezioni navigabili */
.firetv-mode .recommendations-section,
.firetv-mode .watchlist-section,
.firetv-mode .control-bar,
.firetv-mode .categories-section,
.firetv-mode .update-buttons {
  padding: 15px;
  margin: 10px 0;
  border-radius: 8px;
  position: relative;
}

/* Bordo leggero per identificare le sezioni */
.firetv-mode .recommendations-section:before,
.firetv-mode .watchlist-section:before,
.firetv-mode .control-bar:before,
.firetv-mode .categories-section:before,
.firetv-mode .update-buttons:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 1px solid rgba(100, 100, 100, 0.3);
  border-radius: 8px;
  pointer-events: none;
}

/* Miglioramenti per gruppi di elementi (come raccomandazioni) */
.firetv-mode .shows-scroll {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  padding: 10px 0;
}

    transition: width 0.3s ease;
}

#searchResult {
    margin-top: 20px;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.search-results-grid .show-card {
    width: 100%;
    margin: 0;
}

.search-results-grid .show-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.search-results-grid .show-card h3 {
    font-size: 0.9em;
    margin: 5px 0;
}

.search-results-grid .show-card p {
    font-size: 0.8em;
    margin: 2px 0;
}

.search-results-grid .watchlist-button {
    font-size: 0.8em;
    padding: 5px 10px;
}

#searchResult.ok {
    color: #4CAF50;
}

#searchResult.error {
    color: #f44336;
}
.header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 0;
    gap: 10px;
}

.nav-button, .back-button, .watchlist-button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-button:hover, .back-button:hover, .watchlist-button:hover {
    background-color: #45a049;
}

.timeframe-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeframe-selector select {
    padding: 5px;
    border-radius: 4px;
    background: #333;
    color: white;
    border: 1px solid #444;
}

.header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
}

.profile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.profile-container {
    max-width: 800px;
    margin: 2rem auto;
}

.help-container {
    max-width: 1000px;
    margin: 2rem auto;
    color: #fff;
}

.help-section {
    background: #222;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.help-section h2 {
    color: #4CAF50;
    margin-bottom: 15px;
}

.help-section h3 {
    color: #fff;
    margin: 20px 0 10px;
}

.help-section ul {
    list-style-type: none;
    padding-left: 20px;
}

.help-section ul li {
    margin: 10px 0;
    position: relative;
}

.help-section ul li:before {
    content: "•";
    color: #4CAF50;
    font-weight: bold;
    position: absolute;
    left: -15px;
}

.help-section p {
    line-height: 1.6;
    margin: 10px 0;
}

.friend-request-section {
    background: #333;
    padding: 20px;
    border-radius: 8px;
    margin:20px 0;
}

.friend-request-section form {
    display: flex;
    gap: 10px;
}

.friend-request-section input {
    flex: 1;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #555;
}

.pending-requests {
    background: #333;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
}

.request {
    background: #444;
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
}

.request p {
    margin: 0;
    flex: 1;
}

.request form {
    margin-left: 10px;
}

.request .load-more-button {
    padding: 8px 15px;
    font-size: 14px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.request .load-more-button:hover {
    background: #45a049;
}

.friends-watchlists {
    margin-top: 30px;
}

.friend-watchlist {
    background: #333;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

/* Unified Page Styling */
.unified-page {
    background: #141414;
    color: #fff;
min-height: 100vh;
}

.hero-section {
    position: relative;
    height: 10vh;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(20,20,20,0.7), #141414);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: absolute;
    bottom: 20%;
    left: 5%;
    z-index: 2;
}

.shows-scroll {    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
    margin-top: 20px;
}

.show-card {
    background: #1f1f1f;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

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

.show-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.show-info {
    padding: 15px;
}

.friend-watchlist h4 {
    margin-bottom: 15px;
    padding: 2rem;
    background: #1f1f1f;
    border-radius: 8px;
    color: #fff;
}

.profile-picture {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 2rem;
    display: block;
}

.profile-info {
    text-align: center;
}

.profile-info h2 {
    margin-bottom: 1rem;
    color: #333;
}

.friends-section {
    background: #333;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.friends-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.friend-item {
    background: #444;
    padding: 15px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remove-friend-btn {
    background: #ff4444;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.remove-friend-btn:hover {
    background: #cc0000;
}

.profile-info p {
    margin: 0.5rem 0;
    color: #666;
}

.logout-button {
    background-color: #e50914;
}

.logout-button:hover {
    background-color: #cc0812;
}

.test-button {
    background-color: #2196F3;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

.test-button:hover {
    background-color: #1976D2;
}

.watchlist-button {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
}

.action-buttons {
    display: flex;
    gap: 8px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.action-buttons .load-more-button {
    flex: 1;
    min-width: 80px;
    margin: 0;
    text-align: center;
    font-size: 0.9em;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .load-more-button {
        width: 100%;
    }
}

.dislike-button {
    background-color: #666;
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    flex: 1;
}

.dislike-button:hover {
    background-color: #555;
}

.remove-button {
    display: block;
    background-color: #e50914;
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    text-align: center;
    margin: 10px 0;
    font-size: 14px;
}

.remove-button:hover {
    background-color: #cc0812;
}

.genre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 5px 0;
}

.genre-tag {
    background-color: #2c3e50;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
}

/* Beta Test Watermark rimosso */

.recommendations {
    margin-top: 40px;
    padding: 20px;
    background: #1a1a1a;
    border-radius: 8px;
}

.recommendations h2 {
    color: #4CAF50;
}

.cta-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.2em;
    text-decoration: none;
    transform: translateY(0);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.cta-button:active {
    transform: scale(0.95);
}

.cta-button.primary,
.cta-button.secondary {
    background: #2196F3;
    color: white;
    min-width: 250px;
    justify-content: center;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.cta-button .icon {
    font-size: 1.4em;
}

.load-more-button {
    display: block;
    margin: 20px auto;
    padding: 15px 30px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2em;
    text-decoration: none;
    transform: translateY(0);
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.load-more-button:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
}

.load-more-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.no-more-recommendations {
    text-align: center;
    color: #888;
    padding: 20px;
    font-style: italic;
}

.loading-animation {
    display: none;
    text-align: center;
    padding: 20px;
}

.running-man {
    font-size: 40px;
    display: inline-block;
    animation: run 0.5s infinite steps(2);
}

@keyframes run {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}
.debug-section {
    margin: 20px 0;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

.debug-section h3 {
    margin-top: 0;
    color: #333;
}

.debug-section pre {
    background: #fff;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    max-height: 300px;
    border: 1px solid #ddd;
}
/* Tell Me Page & Recommendation Page Styles */
.tell-me-page,
.recommendation-page {
    background-color: #000000;
    min-height: 100vh;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
}

.hero-section {
    position: relative;
    height: 15vh;
    max-height: 300px;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 2;
    padding-top: 60px;
}

@media screen and (max-width: 768px) {
    .hero-content {
        bottom: 40px;
        padding-top: 80px;
    }

    .hero-content .button-group {
        margin-top: 30px;
    }
}

.hero-content h1 {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 16px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.button-group {
    display: flex;
    gap: 5px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.primary-button.small,
.secondary-button.small {
    padding: 6px 12px;
    font-size: 0.9em;
    min-width: 80px;
}

.shows-section {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.shows-section h2 {
    font-size: 24px;
    margin-bottom: 16px;
    color: #FFF;
}

.shows-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    padding-bottom: 16px;
}

@media (max-width: 768px) {
    .shows-scroll {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .hero-section {
        height: 15vh;
    }

    .hero-content h1 {
        font-size: 24px;
    }
}

.show-card {
    flex: 0 0 120px;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, opacity 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.show-card:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.show-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.show-card h3 {
    font-size: 16px;
    padding: 8px;
    margin: 0;
}

.show-card p {
    font-size: 12px;
    color: #B0B0B0;
    padding: 0 8px 8px;
    margin: 0;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    /* Fallback per browser che non supportano backdrop-filter */
    background: rgba(18, 18, 18, 0.9);
    /* Effetto liquid glass per browser moderni */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    height: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
}

.nav-item:active {
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.nav-item.active {
    color: #8ef5c0; /* lime-turchese Watchies */
}

.nav-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.nav-label {
    font-size: 12px;
}

.recommendation-container {
    transition: opacity 0.3s ease;
}

.key-elements {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.key-elements .shows-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    justify-content: center;
}

.key-elements .button-group {
    text-align: center;
    margin: 20px 0;
}

.show-description {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .show-description {
        grid-template-columns: 1fr;
    }

    .show-poster img {
        max-width: 100%;
        height: auto;
    }

    .key-elements .shows-scroll {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

.load-more-button {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background: #333333;
    color: #FFFFFF;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

.stat-segment.other {
    background-color: #808080;
}

.liked-shows-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.liked-shows-table th,
.liked-shows-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.liked-shows-table th {
    background: rgba(0, 0, 0, 0.2);
    font-weight: bold;
}

.liked-shows-table .genre-tag {
    display: inline-block;
    margin: 2px;
    padding: 2px 6px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.8em;
}

/* Responsive styles for all screen sizes */
@media screen and (max-width: 1200px) {
    .container {
        width: 95%;
        padding: 10px;
    }

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

@media screen and (max-width: 768px) {
    .shows-scroll {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .hero-section {
        height: 12vh;
    }

    .hero-content h1 {
        font-size: 22px;
    }

    .button-group {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 3px;
        margin-bottom: 5px;
    }

    .profile-container {
        padding: 10px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .show-card {
        min-width: unset;
    }
}

@media screen and (max-width: 480px) {
    .hero-section {
        min-height: 25vh !important;
        max-height: none !important;
        padding-bottom: 5px;
    }
    .hero-content h1 {
        font-size: 14px;
        margin-top: 0;
        margin-bottom: 3px;
    }

    .shows-scroll {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 5px;
        padding: 12px;
    }

    .show-card h3 {
        font-size: 0.7em;
        padding: 4px;
    }

    .show-card p {
        padding: 0 4px 4px;
        font-size: 0.65em;
    }

    .bottom-nav {
        padding: 5px 0;
        height: 45px;
    }

    .nav-icon {
        font-size: 18px;
    }

    .nav-label {
        font-size: 9px;
    }

    .rating-buttons {
        gap: 3px;
    }

    .thumb-button {
        width: 35px;
        height: 35px;
        font-size: 1.5em;
    }

    .friend-request-section form {
        flex-direction: column;
        gap: 5px;
    }

    .shows-section {
        padding: 10px;
    }

    .shows-section h2 {
        font-size: 16px;
        margin: 5px 0;
    }

    .action-buttons a {
        padding: 4px 8px;
        font-size: 0.8em;
    }

    .cache-stats-container {
        margin: 10px;
        padding: 8px;
        font-size: 0.8rem;
    }
}

/* Ensure buttons and interactive elements are touch-friendly on mobile */
@media (hover: none) and (pointer: coarse) {
    .cta-button,
    .load-more-button,
    .thumb-button,
    .action-buttons a {
        min-height: 28px;
        padding: 4px 8px;
        font-size: 0.8em;
    }

    .cta-button .icon {
        font-size: 1em;
    }

    .shows-scroll {
        -webkit-overflow-scrolling: touch;
    }
}

/* Specifiche ottimizzazioni per iPhone */
@media screen and (max-width: 414px) {
    .hero-section {
        min-height: 28vh !important;
    }

    .cta-button {
        min-width: auto;
        padding: 3px 6px;
        font-size: 0.75em;
    }

    .cta-button .icon {
        font-size: 0.9em;
    }

    .button-group.mood-selector {
        gap: 1px;
        margin: 0;
    }

    .hero-content h1 {
        font-size: 13px;
        margin: 2px 0;
    }
}
/* Start Here Page Styles */
.start-here-page .hero-section {
    min-height: 15vh;
    background: linear-gradient(45deg, #1a1a1a, #2d2d2d);
}

.group-selection {
    margin: 20px 0;
    text-align: center;
}

.group-size-select {
    padding: 10px 20px;
    font-size: 1.1em;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.show-selection {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
}

.platform-filters {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.show-input-group {
    margin: 10px 0;
    position: relative;
}

.show-search {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 1em;
}

.search-results {
    position: absolute;
    color: black;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.search-result {
    padding: 10px;
    cursor: pointer;
}

.search-result:hover {
    background: #f5f5f5;
}

.ai-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 20px;
    border-radius: 20px;
    z-index: 1000;
}

.status-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: green;
    transition: background-color 0.3s;
}

.status-text {
    color: white;
    font-size: 0.9em;
}

.recommendations-section {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Fire TV Specific Styles */
.firetv-mode {
    --tv-button-min-height: 60px;
    --tv-card-min-width: 200px;
    --tv-font-size-base: 1.4em;
    --tv-spacing: 25px;
    background: #141414;
    color: #ffffff;
    font-size: var(--tv-font-size-base);
}

.firetv-container {
    padding: var(--tv-spacing);
    max-width: 1800px;
    margin: 0 auto;
}

.firetv-mode .section {
    margin-bottom: 40px;
}

.firetv-mode .section-title {
    font-size: 1.8em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.firetv-mode .shows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--tv-card-min-width), 1fr));
    gap: var(--tv-spacing);
}

.firetv-mode .show-card {
    min-height: 300px;
    border-radius: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.firetv-mode .show-card:focus,
.firetv-mode .show-card.focused {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 162, 255, 0.8);
    outline: none;
}

.focus-indicator {
    position: absolute;
    border: 3px solid #00a2ff;
    border-radius: 10px;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 9999;
    display: none;
}

/* Focus visibile su Fire TV / Smart TV (tell_me e altre pagine) */
body.firetv .focus-indicator,
body.smart-tv-detected .focus-indicator {
    border: 3px solid #34C759;
}

/* Fire TV: ridimensionamento modali calendario e dettagli watchlist */
body.firetv #today-hub-calendar-modal .today-hub-calendar-dialog,
body.smart-tv-detected #today-hub-calendar-modal .today-hub-calendar-dialog {
    transform: scale(0.4);
    transform-origin: center center;
}
body.firetv #showDetailsModal .modal-dialog,
body.smart-tv-detected #showDetailsModal .modal-dialog {
    transform: scale(0.55);
    transform-origin: center center;
}

/* Fire TV: focus visibile sulle card del carousel tell_me */
body.firetv .carousel-card:focus,
body.firetv .carousel-card.focused,
body.smart-tv-detected .carousel-card:focus,
body.smart-tv-detected .carousel-card.focused {
    transform: scale(1.1) !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4) !important;
    outline: none !important;
    z-index: 10 !important;
}

.firetv-mode button,
.firetv-mode .action-button {
    min-height: var(--tv-button-min-height);
    font-size: 1.2em;
    padding: 15px 30px;
    border-radius: 10px;
    cursor: pointer;
}
    
    /* Aumenta la leggibilità generale su schermi TV */
    font-size: var(--tv-font-size-base);
    line-height: 1.5;
}

.firetv-mode .show-card {
    min-width: var(--tv-card-min-width);
    min-height: 320px;
    margin: var(--tv-spacing);
    transition: transform 0.2s ease;
}

.firetv-mode .nav-item {
    min-height: var(--tv-button-min-height);
    padding: 12px 15px;
}

.firetv-mode .bottom-nav {
    height: auto;
    padding: 15px 0;
}

.firetv-mode .load-more-button,
.firetv-mode .cta-button,
.firetv-mode button,
.firetv-mode .action-buttons a {
    min-height: var(--tv-button-min-height);
    min-width: 120px;
    font-size: 1.1em;
    padding: 15px 25px;
    margin: 10px;
}

.firetv-mode .nav-icon {
    font-size: 32px;
}

.firetv-mode .nav-label {
    font-size: 16px;
    margin-top: 8px;
}

/* Stile per elemento con focus su Fire TV */
.firetv-focus {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 162, 255, 0.8);
    z-index: 10;
    outline: none;
}

/* Aumenta contrasto per migliorare leggibilità su TV */
.firetv-mode {
    --text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.firetv-mode h1, 
.firetv-mode h2, 
.firetv-mode h3 {
    text-shadow: var(--text-shadow);
}

.firetv-mode .show-card h3 {
    font-size: 1.1em;
    padding: 8px;
}

.firetv-mode .show-overview {
    font-size: 1em;
    max-height: 120px;
}

/* Indicatore scorrimento per mostrare che c'è più contenuto */
.firetv-mode .shows-scroll:after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 50px;
    background: linear-gradient(to right, rgba(20, 20, 20, 0), rgba(20, 20, 20, 0.8));
    pointer-events: none;
}

/* End of file */
.login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
}

.login-box {
    background: #222;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.login-button {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s ease;
}

.login-button img {
    width: 24px;
    height: 24px;
    margin-right: 1rem;
}

.login-button.google {
    background: #fff;
    color: #444;
}



.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.error-message {
    color: #ff4444;
    background-color: rgba(255, 68, 68, 0.1);
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    text-align: center;
}
/* Stili per semaforo e barra di progresso */
.traffic-light {
    padding: 8px 16px;
    border-radius: 20px;
    background-color: #ff9800;
    color: white;
    font-weight: bold;
    text-align: center;
    margin: 10px auto;
    max-width: 200px;
    position: relative;
    animation: pulse 1.5s infinite;
}

.traffic-light.active {
    background-color: #ff9800;
}

.traffic-light.green {
    background-color: #4CAF50;
    animation: none;
}

.traffic-light.red {
    background-color: #f44336;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.progress-container {
    margin: 10px auto;
    text-align: center;
}

.progress-percentage {
    font-size: 14px;
    margin-bottom: 5px;
    font-weight: bold;
}

.progress-bar {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background-color: #4CAF50;
    width: 0%;
    transition: width 0.3s ease;
}

/* Stili per pulsanti */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    margin: 2px;
    gap: 4px;
}

.cta-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.user-id-display {
    background-color: rgba(0, 0, 0, 0.6);
    color: #FFF;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    margin: 5px auto;
    display: inline-block;
}

.user-id-display::before {
    content: "🆔 ";
}

.rating-badge, .similarity-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    white-space: nowrap;
}

.rating-badge {
    background-color: #f5c518;
    color: #000;
}

.similarity-badge {
    background-color: #4CAF50;
    color: white;
}

.rating-badge i, .similarity-badge i {
    margin-right: 4px;
    font-size: 0.7rem;
}

.recommendation-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 10px 0;
}

.recommendation-section .watchlist-button,
.recommendation-section .dislike-button {
    padding: 8px 16px;
    font-size: 14px;
}

.round-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.4em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.round-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.round-button.danger {
    background-color: #f44336;
}

.recommendations-section {
    margin-top: 30px;
    padding: 20px;
    background: rgba(34, 34, 34, 0.7);
    border-radius: 8px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.progress-container {
    width: 80%;
    margin: 15px auto;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #333;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #3498db;
    transition: width 0.3s ease;
}

.traffic-light {
    padding: 8px 16px;
    border-radius: 20px;
    background-color: #ff9800;
    color: white;
    font-weight: bold;
    text-align: center;
    margin: 10px auto;
    max-width: 200px;
    position: relative;
    animation: pulse 1.5s infinite;
}

.traffic-light.active {
    background-color: #ff9800;
}

.traffic-light.green {
    background-color: #4CAF50;
    animation: none;
}

.traffic-light.red {
    background-color: #f44336;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.progress-container {
    margin: 10px auto;
    text-align: center;
}

.progress-percentage {
    font-size: 14px;
    margin-bottom: 5px;
    font-weight: bold;
}

.progress-bar {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background-color: #4CAF50;
    width: 0%;
    transition: width 0.3s ease;
}

/* Stili per pulsanti */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    margin: 2px;
    gap: 4px;
}

.cta-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.user-id-display {
    background-color: rgba(0, 0, 0, 0.6);
    color: #FFF;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    margin: 5px auto;
    display: inline-block;
}

.user-id-display::before {
    content: "🆔 ";
}

.rating-badge, .similarity-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    white-space: nowrap;
}

.rating-badge {
    background-color: #f5c518;
    color: #000;
}

.similarity-badge {
    background-color: #4CAF50;
    color: white;
}

.rating-badge i, .similarity-badge i {
    margin-right: 4px;
    font-size: 0.7rem;
}

/* Search section styles for watchlist */
.search-section {
    margin: 15px 0;
}

.search-form {
    display: flex;
    width: 100%;
    position: relative;
}

.search-form input {
    flex: 1;
    padding: 12px 15px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 25px;
    background-color: #f8f8f8;
    transition: all 0.3s ease;
}

.search-form input:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(0, 162, 255, 0.5);
    background-color: #fff;
}

.search-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #00a2ff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background-color: #0080cc;
}

.login-option.amazon {
    background-color: #FF9900;
    color: #000;
}

.login-option.amazon:hover {
    background-color: #e68a00;
}

.login-option.device {
    background-color: #232F3E;
    color: white;
    margin-top: 15px;
}

.login-option.device:hover {
    background-color: #37475A;
}

.device-login-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    text-align: center;
}

.device-login-section h2 {
    font-size: 22px;
    margin-bottom: 10px;
}

.device-login-section p {
    color: #555;
    margin-bottom: 20px;
}

.platform-section {
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.platform-section h2 {
    color: #fff;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.platform-section h2 i {
    font-size: 1.5rem;
}

.platform-section .shows-container {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: #666 transparent;
}

.platform-section .shows-container::-webkit-scrollbar {
    height: 8px;
}

.platform-section .shows-container::-webkit-scrollbar-track {
    background: transparent;
}

.platform-section .shows-container::-webkit-scrollbar-thumb {
    background-color: #666;
    border-radius: 4px;
}

.platform-section .shows-container::-webkit-scrollbar-thumb:hover {
    background-color: #888;
}

.platform-section .show-card {
    flex: 0 0 300px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0;
}

/* Mobile-specific overrides */
@media only screen and (max-width: 768px) {
  body.firetv {
    /* Override FireTV styles on mobile */
    zoom: initial !important;
    -webkit-text-size-adjust: 100% !important;
    transform: none !important;
    font-size: 16px !important;
  }

  .show-card {
    min-width: 140px !important;
    max-width: 45% !important;
    margin: 5px !important;
  }

  .container {
    padding: 10px !important;
    max-width: 100% !important;
  }

  /* Reset any FireTV specific navigation styles */
  #focus-indicator {
    display: none !important;
  }

  .firetv-mode-indicator {
    display: none !important;
  }

  /* Ensure proper touch targets on mobile */
  button, 
  a, 
  input, 
  select {
    min-height: 44px !important;
    min-width: 44px !important;
    padding: 12px !important;
  }
}

/* Ensure proper scaling on iOS devices */
@supports (-webkit-touch-callout: none) {
  body {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
  }
  
  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: env(safe-area-inset-left) !important;
    padding-right: env(safe-area-inset-right) !important;
  }
}

/* Unified card and button styles for tell_me and watchlistnew pages */
.tell-me-page .show-card,
.watchlistnew-page .show-card {
    min-width: 120px !important;
    max-width: 160px !important;
    margin: 5px !important;
    background: rgba(30, 30, 30, 0.7);
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}

.tell-me-page .show-card h3,
.watchlistnew-page .show-card h3 {
    font-size: 1em !important;
    margin: 10px !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    -webkit-line-clamp: initial !important;
    -webkit-box-orient: initial !important;
    word-wrap: normal !important;
}

.tell-me-page .show-card p,
.watchlistnew-page .show-card p {
    font-size: 0.7em !important;
    margin: 2px 4px 4px !important;
    padding: 0 2px !important;
    line-height: 1.2 !important;
    max-height: 2.4em !important;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tell-me-page .show-card img,
.watchlistnew-page .show-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    flex-shrink: 0;
}

/* Mobile-specific adjustments */
@media screen and (max-width: 768px) {
    .tell-me-page .show-card,
    .watchlistnew-page .show-card {
        min-width: 110px !important;
        max-width: 140px !important;
    }

    .tell-me-page .show-card h3,
    .watchlistnew-page .show-card h3 {
        font-size: 0.9em !important;
        margin: 8px !important;
    }

    .tell-me-page .show-card p,
    .watchlistnew-page .show-card p {
        font-size: 0.65em !important;
        margin: 1px 3px 3px !important;
        max-height: 2.4em !important;
    }
}

/* iPhone-specific adjustments */
@media screen and (max-width: 414px) {
    .tell-me-page .show-card,
    .watchlistnew-page .show-card {
        min-width: 100px !important;
        max-width: 130px !important;
    }

    .tell-me-page .show-card h3,
    .watchlistnew-page .show-card h3 {
        font-size: 0.8em !important;
        margin: 6px !important;
    }

    .tell-me-page .show-card p,
    .watchlistnew-page .show-card p {
        font-size: 0.6em !important;
        margin: 1px 2px 2px !important;
        line-height: 1.15 !important;
    }
}

/* Beta Test Watermark rimosso */

.login-logout-button {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1001;
}

.tell-me-page .show-card h3,
.watchlistnew-page .show-card h3 {
    font-size: 1em !important;
    margin: 10px !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    -webkit-line-clamp: initial !important;
    -webkit-box-orient: initial !important;
    word-wrap: normal !important;
}

@media screen and (max-width: 768px) {
    .tell-me-page .show-card h3,
    .watchlistnew-page .show-card h3 {
        font-size: 0.9em !important;
        margin: 8px !important;
    }
}

@media screen and (max-width: 414px) {
    .tell-me-page .show-card h3,
    .watchlistnew-page .show-card h3 {
        font-size: 0.8em !important;
        margin: 6px !important;
    }
}

.tell-me-page .show-card h3 {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    display: block;
    font-size: 1em;
    color: #fff;
    margin: 10px 0 0 0;
    padding: 0 8px;
    min-height: 2.2em;
    line-height: 1.2;
}

.serienuove-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 20px;
    margin: 0 auto;
    justify-items: center;
}

.serienuove-grid .show-card {
    position: relative;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 180px;
    max-width: 220px;
    height: 340px;
    margin: 0 auto;
    transition: transform 0.3s;
}

.serienuove-grid .show-card:hover {
    transform: scale(1.05);
}

.serienuove-grid .poster-container {
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
    flex-shrink: 0;
}

.serienuove-grid .show-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    display: block;
}

.serienuove-grid .show-info {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    justify-content: flex-start;
    align-items: center;
    padding: 0 8px;
    min-height: 0;
}

.serienuove-grid .show-title {
    margin: 8px 0 0 0;
    font-size: 1em;
    color: #fff;
    text-align: center;
    font-weight: 600;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    min-height: 2.2em;
    line-height: 1.2;
    word-break: break-word;
    width: 100%;
    display: block;
}

.serienuove-grid .release-date {
    margin: 0 0 6px 0;
    color: #999;
    font-size: 0.9em;
    text-align: center;
}

.serienuove-grid .action-buttons {
    margin-top: auto;
    padding-bottom: 10px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

@media (max-width: 768px) {
    .serienuove-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
        padding: 10px;
    }
    .serienuove-grid .show-card {
        min-width: 140px;
        max-width: 180px;
        height: 260px;
    }
    .serienuove-grid .show-title {
        font-size: 0.95em;
    }
}

.ranked-show-card {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    background: #1a1a1a;
    width: 180px;
    height: 320px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin: 0 auto;
}
.ranked-show-card:hover {
    transform: scale(1.05);
}
.poster-container {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}
.ranked-show-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    display: block;
}
.show-title {
    margin: 8px 0 0 0;
    font-size: 1em;
    color: #fff;
    text-align: center;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    display: block;
}
.release-date {
    margin: 0 0 6px 0;
    color: #999;
    font-size: 0.9em;
    text-align: center;
}
.action-buttons {
    margin-top: auto;
    padding-bottom: 10px;
    display: flex;
    gap: 10px;
    justify-content: center;
}
.serienuove-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 20px;
    margin: 0 auto;
    justify-items: center;
}
@media (max-width: 768px) {
    .ranked-show-card {
        width: 140px;
        height: 220px;
    }
    .poster-container {
        height: 160px;
    }
    .show-title {
        font-size: 0.95em;
    }
    .serienuove-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
        padding: 10px;
    }
}

.tell-me-page .serienuove-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 20px;
    margin: 0 auto;
    justify-items: center;
}
.tell-me-page .show-card {
    position: relative;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 180px;
    max-width: 220px;
    height: 340px;
    margin: 0 auto;
    transition: transform 0.3s;
}
.tell-me-page .show-card:hover {
    transform: scale(1.05);
}
.tell-me-page .poster-container {
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
    flex-shrink: 0;
}
.tell-me-page .show-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    display: block;
}
.tell-me-page .show-title {
    margin: 8px 0 0 0;
    font-size: 1em;
    color: #fff;
    text-align: center;
    font-weight: 600;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    min-height: 2.2em;
    line-height: 1.2;
    word-break: break-word;
    width: 100%;
    display: block;
}
.tell-me-page .release-date {
    margin: 0 0 6px 0;
    color: #999;
    font-size: 0.9em;
    text-align: center;
}
@media (max-width: 768px) {
    .tell-me-page .serienuove-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
        padding: 10px;
    }
    .tell-me-page .show-card {
        min-width: 140px;
        max-width: 180px;
        height: 260px;
    }
    .tell-me-page .show-title {
        font-size: 0.95em;
    }
}

.tell-me-page .show-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 8px 0 8px;
    flex: 1 1 auto;
    min-height: 0;
}
.tell-me-page .action-buttons {
    margin-top: auto;
    padding-bottom: 10px;
    display: flex;
    gap: 10px;
    justify-content: center;
}