/* ====================================
   AKUMAPLAY - Estilos Principais
   ==================================== */

/* ===== VARIÁVEIS CSS ===== */
:root {
    --primary-color: #d42f31;
    --secondary-color: #1a1a1a;
    --dark-bg: #0f0f0f;
    --card-bg: #1a1a1a;
    --text-light: #e0e0e0;
    --text-muted: #a0a0a0;
    --transition: all 0.3s ease;
    --border-radius: 8px;
}

/* ===== RESET E CONFIGURAÇÕES GLOBAIS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    overflow-x: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff4f53;
}

/* ===== LINKS ===== */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #ff4f53;
    text-decoration: none;
}

/* ===== NAVBAR / HEADER ===== */
.navbar {
    background-color: var(--secondary-color) !important;
    border-bottom: 2px solid var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color) !important;
    transition: var(--transition);
}

.navbar-brand:hover {
    color: #ff4f53 !important;
    transform: scale(1.05);
}

.navbar-brand i {
    margin-right: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.nav-link {
    color: var(--text-light) !important;
    font-weight: 500;
    margin: 0 10px;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Dropdown */
.dropdown-menu {
    background-color: var(--card-bg) !important;
    border: 1px solid var(--primary-color);
}

.dropdown-item {
    color: var(--text-light);
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ===== BOTÕES ===== */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #ff4f53;
    border-color: #ff4f53;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 47, 49, 0.4);
}

.btn-danger {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-danger:hover {
    background-color: #ff4f53;
    border-color: #ff4f53;
}

.btn-outline-light:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn {
    transition: var(--transition);
    font-weight: 600;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, rgba(212, 47, 49, 0.8), rgba(0, 0, 0, 0.9));
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="1200" height="600" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.hero-section > * {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
    animation: slideInUp 0.8s ease;
}

.hero-section p {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    animation: slideInUp 0.8s ease 0.2s backwards;
}

.hero-section .btn {
    animation: slideInUp 0.8s ease 0.4s backwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CARDS DE ANIMES ===== */
.anime-card {
    position: relative;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid rgba(212, 47, 49, 0.2);
}

.anime-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(212, 47, 49, 0.3);
}

.anime-poster {
    position: relative;
    overflow: hidden;
    background-color: #000;
    aspect-ratio: 2/3;
}

.anime-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.anime-card:hover .anime-poster img {
    transform: scale(1.1);
    filter: brightness(0.7);
}

/* Badge de Episódio */
.episode-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Overlay de Anime */
.anime-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    z-index: 3;
}

.anime-card:hover .anime-overlay {
    opacity: 1;
}

.anime-overlay .btn {
    transform: scale(0.9);
    transition: var(--transition);
}

.anime-card:hover .anime-overlay .btn {
    transform: scale(1);
}

.anime-info {
    padding: 15px;
}

.anime-info h6 {
    font-weight: 600;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.anime-info small {
    color: var(--text-muted);
}

/* ===== SIDEBAR ===== */
.sidebar-section {
    background-color: var(--card-bg);
    border: 1px solid rgba(212, 47, 49, 0.2);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-section h5 {
    color: white;
    font-weight: 700;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.sidebar-section i {
    color: var(--primary-color);
    margin-right: 8px;
}

/* List Group Customizado */
.list-group-item-dark {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(212, 47, 49, 0.1);
    transition: var(--transition);
}

.list-group-item-dark:hover {
    background-color: rgba(212, 47, 49, 0.1);
    border-color: var(--primary-color);
}

.list-group-item-dark a {
    text-decoration: none;
    color: inherit;
}

/* ===== FOOTER ===== */
footer {
    background-color: var(--secondary-color);
    border-top: 2px solid var(--primary-color);
    margin-top: 60px;
}

footer h5, footer h6 {
    color: white;
    font-weight: 700;
    margin-bottom: 15px;
}

footer a {
    color: var(--text-muted);
}

footer a:hover {
    color: var(--primary-color);
}

footer .social-links a {
    font-size: 1.5rem;
    transition: var(--transition);
}

footer .social-links a:hover {
    transform: translateY(-3px);
    color: var(--primary-color);
}

footer .small {
    color: var(--text-muted);
}

/* ===== BADGES E TAGS ===== */
.badge {
    padding: 8px 12px;
    font-weight: 600;
    border-radius: 20px;
    font-size: 0.8rem;
}

.badge-success {
    background-color: #22c55e;
    color: white;
}

.badge-danger {
    background-color: var(--primary-color);
    color: white;
}

/* ===== ALERTAS ===== */
.alert {
    border-radius: var(--border-radius);
    border: none;
    animation: slideInDown 0.3s ease;
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.alert-danger {
    background-color: rgba(212, 47, 49, 0.2);
    color: var(--primary-color);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== FORMS ===== */
.form-control, .form-select {
    background-color: var(--card-bg);
    border: 1px solid rgba(212, 47, 49, 0.2);
    color: var(--text-light);
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    background-color: var(--card-bg);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(212, 47, 49, 0.25);
    color: var(--text-light);
}

.form-label {
    color: var(--text-light);
    font-weight: 500;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.5rem;
    }

    .hero-section {
        height: 300px !important;
    }

    .hero-section h1 {
        font-size: 1.8rem !important;
    }

    .hero-section p {
        font-size: 0.9rem !important;
    }

    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .sidebar-section {
        margin-bottom: 30px;
    }

    .anime-card {
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .navbar {
        padding: 10px 0;
    }

    .nav-link {
        margin: 0 5px;
        font-size: 0.9rem;
    }

    .hero-section {
        height: 250px !important;
    }

    .hero-section h1 {
        font-size: 1.5rem !important;
    }

    .hero-section .d-flex {
        flex-direction: column;
    }

    .hero-section .btn {
        width: 100%;
    }

    footer {
        text-align: center;
    }

    footer .row > div {
        margin-bottom: 20px;
    }
}

/* ===== ANIMAÇÕES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.scale-in {
    animation: scaleIn 0.3s ease;
}

/* ===== UTILITÁRIOS ===== */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.shadow-custom {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.transition-smooth {
    transition: var(--transition);
}

/* Loading spinner */
.spinner-border {
    color: var(--primary-color);
}

/* ===== DARK MODE (Sempre ativa por padrão) ===== */
body {
    background-color: var(--dark-bg);
    color: var(--text-light);
}

/* Remove backgrounds claros de componentes */
.bg-light {
    background-color: var(--card-bg) !important;
    color: var(--text-light) !important;
}

.text-dark {
    color: var(--text-light) !important;
}
