/* Simple Anime A-Z Plugin CSS - Final Version */

.simple-anime-az-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.classificar-por-letras h3 {
    color: #e91e63;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    margin-top: 0;
}

.letter-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-bottom: 30px;
    background: #2a2a2a;
    padding: 8px;
    border-radius: 8px;
}

.letter-btn {
    background: #4a4a4a;
    color: #ffffff;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
    transition: all 0.3s ease;
}

.letter-btn:hover:not(:disabled) {
    background: #5a5a5a;
    transform: translateY(-1px);
}

.letter-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.letter-btn.active {
    background: #e91e63 !important;
    color: #ffffff;
}

.letter-btn:first-child {
    background: #e91e63;
    color: #ffffff;
}

/* Resultados dos Animes */
#anime-results {
    min-height: 200px;
}

.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.anime-item {
    background: transparent; /* FUNDO TRANSPARENTE */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(224, 224, 224, 0.3); /* BORDA TRANSPARENTE */
}

.anime-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.anime-cover {
    width: 100%;
    height: 280px;
    overflow: hidden;
    position: relative;
    border-radius: 8px 8px 0 0;
}

.anime-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.anime-item:hover .anime-cover img {
    transform: scale(1.05);
}

.no-image {
    width: 100%;
    height: 100%;
    background: rgba(240, 240, 240, 0.5); /* FUNDO TRANSPARENTE */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

.anime-title {
    padding: 15px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    background: rgba(255, 255, 255, 0.9); /* FUNDO SEMI-TRANSPARENTE */
    backdrop-filter: blur(10px);
    border-radius: 0 0 8px 8px;
}

.anime-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.anime-title a:hover {
    color: #e91e63;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(243, 243, 243, 0.3);
    border-top: 2px solid #e91e63;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilo para a mensagem inicial de "Selecione uma letra" */
.no-results {
    font-size: 18px;     /* AUMENTAMOS A FONTE */
    color: #FFFFFF;      /* MUDAMOS A COR PARA BRANCO */
    font-weight: bold;   /* ADICIONAMOS O NEGRITO */
    text-align: center;
    padding: 40px 20px;  /* Aumentamos o espaçamento para dar mais destaque */
}
}

/* MOBILE RESPONSIVO MELHORADO */
@media (max-width: 768px) {
    .simple-anime-az-container {
        padding: 10px;
    }
    
    .classificar-por-letras h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .letter-navigation {
        gap: 1px;
        padding: 4px;
        margin-bottom: 20px;
    }
    
    .letter-btn {
        padding: 6px 8px;
        font-size: 12px;
        min-width: 32px;
    }
    
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
        margin-top: 15px;
    }
    
    .anime-cover {
        height: 200px;
    }
    
    .anime-title {
        padding: 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .simple-anime-az-container {
        padding: 8px;
    }
    
    .letter-navigation {
        justify-content: center;
        gap: 1px;
        padding: 3px;
    }
    
    .letter-btn {
        padding: 4px 6px;
        font-size: 10px;
        min-width: 28px;
    }
    
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 8px;
    }
    
    .anime-cover {
        height: 160px;
    }
    
    .anime-title {
        padding: 8px;
        font-size: 11px;
        line-height: 1.2;
    }
}

/* MOBILE MUITO PEQUENO */
@media (max-width: 360px) {
    .letter-btn {
        padding: 3px 5px;
        font-size: 9px;
        min-width: 24px;
    }
    
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 6px;
    }
    
    .anime-cover {
        height: 130px;
    }
    
    .anime-title {
        padding: 6px;
        font-size: 10px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .simple-anime-az-container {
        color: #ffffff;
    }
    
    .anime-item {
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .anime-title {
        background: rgba(0, 0, 0, 0.7);
        color: #ffffff;
    }
    
    .anime-title a {
        color: #ffffff;
    }
    
    .no-image {
        background: rgba(68, 68, 68, 0.5);
        color: #cccccc;
    }
    
    .error-message, .no-results {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 255, 255, 0.1);
        color: #cccccc;
    }
}

/* Accessibility */
.letter-btn:focus {
    outline: 2px solid #e91e63;
    outline-offset: 2px;
}

.anime-title a:focus {
    outline: 2px solid #e91e63;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .letter-navigation {
        display: none;
    }
    
    .anime-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
        background: white !important;
    }
    
    .anime-title {
        background: white !important;
        color: black !important;
    }
}

/* Smooth Animations */
.anime-grid {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

