/*
Theme Name: Tema Anime WP
Theme URI: http://example.com/tema-anime
Author: Antigravity
Author URI: http://example.com
Description: Tema de anime basado en un diseño clásico de Blogger con toques modernos y estructura avanzada para entradas individuales.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tema-anime
*/

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
    --primary-color: #00a8ff;
    --bg-color: #f0f0f0;
    --text-color: #333;
    --header-bg: #111;
    --footer-bg: #222;
    --card-bg: #fff;
    --border-color: #e0e0e0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #007bb5;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
    background: var(--header-bg);
    color: #fff;
    border-bottom: 2px solid var(--primary-color);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
}

.site-title a {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 1px 1px 0px #000;
}

.main-navigation ul {
    display: flex;
    gap: 20px;
}

.main-navigation a {
    color: #ccc;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.main-navigation a:hover {
    color: #fff;
}

.header-banner {
    height: 80px;
    background: url('https://via.placeholder.com/1920x80/ffcc00/ffffff?text=Anime+Banner+Placeholder') repeat-x center center;
    background-size: contain;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 30px auto;
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
    padding: 0 20px;
}

.main-content {
    background: transparent;
}

/* ==========================================================================
   Index / Grid (Original Design)
   ========================================================================== */
.tabs-nav {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.tabs-nav li {
    padding: 10px 20px;
    border-right: 1px solid var(--border-color);
    cursor: pointer;
    font-weight: 600;
}

.tabs-nav li.active {
    border-bottom: 3px solid var(--primary-color);
    color: var(--primary-color);
}

.promo-banner {
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.anime-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.anime-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.anime-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.anime-card-header {
    background: #111;
    color: #fff;
    padding: 5px 10px;
    font-size: 0.8rem;
    text-align: right;
}

.anime-card-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
}

.anime-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.anime-card-footer {
    background: #222;
    color: #fff;
    padding: 8px 10px;
    font-size: 0.85rem;
    text-align: center;
    border-bottom: 3px solid var(--primary-color);
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 15px;
}

.widget-title {
    font-size: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: #555;
}

.search-form {
    display: flex;
}

.search-form input[type="text"] {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-right: none;
}

.search-form button {
    padding: 8px 12px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.social-widget {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    color: #fff;
    font-weight: bold;
    border-radius: 4px;
}

.social-btn.facebook { background: #3b5998; }
.social-btn.twitter { background: #1da1f2; }
.social-btn.google { background: #db4437; }

.category-list li {
    padding: 8px 0;
    border-bottom: 1px dotted #ccc;
}

.category-list li:last-child {
    border-bottom: none;
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}

.popular-item img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border: 1px solid #ccc;
}

/* ==========================================================================
   Single Post (New Structure, Old Colors)
   ========================================================================== */
.single-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.anime-info-header {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.anime-cover {
    flex: 0 0 250px;
}

.anime-cover img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.anime-details {
    flex-grow: 1;
}

.anime-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.anime-title-bar h1 {
    font-size: 2rem;
    color: var(--text-color);
    margin: 0;
}

.anime-rating {
    background: #8e44ad;
    color: #fff;
    padding: 5px 12px;
    border-radius: 15px;
    font-weight: bold;
}

.anime-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.badge {
    padding: 4px 8px;
    background: #eee;
    font-size: 0.8rem;
    border-radius: 4px;
    font-weight: 600;
}
.badge.type { background: #3498db; color: #fff; }
.badge.status { background: #e74c3c; color: #fff; }

.anime-synopsis {
    background: #f9f9f9;
    padding: 15px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.anime-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 0.9rem;
}

.meta-item {
    display: flex;
}

.meta-item strong {
    width: 120px;
    color: #555;
}

.section-title {
    font-size: 1.2rem;
    font-weight: bold;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
    margin: 30px 0 15px 0;
    color: var(--text-color);
    display: inline-block;
}

.screenshots-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.screenshots-grid img {
    height: 100px;
    border-radius: 4px;
}

.video-player-container {
    background: #000;
    aspect-ratio: 16/9;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.video-player-container .play-btn {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.video-player-container .play-btn::after {
    content: '';
    border-style: solid;
    border-width: 15px 0 15px 25px;
    border-color: transparent transparent transparent #000;
    margin-left: 8px;
}

.episodes-list {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.ep-btn {
    padding: 8px 15px;
    background: #eee;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
}

.ep-btn:hover, .ep-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.download-section {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.download-header {
    background: #111;
    color: #fff;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.download-header .info {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
}

.download-header .info span strong {
    color: var(--primary-color);
}

.btn-download {
    background: #8e44ad;
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    text-transform: uppercase;
}

.download-links-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 20px;
    background: #fafafa;
}

.link-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    text-align: center;
    padding: 15px;
    border-radius: 4px;
    font-weight: bold;
    color: #555;
    cursor: pointer;
    transition: 0.2s;
}

.link-box:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.link-box span {
    display: block;
    font-size: 0.8rem;
    font-weight: normal;
    color: #999;
}

.related-anime-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.related-anime-card {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.related-anime-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.related-anime-card .title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 8px;
    font-size: 0.8rem;
    text-align: center;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination .page-numbers {
    padding: 10px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-weight: 600;
}

.pagination .current, .pagination .page-numbers:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.site-footer {
    background: #eee;
    border-top: 1px solid var(--border-color);
}

.footer-credits {
    background: #222;
    color: #999;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 4px;
    margin-bottom: 30px;
}

.footer-badges span {
    background: #333;
    padding: 5px 10px;
    border-radius: 4px;
    margin-left: 5px;
    font-weight: bold;
    color: #666;
}

.footer-icons {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 30px 0;
    border-top: 1px dashed #ccc;
    background: #e6e6e6;
}

.footer-icon {
    text-align: center;
    color: #777;
    font-size: 0.9rem;
}

.footer-icon i {
    display: block;
    font-size: 2rem;
    margin-bottom: 5px;
    color: #999;
}

.footer-bottom {
    text-align: center;
    padding: 15px;
    background: #ddd;
    color: #666;
    font-size: 0.85rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 992px) {
    .container {
        grid-template-columns: 1fr;
    }
    .anime-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .download-links-grid, .related-anime-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .anime-info-header {
        flex-direction: column;
    }
    .anime-cover {
        flex: none;
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    .anime-grid, .download-links-grid, .related-anime-grid {
        grid-template-columns: 1fr;
    }
    .anime-meta-grid {
        grid-template-columns: 1fr;
    }
    .top-bar {
        flex-direction: column;
        gap: 15px;
    }
}
