﻿@keyframes fadeUp { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
* { margin:0; padding:0; box-sizing:border-box; }
::-webkit-scrollbar { width:10px; }
::-webkit-scrollbar-track { background:#080c16; }
::-webkit-scrollbar-thumb { background:#555; border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:#777; }
body {
    font-family:'Segoe UI',Tahoma,Geneva,Verdana,sans-serif;
    background:#080c16; min-height:100vh; color:#d0d4e0;
    overflow-x:hidden;
}
#particles {
    position:fixed; top:0; left:0; width:100%; height:100%; z-index:0;
    pointer-events:none;
}
.container { max-width:2000px; margin:0 auto; position:relative; z-index:1; padding:10px; }

.header-search {
    padding:6px 10px; margin-bottom:6px;
    display:flex; flex-wrap:wrap; gap:8px; align-items:center;
}
.header-search h1 {
    margin:0; color:#26c6da; font-size:1.1em; font-weight:600;
    white-space:nowrap;
}
.header-search p { display:none; }
.search-box {
    display:flex; gap:6px; align-items:center;
    width:40%; min-width:200px; margin:0 auto;
}
.search-container {
    display:flex; gap:6px; align-items:center; flex:1; min-width:200px;
}
select, input[type="text"], input[type="search"] {
    padding:3px 6px; border:1px solid rgba(38,198,218,0.2); border-radius:4px;
    font-size:0.8em; background:rgba(12,18,30,0.8); color:#26c6da;
    outline:none; caret-color:#d0d4e0;
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
    -webkit-text-fill-color:#26c6da !important;
    -webkit-box-shadow:0 0 0 30px #0c121e inset !important;
    caret-color:#d0d4e0 !important;
}
select:focus, input[type="text"]:focus { border-color:#26c6da; }
select { min-width:80px; background:rgba(12,18,30,0.8); }
input[type="text"] { flex:1; }
input[type="text"]::placeholder { color:rgba(255,255,255,0.2); }
.header-search button {
    padding:3px 8px; background:linear-gradient(135deg,#1a8a9e,#26c6da);
    color:#080c16; border:none; border-radius:4px; cursor:pointer;
    font-size:0.75em; font-weight:600; transition:transform 0.2s,box-shadow 0.2s;
    display:flex; align-items:center; gap:3px; white-space:nowrap;
}
.header-search button:hover {
    transform:translateY(-1px); box-shadow:0 3px 10px rgba(38,198,218,0.3);
}

#clock { font-size:0.7em; color:#26c6da; font-weight:600; white-space:nowrap; letter-spacing:0.3px; opacity:0.7; }

#results {
    display:grid; grid-template-columns:repeat(8,1fr); gap:8px;
    width:100%; margin-top:5px;
}
@media (max-width:1400px) { #results { grid-template-columns:repeat(7,1fr); } }
@media (max-width:1200px) { #results { grid-template-columns:repeat(6,1fr); } }
@media (max-width:1024px) { #results { grid-template-columns:repeat(4,1fr); } }
@media (max-width:768px) {
    .header-search { flex-direction:column; align-items:stretch; }
    .search-container { flex-direction:column; }
    select, input[type="text"], .header-search button { width:100%; }
    #results { grid-template-columns:repeat(3,1fr); }
}
@media (max-width:480px) { #results { grid-template-columns:repeat(2,1fr); } }

.result-card {
    background:rgba(12,18,30,0.7); backdrop-filter:blur(4px);
    border-radius:4px; overflow:hidden;
    box-shadow:0 1px 4px rgba(0,0,0,0.25);
    transition:all 0.2s ease; cursor:pointer; display:flex; flex-direction:column;
    border-left:2px solid rgba(38,198,218,0.1);
    animation:fadeUp 0.35s ease backwards;
}
.result-card:hover {
    transform:translateY(-1px);
    box-shadow:0 3px 10px rgba(38,198,218,0.08);
    background:rgba(15,22,36,0.8); border-left-color:rgba(38,198,218,0.3);
}
.result-card:active { transform:scale(0.97); }
.result-card img {
    width:100%; aspect-ratio:2/3; object-fit:cover;
    background-color:rgba(12,18,30,0.5);
    border-bottom:1px solid rgba(38,198,218,0.05);
}
.result-info { padding:6px 8px; display:flex; flex-direction:column; flex-grow:1; }
.result-info h3 {
    margin:0 0 2px 0; font-size:0.85em; font-weight:600; color:#ffab1a;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.result-info p {
    margin:0; color:rgba(176,190,197,0.5); font-size:0.65em;
}

.status-message {
    text-align:center; width:100%; grid-column:1/-1;
    color:rgba(255,255,255,0.4); font-size:0.9em; margin-top:20px;
}
.error { color:#ff6b6b; font-weight:600; }

#infoPanel {
    position:fixed; top:0; right:-100%; width:100%; height:100vh;
    background:rgba(8,12,22,0.98);
    z-index:2000; overflow-y:auto;
    box-shadow:-10px 0 30px rgba(0,0,0,0.8);
    box-sizing:border-box;
}
.panel-content {
    margin:0 auto; position:relative;
    background:rgba(13,20,32,0.6); backdrop-filter:blur(6px);
    overflow:hidden; min-height:100vh; color:#d0d4e0;
}

/* Backdrop hero */
.panel-backdrop {
    width:100%; height:250px;
    background-size:cover; background-position:center 20%;
    position:relative;
}
.panel-backdrop::after {
    content:''; position:absolute; bottom:0; left:0; right:0;
    height:70%;
    background:linear-gradient(transparent, rgba(8,12,22,1));
}

/* Close button */
.close-btn {
    position:absolute; top:15px; right:20px;
    color:rgba(176,190,197,0.6); font-size:28px; cursor:pointer;
    transition:color 0.2s,transform 0.2s; z-index:5;
    background:rgba(0,0,0,0.4); border:1px solid rgba(255,255,255,0.15);
    border-radius:4px; padding:2px 8px; line-height:1;
}
.close-btn:hover { color:#ff6b6b; transform:scale(1.1); }

/* Hero area: poster + info + right panel overlapping backdrop */
.panel-hero {
    display:flex; gap:25px; padding:0 20px;
    margin-top:-14rem; position:relative; z-index:2;
    align-items:flex-end;
}

.panel-poster {
    width:200px; min-width:200px; border-radius:8px;
    box-shadow:0 8px 25px rgba(0,0,0,0.7);
    flex-shrink:0; border:2px solid rgba(38,198,218,0.12);
    aspect-ratio:2/3; object-fit:cover;
}
.panel-hero-info {
    flex:1; padding-bottom:10px;
}
.panel-hero-info h2 {
    color:#ffab1a; font-size:2rem;
    margin-bottom:8px; font-weight:600; line-height:1.2;
}
.panel-hero-info .panel-meta {
    color:#b0bec5; font-size:0.9em; margin-bottom:12px;
}
.panel-hero-info .panel-meta span { margin-right:18px; white-space:nowrap; }
.panel-hero-info .panel-meta i { margin-right:4px; }
.panel-rating {
    display:inline-flex; align-items:center; gap:5px;
    background:rgba(38,198,218,0.12);
    padding:3px 10px; border-radius:15px;
    font-size:0.85em; color:#26c6da; font-weight:600;
}

/* Right panel inside hero */
.panel-hero .panel-body-right {
    width:35rem; min-width:220px; color:#b0bec5;
}

/* Body content below hero */
.panel-body {
    padding:20px 40px 40px;
}
.panel-body-left { min-width:0; }
.panel-section {
    margin-bottom:25px;
}
.panel-section h3 {
    color:#26c6da; font-size:1.1em; margin-bottom:8px;
    font-weight:600; display:flex; align-items:center; gap:8px;
}
.panel-section p {
    color:#b0bec5; line-height:1.7; font-size:0.9em;
}
.panel-section strong { color:#d0d4e0; }

/* Tags (genres) */
.tags-container {
    display:flex; flex-wrap:wrap; gap:5px; margin-top:10px;
}
.tag-badge {
    background:rgba(38,198,218,0.08); color:#26c6da;
    padding:3px 10px; border-radius:15px; font-size:0.72em; font-weight:500;
    border:1px solid rgba(38,198,218,0.15);
}

/* Performer attributes grid */
.attr-grid {
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:2px;
    background:rgba(12,18,30,0.5); padding:12px 15px;
    border-radius:6px; border:1px solid rgba(38,198,218,0.08);
}
.attr-grid p { margin:0; font-size:0.82em; color:#b0bec5; }

/* Cast grid */
.cast-grid {
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(70px,1fr));
    gap:6px;
}
.cast-card {
    background: rgba(12, 18, 30, 0.6);
    border-radius: 6px;
    padding: 1px 4px;
    text-align: center;
    border: 1px solid rgba(38, 198, 218, 0.06);
    transition: all 0.2s;
    display: flex;
    justify-content: space-around;
    align-items: center;
}
.cast-card:hover {
    background:rgba(15,22,36,0.8);
    border-color:rgba(38,198,218,0.2);
    transform:translateY(-1px);
}
.cast-card img {
    width:70px; height:70px;
    border-radius:50%; object-fit:cover;
    margin-bottom:6px;
    border:2px solid rgba(38,198,218,0.1);
}
.cast-card .cast-name {
    font-size:0.72em; color:#d0d4e0; font-weight:600;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

/* Action buttons */
.panel-actions {
    display:flex; gap:10px; flex-wrap:wrap; margin-top:15px;
}
.action-btn {
    display:inline-flex; align-items:center; gap:6px;
    background:linear-gradient(135deg,#1a8a9e,#26c6da);
    color:#080c16; text-decoration:none; padding:7px 16px;
    border-radius:4px; font-weight:600; font-size:0.82em;
    transition:transform 0.2s,box-shadow 0.2s; border:none; cursor:pointer;
}
.action-btn:hover { transform:translateY(-1px); box-shadow:0 3px 10px rgba(38,198,218,0.3); }

/* Bio/synopsis box */
.bio-box {
    background:rgba(12,18,30,0.4);
    padding:15px; border-radius:6px;
    border:1px solid rgba(38,198,218,0.06);
}

/* Info list for scenes */
.info-list p {
    margin:5px 0; line-height:1.5; font-size:0.85em; color:#b0bec5;
}
.info-list i { width:18px; text-align:center; margin-right:6px; }

/* Responsive */
@media (max-width:768px) {
    #infoPanel { padding:10px; }
    .panel-hero { flex-direction:column; align-items:center; text-align:center; padding:0 20px; margin-top:-120px; }
    .panel-poster { width:140px; min-width:140px; }
    .panel-hero-info h2 { font-size:1.3rem; }
    .panel-hero .panel-body-right { width:100%; min-width:0; }
    .panel-body { padding:15px 20px 30px; }
    .cast-grid { grid-template-columns:repeat(auto-fill,minmax(90px,1fr)); }
    .cast-card img { width:55px; height:55px; }
    .attr-grid { grid-template-columns:repeat(2,1fr); }
    .panel-hero-info .panel-meta span { display:inline-block; margin:3px 8px; }
}
@media (max-width:480px) {
    .panel-poster { width:110px; min-width:110px; }
    .cast-grid { grid-template-columns:repeat(3,1fr); }
}
