/* ============================================================
   ANIME_DETAIL.CSS (Anime Site Inspired)
   ============================================================ */

body {
    background: #111111;
}

.a-hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 5% 4rem;
    color: white;
}

.a-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 20%;
    z-index: 0;
}

.a-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #111111 0%, rgba(17,17,17,0.8) 50%, rgba(17,17,17,0.2) 100%),
                linear-gradient(180deg, rgba(17,17,17,0.3) 0%, rgba(17,17,17,0.8) 60%, #111111 100%);
    z-index: 1;
}

.a-hero-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
    animation: slideRight 0.8s ease-out;
}

@keyframes slideRight { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }

.a-title {
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 0 4px 10px rgba(0,0,0,0.8);
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
}

.a-meta-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.a-badge {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.a-badge-highlight {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #111;
}

.a-overview {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #bbb;
    margin-bottom: 2.5rem;
}

.a-actions {
    display: flex;
    gap: 1rem;
}

.a-btn {
    padding: 1rem 2.5rem;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.2s;
    border: 2px solid transparent;
}

.a-btn-primary {
    background: #f59e0b;
    color: #111;
}
.a-btn-primary:hover { background: #ffb433; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(245, 158, 11, 0.4); }

.a-btn-secondary {
    background: transparent;
    color: white;
    border-color: rgba(255,255,255,0.3);
}
.a-btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: white; }


/* SECTIONS */
.a-sections {
    padding: 0 5% 5rem;
}

.a-section {
    margin-bottom: 4rem;
}

.a-section-title {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: white;
    margin-bottom: 2rem;
}

.a-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

.a-card {
    display: block;
    text-decoration: none;
    color: white;
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    transition: 0.3s;
}

.a-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
    transition: 0.4s;
}

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

.a-card-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 3rem 1rem 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    opacity: 0;
    transform: translateY(10px);
    transition: 0.3s;
}

.a-card:hover .a-card-info {
    opacity: 1;
    transform: translateY(0);
}

.a-card-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* WHERE TO WATCH */
.a-providers-grid {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.a-provider-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: #eee;
    background: #1a1a1a;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    transition: 0.2s;
    border-left: 4px solid #333;
}

.a-provider-item:hover {
    background: #252525;
    transform: translateX(5px);
    border-color: #f59e0b;
}

.a-provider-item img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.a-provider-item span {
    font-size: 0.95rem;
    font-weight: 700;
}

/* Trailer Modal */
.trailer-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.trailer-modal.active {
    opacity: 1;
    pointer-events: all;
}

.trailer-modal-bg {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
}

.trailer-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    aspect-ratio: 16/9;
    background: black;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    transform: scale(0.95);
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.trailer-modal.active .trailer-content {
    transform: scale(1);
}

.trailer-content iframe {
    width: 100%;
    height: 100%;
}

.close-modal {
    position: absolute;
    top: 1rem; right: 1rem;
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    z-index: 10;
}
.close-modal:hover { background: #f59e0b; color: #111; }

/* ── Floating Action Button (FAB) ── */
.fab-random {
  position: fixed;
  bottom: 2.5rem;
  right: 2.5rem;
  z-index: 999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--grad);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 30px rgba(255, 71, 101, 0.35);
  transition: all 0.2s ease;
  color: white;
}
.fab-random svg {
  width: 22px;
  height: 22px;
}
.fab-random:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 12px 40px rgba(255, 71, 101, 0.55);
}
.fab-random:active {
  transform: scale(0.95);
}
.fab-random:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .a-hero { padding: 4rem 1.2rem 3rem; }
  .a-title { font-size: 2.2rem; }
  .a-sections { padding: 0 1.2rem 4rem; }
  .a-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
}
@media (max-width: 480px) {
  .a-actions { flex-direction: column; }
  .a-btn { width: 100%; text-align: center; }
  .a-providers-grid { flex-direction: column; }
  .a-provider-item { width: 100%; justify-content: center; }
}
