/* ===================================
   GUIA DE PERSONAGENS - HAIKYUU THEME
   =================================== */

:root {
    /* Haikyuu Colors */
    --hq-orange: #ff6b35;
    --hq-dark-orange: #e84a1b;
    --hq-black: #1a1a1a;
    --hq-dark-gray: #2a2a2a;
    --hq-gray: #3a3a3a;
    --hq-light-gray: #f5f5f5;
    --hq-white: #ffffff;
    
    /* Tier Colors */
    --tier-spp: linear-gradient(135deg, #ffd700, #ff8c00);
    --tier-sp: linear-gradient(135deg, #ff6b35, #ff4500);
    --tier-s: linear-gradient(135deg, #ff1744, #f50057);
    --tier-ap: linear-gradient(135deg, #9c27b0, #7b1fa2);
    --tier-a: linear-gradient(135deg, #3f51b5, #283593);
    --tier-bp: linear-gradient(135deg, #00bcd4, #0097a7);
    --tier-b: linear-gradient(135deg, #4caf50, #388e3c);
    --tier-cp: linear-gradient(135deg, #ffc107, #ffa000);
    --tier-c: linear-gradient(135deg, #ff9800, #f57c00);
    --tier-d: linear-gradient(135deg, #9e9e9e, #616161);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.3);
}

/* ===================================
   HERO HEADER
   =================================== */

.hero-header {
    position: relative;
    background: linear-gradient(135deg, var(--hq-black) 0%, var(--hq-dark-gray) 100%);
    padding: 8rem 2rem 4rem;
    text-align: center;
    overflow: hidden;
}

.hero-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(255, 107, 53, 0.03) 10px,
            rgba(255, 107, 53, 0.03) 20px
        );
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--hq-orange);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.back-link:hover {
    color: var(--hq-dark-orange);
    transform: translateX(-5px);
}

.page-title {
    font-family: 'Bangers', cursive;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--hq-white);
    margin: 0 0 1rem;
    letter-spacing: 0.05em;
    text-shadow: 3px 3px 0 var(--hq-orange);
    position: relative;
    z-index: 1;
}

.page-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    position: relative;
    z-index: 1;
}

/* ===================================
   MAIN CONTENT
   =================================== */

.main-content {
    padding: 3rem 0;
    background: var(--hq-light-gray);
    min-height: 60vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===================================
   VIEW TOGGLE
   =================================== */

.view-toggle {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--hq-white);
    color: var(--hq-black);
    border: 3px solid var(--hq-gray);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--hq-orange);
}

.toggle-btn.active {
    background: var(--hq-orange);
    color: var(--hq-white);
    border-color: var(--hq-orange);
}

/* ===================================
   TIER LEGEND
   =================================== */

.tier-legend {
    background: var(--hq-white);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-md);
}

.tier-legend h3 {
    font-family: 'Bangers', cursive;
    font-size: 1.8rem;
    color: var(--hq-black);
    margin: 0 0 1.5rem;
    text-align: center;
    letter-spacing: 0.05em;
}

.tier-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.tier-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--hq-light-gray);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.tier-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-sm);
}

.tier-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-weight: 900;
    font-size: 1rem;
    color: var(--hq-white);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: var(--shadow-sm);
}

.tier-badge.spp { background: var(--tier-spp); }
.tier-badge.sp { background: var(--tier-sp); }
.tier-badge.s { background: var(--tier-s); }
.tier-badge.ap { background: var(--tier-ap); }
.tier-badge.a { background: var(--tier-a); }
.tier-badge.bp { background: var(--tier-bp); }
.tier-badge.b { background: var(--tier-b); }
.tier-badge.cp { background: var(--tier-cp); }
.tier-badge.c { background: var(--tier-c); }
.tier-badge.d { background: var(--tier-d); }

/* Character Image */
.character-image {
    width: 100%;
    height: 320px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hq-light-gray);
}

.character-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* ===================================
   CONTENT VIEWS
   =================================== */

.content-view {
    display: none;
}

.content-view.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* ===================================
   POSITION SELECTOR
   =================================== */

.position-selector {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.position-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--hq-white);
    color: var(--hq-black);
    border: 2px solid var(--hq-gray);
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.position-btn:hover {
    border-color: var(--hq-orange);
    transform: translateY(-2px);
}

.position-btn.active {
    background: var(--hq-orange);
    color: var(--hq-white);
    border-color: var(--hq-orange);
}

/* ===================================
   CHARACTERS LIST
   =================================== */

.characters-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.character-card {
    background: var(--hq-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

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

/* ===================================
   CHARACTER MODAL
   =================================== */

.character-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    overflow-y: auto;
    padding: 2rem;
}

.character-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--hq-white);
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideUp 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: var(--hq-orange);
    color: var(--hq-white);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--hq-dark-orange);
    transform: rotate(90deg);
}

.modal-header {
    background: linear-gradient(135deg, var(--hq-black) 0%, var(--hq-dark-gray) 100%);
    padding: 3rem 2rem 2rem;
    position: relative;
}

.modal-rank {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    width: 50px;
    height: 50px;
    background: var(--hq-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bangers', cursive;
    font-size: 1.5rem;
    color: var(--hq-white);
    box-shadow: var(--shadow-md);
}

.modal-tier {
    position: absolute;
    top: 1.5rem;
    right: 5rem;
}

.modal-name {
    font-family: 'Bangers', cursive;
    font-size: 2.5rem;
    color: var(--hq-white);
    margin: 0 0 1rem;
    letter-spacing: 0.05em;
}

.modal-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.modal-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-school {
    color: var(--hq-orange);
    font-weight: 600;
}

.modal-body {
    padding: 2rem;
}

.modal-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.modal-stat-card {
    background: var(--hq-light-gray);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.modal-stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--hq-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.modal-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--hq-black);
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section-title {
    font-family: 'Bangers', cursive;
    font-size: 1.5rem;
    color: var(--hq-orange);
    margin: 0 0 1rem;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-section-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--hq-dark-gray);
    white-space: pre-line;
}

.modal-abilities-grid {
    display: grid;
    gap: 1rem;
}

.modal-ability-card {
    background: var(--hq-light-gray);
    padding: 1rem;
    border-radius: 10px;
    display: flex;
    align-items: start;
    gap: 1rem;
    transition: all 0.3s ease;
}

.modal-ability-card:hover {
    transform: translateX(5px);
    background: rgba(255, 107, 53, 0.1);
}

.modal-ability-icon {
    width: 35px;
    height: 35px;
    background: var(--hq-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hq-white);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.modal-ability-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .character-modal {
        padding: 1rem;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 2.5rem 1.5rem 1.5rem;
    }
    
    .modal-name {
        font-size: 2rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-stats {
        grid-template-columns: 1fr;
    }
}

.character-rank {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 45px;
    height: 45px;
    background: var(--hq-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bangers', cursive;
    font-size: 1.3rem;
    color: var(--hq-white);
    box-shadow: var(--shadow-md);
    z-index: 100;
}

.character-header {
    background: linear-gradient(135deg, var(--hq-black) 0%, var(--hq-dark-gray) 100%);
    padding: 2rem 1.5rem 1.5rem;
    position: relative;
}

.character-tier {
    position: absolute;
    top: 4rem;
    right: 0.75rem;
    z-index: 2;
}

.character-name {
    font-family: 'Bangers', cursive;
    font-size: 1.8rem;
    color: var(--hq-white);
    margin: 0 0 0.5rem;
    letter-spacing: 0.05em;
}

.character-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.character-school {
    color: var(--hq-orange);
    font-weight: 600;
}

.character-body {
    padding: 1.5rem;
}

.character-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--hq-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--hq-black);
}

.character-section {
    margin-bottom: 1.5rem;
}

.character-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--hq-orange);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-content {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--hq-dark-gray);
}

.abilities-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ability-item {
    display: flex;
    align-items: start;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--hq-light-gray);
    border-radius: 6px;
    font-size: 0.85rem;
}

.ability-item i {
    color: var(--hq-orange);
    margin-top: 0.15rem;
}

/* ===================================
   POSITION GUIDE
   =================================== */

.position-guide {
    background: var(--hq-white);
    border-radius: 16px;
    padding: 3rem 2rem;
    margin-top: 4rem;
    box-shadow: var(--shadow-md);
}

.position-guide h2 {
    font-family: 'Bangers', cursive;
    font-size: 2.5rem;
    color: var(--hq-black);
    text-align: center;
    margin: 0 0 3rem;
    letter-spacing: 0.05em;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.guide-card {
    background: var(--hq-light-gray);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

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

.guide-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--hq-white);
    box-shadow: var(--shadow-md);
}

.guide-icon.levantador { background: linear-gradient(135deg, #9c27b0, #7b1fa2); }
.guide-icon.ponta { background: linear-gradient(135deg, #ff6b35, #ff4500); }
.guide-icon.oposto { background: linear-gradient(135deg, #ff1744, #f50057); }
.guide-icon.central { background: linear-gradient(135deg, #3f51b5, #283593); }
.guide-icon.libero { background: linear-gradient(135deg, #00bcd4, #0097a7); }

.guide-card h3 {
    font-family: 'Bangers', cursive;
    font-size: 1.5rem;
    color: var(--hq-black);
    margin: 0 0 0.75rem;
    letter-spacing: 0.05em;
}

.guide-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--hq-dark-gray);
    margin: 0;
}

.rotation-info {
    background: linear-gradient(135deg, var(--hq-orange), var(--hq-dark-orange));
    border-radius: 12px;
    padding: 2rem;
    color: var(--hq-white);
    text-align: center;
}

.rotation-info h3 {
    font-family: 'Bangers', cursive;
    font-size: 2rem;
    margin: 0 0 1rem;
    letter-spacing: 0.05em;
}

.rotation-info p {
    font-size: 1rem;
    line-height: 1.8;
    margin: 0;
    max-width: 800px;
    margin: 0 auto;
}

/* ===================================
   FOOTER
   =================================== */

.footer {
    background: var(--hq-black);
    color: var(--hq-white);
    padding: 2rem 0;
    text-align: center;
}

.footer-content p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.footer-note {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem !important;
}

/* ===================================
   SCROLL TO TOP
   =================================== */

.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--hq-orange);
    color: var(--hq-white);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--hq-dark-orange);
    transform: translateY(-3px);
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .hero-header {
        padding: 6rem 1.5rem 3rem;
    }
    
    .page-title {
        font-size: 2.5rem;
    }
    
    .view-toggle {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .toggle-btn {
        width: 100%;
        justify-content: center;
    }
    
    .position-selector {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .position-btn {
        width: 100%;
        justify-content: center;
    }
    
    .characters-list {
        grid-template-columns: 1fr;
    }
    
    .tier-items {
        grid-template-columns: 1fr;
    }
    
    .guide-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .character-stats {
        grid-template-columns: 1fr;
    }
}