/*!
Theme Name: AnimeHub
Theme URI: https://animehub.dev/
Author: AnimeHub Team
Author URI: https://animehub.dev/
Description: A modern anime streaming platform theme for WordPress. Features include anime/episode/video management, AniList integration, ESV video support, and beautiful dark UI.
Version: 2.0.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: animehub
Tags: dark, entertainment, video, streaming, anime, custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

AnimeHub v2 - Anime Streaming Platform Theme
*/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
# CSS Variables
# Generic
    - Normalize
    - Box sizing
# Base
    - Typography
    - Elements
    - Links
    - Forms
# Components
    - Navigation
    - Cards
    - Buttons
    - Badges
# Utilities
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# CSS Variables
--------------------------------------------------------------*/
:root {
    /* Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --bg-card: #1a1a1a;
    
    --accent-primary: #ff6b35;
    --accent-secondary: #ff8c5a;
    --accent-hover: #ff5722;
    
    --text-primary: #e0e0e0;
    --text-secondary: #999999;
    --text-tertiary: #666666;
    --text-white: #ffffff;
    
    /* Badge Colors */
    --badge-movie: #4a9eff;
    --badge-clip: #ff6b35;
    --badge-special: #9b59b6;
    --badge-ova: #27ae60;
    --badge-pv: #e74c3c;
    --badge-raw: #f39c12;
    --badge-en: #3498db;
    --badge-es: #e67e22;
    
    /* Status Colors */
    --status-airing: #27ae60;
    --status-finished: #3498db;
    --status-upcoming: #9b59b6;
    --status-cancelled: #e74c3c;
    
    /* Spacing */
    --container-max: 1400px;
    --gap-section: 30px;
    --gap-card: 20px;
    --gap-small: 10px;
    
    /* Border Radius */
    --radius-card: 8px;
    --radius-button: 6px;
    --radius-badge: 4px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    
    /* Shadows */
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 10px 30px rgba(255, 107, 53, 0.2);
}

/*--------------------------------------------------------------
# Generic - Normalize
--------------------------------------------------------------*/
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: "Fira Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

main {
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    clear: both;
    margin-top: 0;
    margin-bottom: 0.5em;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-white);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    margin-top: 0;
    margin-bottom: 1em;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover,
a:focus {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    border-style: none;
}

/*--------------------------------------------------------------
# Base - Forms
--------------------------------------------------------------*/
button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
}

button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75em 1.5em;
    background-color: var(--accent-primary);
    border: none;
    border-radius: var(--radius-button);
    color: var(--text-white);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
    padding: 0.75em 1em;
    background-color: var(--bg-tertiary);
    border: 1px solid #3a3a3a;
    border-radius: var(--radius-button);
    color: var(--text-primary);
    transition: border-color var(--transition-fast);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/*--------------------------------------------------------------
# Components - Container
--------------------------------------------------------------*/
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/*--------------------------------------------------------------
# Components - Cards
--------------------------------------------------------------*/
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-card);
    overflow: hidden;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Anime/Episode Card - 5:7 ratio */
.card-poster {
    position: relative;
    width: 100%;
    padding-top: 140%; /* 5:7 aspect ratio */
    background-color: var(--bg-tertiary);
    overflow: hidden;
}

.card-poster img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video Card - 16:9 ratio */
.card-video-thumb {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background-color: var(--bg-tertiary);
    overflow: hidden;
}

.card-video-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-info {
    padding: 12px;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}

/*--------------------------------------------------------------
# Components - Badges
--------------------------------------------------------------*/
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: var(--radius-badge);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-movie { background-color: var(--badge-movie); color: #fff; }
.badge-clip { background-color: var(--badge-clip); color: #fff; }
.badge-special { background-color: var(--badge-special); color: #fff; }
.badge-ova { background-color: var(--badge-ova); color: #fff; }
.badge-pv { background-color: var(--badge-pv); color: #fff; }
.badge-raw { background-color: var(--badge-raw); color: #fff; }
.badge-en { background-color: var(--badge-en); color: #fff; }
.badge-es { background-color: var(--badge-es); color: #fff; }

.badge-airing { background-color: var(--status-airing); color: #fff; }
.badge-finished { background-color: var(--status-finished); color: #fff; }
.badge-upcoming { background-color: var(--status-upcoming); color: #fff; }

/* Duration badge */
.badge-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.85);
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
}

/* Category badge */
.badge-category {
    position: absolute;
    top: 8px;
    left: 8px;
}

/*--------------------------------------------------------------
# Components - Buttons
--------------------------------------------------------------*/
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-button);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: var(--text-white);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    color: var(--text-white);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid #3a3a3a;
}

.btn-secondary:hover {
    background-color: #3a3a3a;
    color: var(--text-white);
}

/*--------------------------------------------------------------
# Components - Grid
--------------------------------------------------------------*/
.grid {
    display: grid;
    gap: var(--gap-card);
}

.grid-anime {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.grid-video {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/*--------------------------------------------------------------
# Utilities
--------------------------------------------------------------*/
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1.5em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1.5em;
}

.aligncenter {
    clear: both;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5em;
}

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/
@media screen and (max-width: 1024px) {
    :root {
        --gap-section: 20px;
        --gap-card: 15px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
}

@media screen and (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .grid-anime {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .grid-video {
        grid-template-columns: 1fr;
    }
}
