/* ===== HARUBY FILMSUCHE PLUGIN ===== */

.haruby-filmsuche-wrapper {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    width: 100%;
    padding: 2rem 1rem;
    text-align: center;
    box-sizing: border-box;
}

/* SUCHFELD */
#haruby-searchForm {
    max-width: 580px;
    margin: 0 auto 1.5rem;
}

#haruby-searchInput {
    width: 100%;
    padding: 0.9em 1.3em;
    font-size: 1.05em;
    border-radius: 50px;
    border: 2px solid #7e22ce;
    outline: none;
    background: #fff;
    color: #222;
    box-shadow: 0 4px 15px rgba(126, 34, 206, 0.15);
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

#haruby-searchInput:focus {
    border-color: #ff3b3b;
    box-shadow: 0 4px 20px rgba(255, 59, 59, 0.25);
}

/* TYP-BUTTONS */
#haruby-typeButtons {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.haruby-type-btn {
    padding: 0.65em 1.8em;
    border-radius: 50px;
    border: 2px solid #7e22ce;
    cursor: pointer;
    font-weight: bold;
    background: transparent;
    color: #7e22ce;
    transition: all 0.25s;
    font-size: 0.95em;
}

.haruby-type-btn.active {
    background: linear-gradient(135deg, #1e3c72, #7e22ce);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0 18px rgba(126, 34, 206, 0.45);
    transform: scale(1.05);
}

.haruby-type-btn:hover:not(.active) {
    background: rgba(126, 34, 206, 0.1);
}

/* ERGEBNISSE GRID */
#haruby-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.4rem;
    margin-top: 2rem;
}

.haruby-movie {
    text-align: center;
    transition: transform 0.2s;
}

.haruby-movie:hover {
    transform: translateY(-4px);
}

.haruby-movie img {
    width: 100%;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: box-shadow 0.25s;
    display: block;
}

.haruby-movie img:hover {
    box-shadow: 0 8px 25px rgba(255, 59, 59, 0.4);
}

.haruby-play-hint {
    font-size: 0.75em;
    color: #888;
    margin-top: 0.25rem;
    display: block;
}

.haruby-movie-title {
    margin-top: 0.5rem;
    font-weight: bold;
    font-size: 0.9em;
    color: #222;
    line-height: 1.3;
}

.haruby-movie-year {
    font-size: 0.82em;
    color: #888;
    margin-top: 0.15rem;
}

.haruby-details-btn {
    margin-top: 0.5rem;
    display: inline-block;
    padding: 0.4em 1em;
    border-radius: 20px;
    background: linear-gradient(135deg, #ff3b3b, #c0392b);
    color: #fff !important;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.82em;
    transition: opacity 0.2s;
}

.haruby-details-btn:hover {
    opacity: 0.85;
    text-decoration: none;
}

/* LEER-NACHRICHT */
.haruby-no-results {
    grid-column: 1 / -1;
    color: #888;
    font-size: 1.05em;
    padding: 2rem;
}

/* ===== LIGHTBOX POPUP ===== */

.haruby-popup {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    justify-content: center;
    align-items: center;
    z-index: 99999;
    padding: 1rem;
}

.haruby-popup.open {
    display: flex;
}

.haruby-popup-content {
    width: 100%;
    max-width: 900px;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
    animation: harubyFadeIn 0.25s ease;
}

@keyframes harubyFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

#haruby-closeBtn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    background: #ff4444;
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#haruby-closeBtn:hover {
    background: #cc0000;
}

.haruby-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    background: #000;
}

.haruby-video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* SPRACHE SWITCH */
.haruby-lang-switch {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    background: #111;
}

.haruby-lang-btn {
    padding: 0.45em 1.3em;
    border-radius: 25px;
    border: 2px solid #fff;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9em;
    transition: all 0.2s;
}

.haruby-lang-btn.active,
.haruby-lang-btn:hover {
    background: #fff;
    color: #000;
}

/* LOADING SPINNER */
.haruby-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #7e22ce;
    font-size: 1.1em;
}

.haruby-spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid rgba(126,34,206,0.2);
    border-top-color: #7e22ce;
    border-radius: 50%;
    animation: haruby-spin 0.7s linear infinite;
    margin-bottom: 0.5rem;
}

@keyframes haruby-spin {
    to { transform: rotate(360deg); }
}

/* RESPONSIVE */
@media (max-width: 480px) {
    #haruby-results {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 1rem;
    }
    .haruby-movie-title {
        font-size: 0.8em;
    }
}
