:root {
    --colorRojo: #E83028;
    --colorBlanco: #FFFFFF;
    --colorNegro: #0A0A0A;
    --colorFondo: #222222;
    --colorAmarillo: #FFD700;
    --colorAzul: #1E90FF;
    --fontPrimary: 'Orbitron', sans-serif;
    --fontSecondary: 'Roboto', sans-serif;
}

*{
    scroll-behavior: smooth;
}

section, .quote-section, footer {
    view-timeline-name: --section;
    animation: autoShowAnimation both ease-out;
    animation-timeline: --section;
    animation-range: entry 0% cover 10%;
}

.hero,
.slider2,
.navbar {
    animation: none !important;
}

body {
    margin: 0;
    font-family: var(--fontSecondary);
    background: var(--colorNegro);
    color: var(--colorBlanco);
    overflow-x: hidden;
    position: relative;
}

body::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, 
        rgb(10, 10, 10) 0%, 
        rgba(255, 255, 255, 0) 50%,
        transparent 100%);
    pointer-events: none;
    z-index: 100;
    backdrop-filter: blur(10px);
    mask-image: linear-gradient(to top, 
        black 0%, 
        transparent 100%);
}

.autoShow{
    animation: autoShowAnimation both;
    animation-timeline: view(100% 5%);
}

@keyframes autoShowAnimation {
    from {
        filter: blur(20px) brightness(1.5);
        opacity: 0;
        transform: translateY(100px) scale(0.8);
    }
    to {
        filter: blur(0) brightness(1);
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
  
section:nth-child(odd) {
    animation-delay: 0.1s;
}
  
section:nth-child(even) {
    animation-delay: 0.2s;
}

/* Navbar Styling */
.navbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    height: 80px;      
    padding: 0 40px;   
    position: relative;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid var(--colorRojo);
}

.logo {
    font-family: var(--fontPrimary);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--colorBlanco);
    text-shadow: 0 0 5px var(--colorRojo), 0 0 10px var(--colorRojo);
    letter-spacing: 3px;
    margin: 0;
    transition: all 0.3s ease;
}

.logo-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.logo:hover {
    transform: scale(1.05);
    text-shadow: 0 0 10px var(--colorRojo), 0 0 20px var(--colorRojo);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 40px;
    margin: 0;
    padding: 0;
    justify-self: center;
}

.nav-link {
    color: var(--colorBlanco);
    text-decoration: none;
    font-family: var(--fontPrimary);
    font-weight: 600;
    letter-spacing: 1.5px;
    position: relative;
    padding: 5px 0;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.nav-link:hover {
    color: var(--colorAmarillo);
    text-shadow: 0 0 5px var(--colorAmarillo);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--colorAmarillo);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.join-btn {
    background: linear-gradient(135deg, var(--colorRojo), #c62828);
    color: var(--colorBlanco);
    border: none;
    padding: 12px 30px;
    cursor: pointer;
    font-family: var(--fontPrimary);
    font-weight: 700;
    letter-spacing: 1.5px;
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(232, 48, 40, 0.7);
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.join-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transform: rotate(30deg);
    transition: all 1s ease-in-out;
}

.join-btn:hover {
    background: var(--colorBlanco);
    color: var(--colorRojo);
    transform: translateY(-3px);
    box-shadow: 0 0 25px rgba(232, 48, 40, 0.9);
}

.join-btn:hover::before {
    left: 100%;
}

.subtitle {
    font-family: var(--fontPrimary);
    font-size: 1.8rem;
    margin-top: 20px;
    position: relative;
    z-index: 5;
    text-shadow: 0 0 10px var(--colorRojo), 0 0 5px var(--colorNegro);
    letter-spacing: 2px;
    color: var(--colorBlanco);
    animation: pulse 2s infinite alternate;
}

@keyframes pulse {
    from {
        text-shadow: 0 0 10px var(--colorRojo), 0 0 5px var(--colorNegro);
    }
    to {
        text-shadow: 0 0 20px var(--colorRojo), 0 0 15px var(--colorAmarillo);
    }
}

/* Episode Player Styles */

.reproductor{
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), rgba(0,0,0,0.9)), url('images/bg-mosaic\ \(2\).webp') center/cover;
}

.episode-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    animation: autoShowAnimation both ease-out;
    animation-timeline: view();
    animation-range: entry 0% cover 10%;
}

.episode-player {
    background: rgba(10, 10, 10, 0.7);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(232, 48, 40, 0.3);
    border-left: 3px solid var(--colorRojo);
}

.episode-title {
    font-family: var(--fontPrimary);
    color: var(--colorBlanco);
    font-size: 2rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.episode-title span {
    color: var(--colorRojo);
    display: block;
    font-size: 1.5rem;
    margin-top: 5px;
}

.video-container {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

video {
    width: 100%;
    border-radius: 8px;
    outline: none;
}

.video-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 0 0 8px 8px;
    margin-top: -5px;
}

.control-btn {
    background: var(--colorRojo);
    color: var(--colorBlanco);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: var(--colorBlanco);
    color: var(--colorRojo);
    transform: scale(1.1);
}

#progress-bar {
    flex-grow: 1;
    height: 5px;
    cursor: pointer;
    accent-color: var(--colorRojo);
}

#volume-control {
    width: 80px;
    height: 5px;
    accent-color: var(--colorRojo);
}

#time-display {
    font-family: var(--fontSecondary);
    font-size: 0.9rem;
    color: var(--colorBlanco);
    min-width: 100px;
    text-align: center;
}

.episode-synopsis {
    font-family: var(--fontSecondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.episode-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.detail-item {
    background: rgba(232, 48, 40, 0.1);
    padding: 10px;
    border-radius: 5px;
    border-left: 2px solid var(--colorRojo);
}

.detail-label {
    font-family: var(--fontPrimary);
    color: var(--colorRojo);
    font-size: 0.9rem;
    display: block;
}

.detail-value {
    font-family: var(--fontSecondary);
    color: var(--colorBlanco);
}

/* Episode Navigation */
.episode-navigation {
    margin-top: 50px;
}

.episode-navigation h3 {
    font-family: var(--fontPrimary);
    color: var(--colorBlanco);
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.episode-card {
    display: block;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
}

.episode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(232, 48, 40, 0.5);
}

.episode-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.episode-number {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--colorRojo);
    color: var(--colorBlanco);
    font-family: var(--fontPrimary);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.episode-name {
    display: block;
    background: rgba(10, 10, 10, 0.8);
    color: var(--colorBlanco);
    font-family: var(--fontSecondary);
    padding: 10px;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.episode-card:hover .episode-name {
    background: rgba(232, 48, 40, 0.8);
}

/* Footer */
footer {
    background: var(--colorNegro);
    padding: 80px 20px 30px;
    color: var(--colorBlanco);
    position: relative;
    overflow: hidden;   
    border-top: 3px solid var(--colorRojo);
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="none" stroke="%23E83028" stroke-width="0.3" d="M50,0 C60,20 70,30 50,50 C30,70 20,80 0,50 C-20,20 -30,10 -10,-10 C10,-30 20,-40 50,0 Z" transform="rotate(45 50 50)"/></svg>');
    opacity: 0.05;
    z-index: 1;
    animation: spiralRotate 80s linear infinite;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    position: relative;
    z-index: 2;
    .footer-content {
        animation-range: entry 5% cover 15%;
        filter: blur(5px) brightness(1.1);
    }
}

.footer-about {
    padding-right: 20px;
}

.footer-about h3 {
    font-family: var(--fontPrimary);
    color: var(--colorRojo);
    margin-top: 0;
    font-size: 1.5rem;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 10px;
}

.footer-about p {
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-about h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--colorRojo);
}

.anime-stats {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.stat-item {
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    display: block;
    font-family: var(--fontPrimary);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--colorRojo);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.8;
}

.footer-logo {
    font-family: var(--fontPrimary);
    font-size: 2rem;
    font-weight: 700;
    color: var(--colorRojo);
    margin-bottom: 20px;
}

.footer-logo:hover {
    text-shadow: 0 0 10px var(--colorRojo);
    transition: text-shadow 0.3s ease;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-links h3{
    font-family: var(--fontPrimary);
    color: var(--colorRojo);
    margin-top: 0;
    font-size: 1.5rem;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--colorRojo);
}

.footer-links a {
    color: var(--colorBlanco);
    text-decoration: none;
    font-family: var(--fontSecondary);
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 0 8px 20px;
    margin-left: -20px;
    border-radius: 5px;
}

.footer-links a:hover {
    color: var(--colorRojo);
    background: rgba(232, 48, 40, 0.1);
    padding-left: 25px;
}

.footer-links a::before {
    content: '▶';
    position: absolute;
    left: 5px;
    color: var(--colorRojo);
    opacity: 0;
    transition: all 0.3s ease;
}

.footer-links a:hover::before {
    opacity: 1;
    left: 10px;
}

.newsletter {
    background: rgba(34, 34, 34, 0.7);
    padding: 20px;
    border-radius: 10px;
    border-top: 3px solid var(--colorRojo);
}

.newsletter:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(232, 48, 40, 0.3);
    transition: all 0.3s ease;
}

.newsletter h3 {
    font-family: var(--fontPrimary);
    color: var(--colorBlanco);
    text-shadow: 0 0 10px var(--colorAzul), 0 0 20px var(--colorAzul);
    margin-top: 0;
}

.newsletter p {
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.newsletter form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.newsletter input {
    padding: 12px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--colorBlanco);
    border-bottom: 2px solid var(--colorRojo);
}

.newsletter input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter button {
    background: var(--colorRojo);
    color: var(--colorBlanco);
    border: none;
    padding: 12px;
    border-radius: 5px;
    font-family: var(--fontPrimary);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter button:hover {
    background: var(--colorBlanco);
    color: var(--colorRojo);
}

.footer-bottom {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* =========================================
   CUSTOM SCROLLBAR
========================================= */

::-webkit-scrollbar{
  width:6px;
}

::-webkit-scrollbar-track{
  background:#050505;
}

::-webkit-scrollbar-thumb{

  background:#AAFF00;

  border-radius:999px;

  box-shadow:
    0 0 10px rgba(170,255,0,.5);

}

::-webkit-scrollbar-thumb:hover{
  background:#d9ff7a;
}

/* Firefox */

*{
  scrollbar-width:thin;
  scrollbar-color:#AAFF00 #050505;
}


/* =========================================================
   RESPONSIVE — WATCH PAGE
   Fixed: navbar grid→flex at mobile, video-controls
   wrapping, episode-title clamp, episode-grid breakpoints
========================================================= */

/* ── 1280px: navbar starts getting tight ── */
@media (max-width: 1280px) {
    .navbar {
        padding: 0 24px;
    }
    .nav-links {
        gap: 28px;
    }
}

/* ── 1024px: reduce sizes before things break ── */
@media (max-width: 1024px) {
    .navbar {
        padding: 0 20px;
    }
    .logo {
        font-size: 1.4rem;
        letter-spacing: 2px;
    }
    .nav-links {
        gap: 20px;
    }
    .nav-link {
        font-size: 0.8rem;
    }
    .join-btn {
        padding: 10px 18px;
        font-size: 0.78rem;
        letter-spacing: 1px;
    }
    .episode-title {
        font-size: 1.6rem;
    }
    .episode-title span {
        font-size: 1.25rem;
    }
}

/* ── 900px: video controls start wrapping ── */
@media (max-width: 900px) {
    .video-controls {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
    }
    /* play-pause stays first, progress spans full width */
    #play-pause {
        order: 0;
        flex-shrink: 0;
    }
    #progress-bar {
        order: 1;
        width: calc(100% - 50px);
        flex-grow: 1;
    }
    #time-display {
        order: 2;
        width: auto;
        min-width: unset;
        font-size: 0.8rem;
        flex: 1;
        text-align: left;
    }
    #volume-btn {
        order: 3;
        flex-shrink: 0;
    }
    #volume-control {
        order: 4;
        width: 70px;
    }
    #fullscreen {
        order: 5;
        flex-shrink: 0;
    }
}

/* ── 768px: switch navbar from grid to flex ── */
@media (max-width: 768px) {
    .navbar {
        display: flex;
        flex-wrap: wrap;
        height: auto;
        padding: 12px 20px;
        gap: 10px;
        align-items: center;
        justify-content: space-between;
    }
    .logo {
        font-size: 1.2rem;
        order: 1;
        flex: 1;
    }
    .join-btn {
        order: 2;
        padding: 8px 14px;
        font-size: 0.72rem;
    }
    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 16px;
    }
    .nav-link {
        font-size: 0.78rem;
        letter-spacing: 1px;
    }
    .episode-title {
        font-size: 1.35rem;
    }
    .episode-title span {
        font-size: 1.1rem;
    }
    blockquote {
        font-size: 1.5rem;
    }
}

/* ── 600px ── */
@media (max-width: 600px) {
    .episode-container {
        padding: 24px 14px;
    }
    blockquote::after {
        bottom: -30px;
    }
    .episode-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

/* ── 480px ── */
@media (max-width: 480px) {
    .navbar {
        padding: 10px 14px;
    }
    .logo {
        font-size: 1rem;
        letter-spacing: 1px;
    }
    .nav-links {
        gap: 10px;
    }
    .nav-link {
        font-size: 0.65rem;
        letter-spacing: 0.5px;
    }
    .join-btn {
        padding: 7px 11px;
        font-size: 0.65rem;
        letter-spacing: 0.5px;
    }
    .episode-grid {
        grid-template-columns: 1fr;
    }
    .episode-title {
        font-size: 1.1rem;
    }
    .episode-title span {
        font-size: 0.95rem;
    }
    #volume-control {
        width: 55px;
    }
}