/**
 * Similar Movie Finder CSS
 * Movifox Child Theme
 * TasteDive API ile benzer film bulucu sayfası stilleri
 */

/* ===== SEARCH BOX ===== */
.similar-finder-search-wrap {
    background: linear-gradient(135deg, #242830 0%, #1a1d24 100%);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 169, 0, 0.1);
}

.similar-finder-search-inner {
    display: flex;
    align-items: center;
    background: linear-gradient(to bottom, #2e2f32, #323336 100%);
    border-radius: 50px;
    padding: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.similar-finder-search-inner:focus-within {
    border-color: rgba(255, 169, 0, 0.4);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(255, 169, 0, 0.1);
}

.similar-finder-icon {
    padding: 0 15px;
    color: #FFA900;
    font-size: 20px;
    display: flex;
    align-items: center;
}

.similar-finder-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 16px;
    font-family: 'Source Sans Pro', arial, helvetica, sans-serif;
    padding: 12px 0;
}

.similar-finder-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.similar-finder-btn {
    background: #eaad2c;
    border: none;
    border-radius: 50px;
    color: #000;
    font-weight: 700;
    font-size: 15px;
    padding: 14px 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    text-shadow: none;
}

.similar-finder-btn:hover {
    background: #f5bc3d;
    transform: translateY(-2px);
}

.similar-finder-btn:active {
    transform: translateY(0);
}

.similar-finder-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.similar-finder-btn .btn-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.similar-finder-hint {
    margin-top: 15px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.similar-finder-hint i {
    color: #FFA900;
}

/* ===== AUTOCOMPLETE DROPDOWN ===== */
.similar-finder-search-wrap {
    position: relative;
    z-index: 9999;
}

.similar-finder-search-inner {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #242830;
    border-radius: 12px;
    margin-top: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 99999;
    max-height: 400px;
    overflow-y: auto;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: rgba(255, 169, 0, 0.1);
}

.autocomplete-item:first-child {
    border-radius: 12px 12px 0 0;
}

.autocomplete-item:last-child {
    border-radius: 0 0 12px 12px;
}

.autocomplete-item:only-child {
    border-radius: 12px;
}

.autocomplete-poster {
    width: 45px;
    height: 65px;
    flex-shrink: 0;
    background: #1a1d24;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.autocomplete-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.autocomplete-poster i {
    color: rgba(255, 255, 255, 0.2);
    font-size: 20px;
}

.autocomplete-info {
    flex: 1;
    min-width: 0;
}

.autocomplete-title {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-year {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

/* ===== SEARCHED MOVIE INFO ===== */
.similar-finder-searched {
    background: linear-gradient(135deg, rgba(255, 169, 0, 0.15) 0%, rgba(255, 169, 0, 0.05) 100%);
    border: 1px solid rgba(255, 169, 0, 0.3);
    border-radius: 10px;
    padding: 20px 25px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.searched-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.searched-movie-name {
    color: #FFA900;
    font-size: 18px;
    font-weight: 700;
}

/* ===== LOADING STATE ===== */
.similar-finder-loading {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.spinner-ring {
    width: 12px;
    height: 12px;
    background: #FFA900;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

.spinner-ring:nth-child(2) {
    animation-delay: 0.2s;
}

.spinner-ring:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.loading-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}

/* ===== ERROR STATE ===== */
.similar-finder-error {
    text-align: center;
    padding: 50px 20px;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 12px;
    margin-bottom: 25px;
}

.error-icon {
    font-size: 48px;
    color: #dc2626;
    margin-bottom: 15px;
}

.error-message {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    margin-bottom: 20px;
}

.error-retry-btn {
    background: rgba(220, 38, 38, 0.8);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.error-retry-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* ===== EMPTY STATE ===== */
.similar-finder-empty {
    text-align: center;
    padding: 60px 20px;
    background: #242830;
    border-radius: 12px;
    margin-bottom: 25px;
}

.empty-icon {
    font-size: 64px;
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
}

.empty-message {
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    margin-bottom: 10px;
}

.empty-suggestion {
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
}

/* ===== RESULTS SECTION ===== */
.similar-finder-results .results-header {
    margin-bottom: 25px;
}

.similar-finder-results .results-header h3 {
    display: block;
    color: #fff;
    font-weight: 500;
    letter-spacing: -0.4px;
    line-height: 22px;
    border-left: 4px solid #FFA900;
    padding-left: 10px;
    padding-top: 2px;
    font-size: 16px;
}

.similar-finder-results .results-count {
    color: #FFA900;
    font-weight: 700;
}

/* ===== MOVIES GRID ===== */
.similar-movies-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 25px;
}

/* ===== MOVIE CARD ===== */
.similar-movie-card {
    background: #242830;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.similar-movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.similar-movie-card:hover .movie-card-title {
    color: #FFA900;
}

.similar-movie-card .movie-card-poster {
    position: relative;
    padding-bottom: 150%;
    background: #1a1d24;
    overflow: hidden;
}

.similar-movie-card .movie-card-poster img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.similar-movie-card:hover .movie-card-poster img {
    transform: scale(1.05);
}

.similar-movie-card .movie-card-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2a2e36 0%, #1a1d24 100%);
    color: rgba(255, 255, 255, 0.3);
}

.similar-movie-card .movie-card-placeholder i {
    font-size: 48px;
    margin-bottom: 10px;
}

.similar-movie-card .movie-card-placeholder span {
    font-size: 12px;
    text-align: center;
    padding: 0 10px;
}

/* Poster loading spinner */
.similar-movie-card .poster-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.similar-movie-card .poster-loading i {
    font-size: 32px;
    color: #FFA900;
    animation: spin 1s linear infinite;
    margin-bottom: 0;
}

/* TMDB Poster Image */
.similar-movie-card .movie-poster-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.similar-movie-card .movie-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    padding: 40px 12px 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.similar-movie-card:hover .movie-card-overlay {
    opacity: 1;
}

.movie-card-youtube {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ff0000;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.movie-card-youtube:hover {
    background: #cc0000;
    text-decoration: none;
    color: #fff;
}

.movie-card-youtube i {
    font-size: 14px;
}

.similar-movie-card .movie-card-info {
    padding: 15px;
}

.similar-movie-card .movie-card-title {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
    min-height: 40px;
}

.similar-movie-card .movie-card-type {
    display: inline-block;
    background: rgba(255, 169, 0, 0.15);
    color: #FFA900;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.similar-movie-card .movie-card-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    line-height: 1.6;
    margin-top: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== RESPONSIVE - TABLET ===== */
@media (max-width: 1200px) {
    .similar-movies-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .similar-movies-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }

    .similar-finder-search-wrap {
        padding: 25px;
    }
}

/* ===== RESPONSIVE - MOBILE ===== */
@media (max-width: 768px) {
    .similar-movies-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .similar-finder-search-wrap {
        padding: 20px;
        border-radius: 10px;
    }

    .similar-finder-search-inner {
        flex-direction: column;
        border-radius: 12px;
        padding: 15px;
        gap: 12px;
    }

    .similar-finder-icon {
        display: none;
    }

    .similar-finder-input {
        width: 100%;
        text-align: center;
        font-size: 16px;
        padding: 10px;
    }

    .similar-finder-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }

    .similar-finder-searched {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        padding: 15px;
    }

    .searched-movie-name {
        font-size: 16px;
    }

    .similar-movie-card .movie-card-info {
        padding: 12px;
    }

    .similar-movie-card .movie-card-title {
        font-size: 13px;
        min-height: 36px;
    }

    .similar-movie-card .movie-card-desc {
        display: none;
    }

    .similar-movie-card .movie-card-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    }
}

@media (max-width: 480px) {
    .similar-movies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .similar-finder-search-wrap {
        padding: 15px;
        margin-bottom: 20px;
    }

    .similar-finder-btn {
        font-size: 14px;
        padding: 12px 16px;
    }

    .similar-finder-input {
        font-size: 15px;
    }

    .similar-finder-hint {
        font-size: 12px;
    }

    .similar-movie-card .movie-card-title {
        font-size: 12px;
        min-height: auto;
        -webkit-line-clamp: 1;
    }

    .similar-movie-card .movie-card-type {
        font-size: 10px;
        padding: 3px 8px;
    }

    .loading-text {
        font-size: 14px;
    }

    .empty-icon {
        font-size: 48px;
    }

    .empty-message {
        font-size: 16px;
    }
}

/* ===== ANIMATIONS ===== */
.similar-movie-card {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.similar-movie-card:nth-child(1) {
    animation-delay: 0.05s;
}

.similar-movie-card:nth-child(2) {
    animation-delay: 0.1s;
}

.similar-movie-card:nth-child(3) {
    animation-delay: 0.15s;
}

.similar-movie-card:nth-child(4) {
    animation-delay: 0.2s;
}

.similar-movie-card:nth-child(5) {
    animation-delay: 0.25s;
}

.similar-movie-card:nth-child(6) {
    animation-delay: 0.3s;
}

.similar-movie-card:nth-child(7) {
    animation-delay: 0.35s;
}

.similar-movie-card:nth-child(8) {
    animation-delay: 0.4s;
}

.similar-movie-card:nth-child(9) {
    animation-delay: 0.45s;
}

.similar-movie-card:nth-child(10) {
    animation-delay: 0.5s;
}

.similar-movie-card:nth-child(n+11) {
    animation-delay: 0.55s;
}