/* ========================================
   CHARACTER PAGE STYLES - LEONIDA BRASIL
   ======================================== */

/* Character Container */
.character-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    position: relative;
}

/* ========================================
   CHARACTER HEADER
   ======================================== */

.character-header {
    margin-bottom: 32px;
}

.character-hero {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 24px;
    position: relative;
    height: 400px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6) blur(2px);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 0, 127, 0.7) 0%, 
        rgba(0, 191, 255, 0.7) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 32px;
    gap: 32px;
}

.character-avatar {
    position: relative;
    flex-shrink: 0;
}

.character-image {
    width: 150px;
    height: 150px;
    border-radius: 16px;
    border: 4px solid white;
    box-shadow: var(--shadow-lg);
    object-fit: cover;
}

.character-status {
    position: absolute;
    bottom: -8px;
    right: -8px;
    background: var(--color-success);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
}

.character-status.confirmed {
    background: var(--color-success);
}

.character-status.rumor {
    background: var(--color-warning);
}

.character-status.theory {
    background: #a55eea;
}

.character-info {
    flex: 1;
    color: white;
}

.character-title h1 {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.character-subtitle {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 20px;
}

.character-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 24px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.meta-item .fa {
    color: var(--color-accent);
    font-size: 16px;
}

.character-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    border: none;
}

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

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

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

/* Character Stats */
.character-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.stat-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

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

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
}

.stat-info {
    flex: 1;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.stat-meta {
    font-size: 10px;
    color: var(--text-light);
}

/* ========================================
   CHARACTER CONTENT
   ======================================== */

.character-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    align-items: flex-start;
}

/* ========================================
   CHARACTER SECTIONS
   ======================================== */

.character-section {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.section-header {
    background: var(--bg-light);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header .fa {
    color: var(--color-primary);
    font-size: 16px;
}

.section-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 11px;
}

/* Overview Section */
.overview-content {
    padding: 24px;
}

.character-description {
    margin-bottom: 24px;
}

.character-description p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.quick-facts h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.facts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.fact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--bg-light);
}

.fact-label {
    font-size: 12px;
    color: var(--text-medium);
    font-weight: 500;
}

.fact-value {
    font-size: 12px;
    color: var(--text-dark);
    font-weight: 600;
}

.character-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.character-link:hover {
    text-decoration: underline;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
}

.status-badge.confirmed {
    background: var(--color-success);
}

/* Abilities Section */
.abilities-content {
    padding: 24px;
}

.abilities-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.ability-card {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 16px;
    transition: all 0.3s ease;
}

.ability-card:hover {
    background: white;
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.ability-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-bottom: 12px;
}

.ability-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.ability-bar {
    background: var(--bg-lighter);
    height: 6px;
    border-radius: 3px;
    margin-bottom: 8px;
    overflow: hidden;
}

.ability-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 3px;
    transition: width 1s ease;
}

.ability-info p {
    font-size: 11px;
    color: var(--text-medium);
    line-height: 1.4;
}

/* Timeline Section */
.timeline-content {
    padding: 24px;
}

.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-light);
}

.timeline-item {
    position: relative;
    margin-bottom: 32px;
    padding-left: 40px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -30px;
    top: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border: 4px solid white;
    box-shadow: var(--shadow-sm);
}

.timeline-item.upcoming .timeline-marker {
    background: var(--color-warning);
}

.timeline-content-item {
    background: var(--bg-light);
    padding: 16px;
    border-radius: 8px;
    border-left: 3px solid var(--color-primary);
}

.timeline-item.upcoming .timeline-content-item {
    border-left-color: var(--color-warning);
}

.timeline-date {
    font-size: 11px;
    color: var(--color-primary);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.timeline-item.upcoming .timeline-date {
    color: var(--color-warning);
}

.timeline-content-item h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.timeline-content-item p {
    font-size: 12px;
    color: var(--text-medium);
    line-height: 1.4;
}

/* Related Section */
.related-content {
    padding: 24px;
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.related-card {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.related-card:hover {
    background: white;
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.related-image {
    position: relative;
    flex-shrink: 0;
}

.related-image img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.relationship-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: white;
    border: 2px solid white;
}

.relationship-badge.partner {
    background: var(--color-danger);
}

.relationship-badge.enemy {
    background: #333;
}

.related-info {
    flex: 1;
}

.related-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.relationship {
    font-size: 11px;
    color: var(--color-primary);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 6px;
    display: block;
}

.related-info p {
    font-size: 11px;
    color: var(--text-medium);
    line-height: 1.4;
    margin-bottom: 8px;
}

.view-character {
    font-size: 10px;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
}

.view-character:hover {
    text-decoration: underline;
}

/* Gallery Section */
.gallery-content {
    padding: 24px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-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: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-view {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-view:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.gallery-info {
    position: absolute;
    bottom: 8px;
    left: 8px;
}

.gallery-type {
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
}

/* ========================================
   SIDEBAR
   ======================================== */

.content-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 80px;
    height: fit-content;
}

.sidebar-widget {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.widget-header {
    background: var(--color-primary);
    color: white;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
}

.widget-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-content {
    padding: 16px;
}

/* Character Navigation */
.character-nav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-medium);
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.nav-link.active {
    background: var(--color-primary);
    color: white;
}

/* Character Tags */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
    cursor: pointer;
}

.tag-item:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-1px);
}

.tag-item.protagonist {
    background: var(--color-primary);
    color: white;
}

.tag-item.confirmed {
    background: var(--color-success);
    color: white;
}

/* Recent Activity */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.activity-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.activity-text {
    font-size: 11px;
    color: var(--text-dark);
    font-weight: 500;
}

.activity-time {
    font-size: 9px;
    color: var(--text-light);
}

/* Character Stats Widget */
.stats-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid var(--bg-light);
    font-size: 11px;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--text-medium);
}

.stat-value {
    color: var(--text-dark);
    font-weight: 600;
}

/* Related Links */
.links-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.related-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-medium);
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.related-link:hover {
    background: var(--bg-light);
    color: var(--color-primary);
}

.related-link .fa {
    color: var(--color-primary);
    width: 16px;
    text-align: center;
}

/* ========================================
   BACK TO HUB
   ======================================== */

.back-to-hub {
    margin-top: 32px;
    text-align: center;
}

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

@media (max-width: 1024px) {
    .character-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .content-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 16px;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .character-meta {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .character-container {
        padding: 16px;
    }
    
    .character-hero {
        height: auto;
        min-height: 350px;
    }
    
    .hero-content {
        padding: 24px 20px;
    }
    
    .character-title h1 {
        font-size: 32px;
    }
    
    .character-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .facts-grid {
        grid-template-columns: 1fr;
    }
    
    .abilities-grid {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .content-sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .character-title h1 {
        font-size: 24px;
    }
    
    .character-stats {
        grid-template-columns: 1fr;
    }
    
    .character-meta {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    .character-actions {
        justify-content: center;
        width: 100%;
    }
    
    .btn {
        flex: 1;
        justify-content: center;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .timeline {
        padding-left: 30px;
    }
    
    .timeline::before {
        left: 15px;
    }
    
    .timeline-marker {
        left: -25px;
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .timeline-item {
        padding-left: 30px;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.character-section {
    animation: fadeInUp 0.6s ease-out;
}

.character-section:nth-child(2) { animation-delay: 0.1s; }
.character-section:nth-child(3) { animation-delay: 0.2s; }
.character-section:nth-child(4) { animation-delay: 0.3s; }
.character-section:nth-child(5) { animation-delay: 0.4s; }

.sidebar-widget {
    animation: slideInLeft 0.6s ease-out;
}

.sidebar-widget:nth-child(2) { animation-delay: 0.1s; }
.sidebar-widget:nth-child(3) { animation-delay: 0.2s; }
.sidebar-widget:nth-child(4) { animation-delay: 0.3s; }
.sidebar-widget:nth-child(5) { animation-delay: 0.4s; }

.ability-fill {
    animation: fillBar 2s ease-out 0.5s both;
}

@keyframes fillBar {
    from {
        width: 0;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    .character-hero,
    .character-section,
    .sidebar-widget {
        border-width: 2px;
    }
}

/* Focus indicators */
.btn:focus-visible,
.nav-link:focus-visible,
.gallery-item:focus-visible,
.related-link:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ========================================
   LIGHTBOX
   ======================================== */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.show {
    opacity: 1;
}

.lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    margin: 0 auto;
}

.lightbox-caption {
    padding: 16px;
    text-align: center;
    font-size: 14px;
    color: var(--text-dark);
    background: white;
}

/* ========================================
   EDIT MODAL
   ======================================== */

.edit-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.edit-modal-overlay.show {
    opacity: 1;
}

.edit-modal {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.edit-modal-overlay.show .edit-modal {
    transform: scale(1);
}

.modal-header {
    background: var(--color-primary);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-body {
    padding: 20px;
}

.edit-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(255, 0, 127, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

/* ========================================
   RATING SYSTEM
   ======================================== */

.character-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.rating-label {
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.rating-stars {
    display: flex;
    gap: 4px;
}

.star {
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.3);
    font-size: 18px;
}

.star:hover,
.star.hover {
    color: var(--color-accent);
    transform: scale(1.2);
}

.star.active {
    color: var(--color-accent);
}

.rating-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* ========================================
   NOTIFICATION SYSTEM
   ======================================== */

#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    border-left: 4px solid;
    min-width: 300px;
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left-color: var(--color-success);
}

.notification.error {
    border-left-color: var(--color-danger);
}

.notification.warning {
    border-left-color: var(--color-warning);
}

.notification.info {
    border-left-color: var(--color-info);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
}

.notification-content .fa {
    font-size: 16px;
    flex-shrink: 0;
}

.notification.success .fa {
    color: var(--color-success);
}

.notification.error .fa {
    color: var(--color-danger);
}

.notification.warning .fa {
    color: var(--color-warning);
}

.notification.info .fa {
    color: var(--color-info);
}

.notification-message {
    flex: 1;
    font-size: 13px;
    color: var(--text-dark);
    font-weight: 500;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

/* ========================================
   PULSE ANIMATION
   ======================================== */

.pulse {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ========================================
   FAVORITED STATE
   ======================================== */

.favorite-btn.favorited {
    background: var(--color-danger) !important;
    border-color: var(--color-danger) !important;
}

.favorite-btn.favorited:hover {
    background: #c82333 !important;
}

/* ========================================
   LOADING STATES
   ======================================== */

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* ========================================
   ENTRANCE ANIMATIONS
   ======================================== */

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

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

@media (max-width: 480px) {
    #notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .notification {
        min-width: auto;
        max-width: none;
    }
    
    .lightbox-container {
        max-width: 95vw;
        max-height: 95vh;
        margin: 20px;
    }
    
    .edit-modal {
        width: 95%;
        margin: 20px;
    }
    
    .character-rating {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .rating-stars {
        justify-content: center;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   HOVER EFFECTS
   ======================================== */

.character-section:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.sidebar-widget:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.timeline-item:hover .timeline-marker {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.timeline-item:hover .timeline-content-item {
    background: white;
    box-shadow: var(--shadow-sm);
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--color-primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10001;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 6px;
}

/* High contrast mode improvements */
@media (prefers-contrast: high) {
    .character-status,
    .news-badge,
    .status-badge {
        border: 2px solid white;
        font-weight: 700;
    }
    
    .ability-bar {
        border: 1px solid var(--text-dark);
    }
    
    .timeline-marker {
        border-width: 3px;
    }
}

/* Focus improvements */
.character-section:focus-within {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.gallery-item:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 8px;
}

.star:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: 50%;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .character-actions,
    .section-actions,
    .content-sidebar,
    .back-to-hub,
    .gallery-overlay,
    .notification,
    .lightbox-overlay,
    .edit-modal-overlay {
        display: none !important;
    }
    
    .character-container {
        max-width: 100%;
        padding: 0;
    }
    
    .character-content {
        grid-template-columns: 1fr;
    }
    
    .character-hero {
        height: auto;
        min-height: 200px;
        page-break-inside: avoid;
    }
    
    .character-section {
        page-break-inside: avoid;
        margin-bottom: 20px;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .hero-overlay {
        background: rgba(0, 0, 0, 0.3) !important;
    }
    
    .character-title h1 {
        color: white !important;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.8) !important;
    }
    
    .character-meta,
    .character-subtitle {
        color: white !important;
    }
    
    .timeline::before {
        background: #333 !important;
    }
    
    .timeline-marker {
        background: #333 !important;
        border-color: white !important;
    }
}



/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* GPU acceleration for animations */
.character-section,
.sidebar-widget,
.gallery-item,
.timeline-marker,
.star,
.notification {
    will-change: transform;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .character-section,
    .sidebar-widget,
    .gallery-item,
    .timeline-marker,
    .star,
    .notification,
    .ability-fill {
        transition: none !important;
        animation: none !important;
    }
    
    .lightbox-overlay,
    .edit-modal-overlay {
        transition: opacity 0.1s ease !important;
    }
    
    .edit-modal {
        transition: transform 0.1s ease !important;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   LOADING SKELETON (OPTIONAL)
   ======================================== */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
    border-radius: 4px;
}

.skeleton-title {
    height: 2em;
    margin-bottom: 1em;
    border-radius: 4px;
}

.skeleton-image {
    aspect-ratio: 16/9;
    border-radius: 8px;
}

/* ========================================
   ERROR STATES
   ======================================== */

.error-message {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    color: #e53e3e;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-message .fa {
    color: #e53e3e;
    font-size: 16px;
}

.retry-button {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-left: auto;
    transition: background 0.3s ease;
}

.retry-button:hover {
    background: #c53030;
}

/* ========================================
   CUSTOM SCROLLBAR FOR CONTENT AREAS
   ======================================== */

.character-section,
.sidebar-widget {
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) var(--bg-light);
}

.character-section::-webkit-scrollbar,
.sidebar-widget::-webkit-scrollbar {
    width: 6px;
}

.character-section::-webkit-scrollbar-track,
.sidebar-widget::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 3px;
}

.character-section::-webkit-scrollbar-thumb,
.sidebar-widget::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 3px;
}

.character-section::-webkit-scrollbar-thumb:hover,
.sidebar-widget::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-dark);
}