* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Performance optimizations for smoother rendering */
html {
    /* Enable smooth scrolling */
    scroll-behavior: smooth;
    /* Allow pull-to-refresh on mobile */
    overscroll-behavior-x: none;
    overscroll-behavior-y: auto;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #000000 100%);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px 20px 60px 20px;
    position: relative;
    /* Esconde conteúdo até traduções estarem prontas - previne flash */
    opacity: 0;
    transition: opacity 0.15s ease-in;
    /* Hardware acceleration */
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.translations-ready {
    opacity: 1;
}

/* Ajuste de padding para mobile - evitar sobreposição com footer */
@media (max-width: 768px) {
    body {
        padding-bottom: 100px;
    }
}

/* Logo */
.logo-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    padding: 12px 15px;
    border-radius: 15px;
    /*box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);*/
    transition: all 0.3s ease;
}

.logo-container:hover {
    transform: scale(1.05);
    /*box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);*/
}

.logo-container a {
    display: block;
    line-height: 0;
}

.site-logo {
    display: block;
    height: 60px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

/* Seletor de idioma */
.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
}

.language-selector label {
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
}

.language-selector select {
    padding: 8px 16px;
    border: 2px solid #667eea;
    border-radius: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    text-align: center;
}

.language-selector select:hover {
    border-color: #764ba2;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.25);
    transform: translateY(-1px);
}

.language-selector select:focus {
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.2), 0 4px 12px rgba(118, 75, 162, 0.25);
}

.language-selector select option {
    background: white;
    color: #333;
    padding: 10px;
    font-weight: 500;
}

.container {
    max-width: 1200px;
    width: 100%;
    text-align: center;
    padding-top: 150px;
}

h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: #f8f9fa;
}

.card h2 {
    color: #667eea;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.card p {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Footer dos cards com ícones */
.card-footer {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
}

.card-icon-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.card:hover .card-icon-group {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card:hover .card-icon-group .icon-label {
    color: white;
}

.card-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: grayscale(0%);
    transition: all 0.3s ease;
}

/*.card:hover .card-icon {
    filter: brightness(0) invert(1);
}*/

.icon-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #667eea;
    transition: all 0.3s ease;
}

.icon-label.cm-label {
    color: #dc3545;
    font-weight: 700;
}

.card:hover .icon-label.cm-label {
    color: #ff4757;
}

/* Estilos para páginas de menu */
.menu-container {
    max-width: 900px;
    width: 100%;
    padding-top: 100px;
}

.back-button {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.back-button:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Botão Voltar Fixo (canto inferior esquerdo) */
.back-button-fixed {
    position: fixed;
    bottom: 15px; /* Alinhado com o footer */
    left: 15px;
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000; /* Na frente do footer */
}

.back-button-fixed:hover {
    background: white;
    color: #667eea;
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Seções de Raid */
.raid-section {
    margin-bottom: 50px;
}

.raid-title {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Fractal Header with Filters */
.fractal-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.25);
}

.page-title-container {
    width: 100%;
}

.fractal-header h1 {
    margin: 0 0 8px 0;
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.page-info {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.info-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 15px;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.fractal-header h1 {
    margin: 0;
}

.fractal-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
}

/* Wrapper for filters and search */
.filters-and-search-wrapper {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #667eea;
    border-radius: 20px;
    background: white;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Tier buttons for fractals, raids, and strikes filters */
.tier-btn {
    padding: 10px 20px;
    border: 2px solid #667eea;
    border-radius: 20px;
    background: white;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.tier-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.tier-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Event Search Bar */
.event-search-container {
    position: relative;
    width: 300px;
    flex-shrink: 0;
}

.event-search-input {
    width: 100%;
    padding: 10px 45px 10px 20px;
    border: 2px solid #667eea;
    border-radius: 25px;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
    background: white;
    color: #333;
}

.event-search-input:focus {
    border-color: #764ba2;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.event-search-input::placeholder {
    color: #999;
}

.search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-icon:hover {
    color: #764ba2;
    transform: translateY(-50%) scale(1.1);
}

/* Responsive adjustments for filters and search */
@media (max-width: 768px) {
    .filters-and-search-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    
    .event-search-container {
        width: 100%;
        max-width: 100%;
    }
}

/* Fractal Tier Badges */
.fractal-tiers {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.tier-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    background: white;
    color: #666;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

/* Tier badges coloridos quando filtro está ativo */
.tier-badge.t1.active {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-color: #28a745;
}

.tier-badge.t2.active {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    border-color: #17a2b8;
}

.tier-badge.t3.active {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: white;
    border-color: #ffc107;
}

.tier-badge.t4.active {
    background: linear-gradient(135deg, #d35f12 0%, #d35f12 100%);
    color: white;
    border-color: #d35f12;
}

.tier-badge.cm.active,
.tier-badge.CM.active {
    background: linear-gradient(135deg, #d30101 0%, #d30101 100%);
    color: white;
    border-color: #d30101;
}

/* Fractal card hidden state */
.fractal-card.hidden {
    display: none;
}

.cards-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.list-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    padding: 25px;
    border-radius: 12px;
    text-align: left;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.list-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.list-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

.list-card:hover::before {
    transform: scaleY(1);
}

.list-card h3 {
    color: #667eea;
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.list-card:hover h3 {
    color: #764ba2;
}

.list-card p {
    color: #666;
    line-height: 1.6;
    min-height: 48px; 
    display: flex;
    align-items: flex-start;
    font-size: 0.95rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cards-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .card {
        min-height: 150px;
    }
    
    .card h2 {
        font-size: 1.5rem;
    }
    
    .card-footer {
        gap: 10px;
        padding-top: 10px;
    }
    
    .card-icon-group {
        gap: 5px;
        padding: 6px 10px;
    }
    
    .card-icon {
        width: 20px;
        height: 20px;
    }
    
    .icon-label {
        font-size: 0.8rem;
    }
    
    .logo-container {
        top: 10px;
        left: 10px;
        padding: 8px 10px;
    }
    
    .site-logo {
        height: 40px;
        max-width: 120px;
    }
    
    .language-selector {
        top: 10px;
        right: 10px;
        padding: 8px 15px;
        flex-direction: column;
        gap: 5px;
    }
    
    .language-selector label {
        font-size: 0.8rem;
    }
    
    .language-selector select {
        font-size: 0.8rem;
        padding: 5px 10px;
        text-align: center;
    }
}

/* Estilos para páginas de detalhes com flashcards */
.detail-header {
    text-align: center;
    margin-bottom: 30px;
}

.detail-header h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.detail-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* Novo header para páginas de detalhes */
.detail-page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-page-header .header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
}

.detail-page-header .header-title {
    flex: 1;
    min-width: 200px;
    text-align: left;
}

.detail-page-header .header-title {
    flex: 1;
    min-width: 200px;
}

.detail-page-header h1 {
    color: white;
    font-size: 2.2rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 700;
}

.detail-page-header .header-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin: 0;
    font-weight: 500;
}

.detail-page-header .header-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Botão de favorito no header */
.header-favorite-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    /* Hardware acceleration */
    will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.header-favorite-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.3), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.header-favorite-btn:hover::before {
    width: 100px;
    height: 100px;
}

.header-favorite-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 8px 20px rgba(118, 75, 162, 0.3);
}

.header-favorite-btn svg {
    width: 22px;
    height: 22px;
    stroke: #ffffff;
    fill: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    /* Hardware acceleration */
    will-change: transform;
}

.header-favorite-btn:hover svg {
    transform: scale(1.2);
    stroke: #ffd1dc;
}

.header-favorite-btn:focus,
.header-favorite-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.5), 0 8px 20px rgba(118, 75, 162, 0.3);
    border-color: rgba(255, 255, 255, 0.7);
}

/* Estado ativo (favoritado) */
.header-favorite-btn.active,
button.header-favorite-btn.active,
.detail-page-header .header-favorite-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-color: #ffffff !important;
    box-shadow: 0 6px 25px rgba(118, 75, 162, 0.6), 0 0 0 2px rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.05);
}

.header-favorite-btn.active svg,
button.header-favorite-btn.active svg,
.detail-page-header .header-favorite-btn.active svg {
    fill: #ff3366 !important;
    stroke: #ffffff !important;
    filter: drop-shadow(0 2px 6px rgba(255, 51, 102, 0.4));
}

.header-favorite-btn.active:hover,
button.header-favorite-btn.active:hover,
.detail-page-header .header-favorite-btn.active:hover {
    transform: scale(1.15) rotate(5deg) !important;
    box-shadow: 0 8px 30px rgba(118, 75, 162, 0.7), 0 0 0 3px rgba(255, 255, 255, 0.4) !important;
}

.header-favorite-btn.active:hover svg {
    transform: scale(1.3);
    fill: #ff6b9d !important;
}

/* Animações melhoradas - Otimizadas para mobile */
@keyframes heartBeat {
    0% { 
        transform: scale(1) translateZ(0); 
    }
    15% { 
        transform: scale(1.35) rotate(-3deg) translateZ(0); 
    }
    30% { 
        transform: scale(0.95) rotate(2deg) translateZ(0); 
    }
    45% { 
        transform: scale(1.25) rotate(-2deg) translateZ(0); 
    }
    60% { 
        transform: scale(0.98) rotate(1deg) translateZ(0); 
    }
    75% { 
        transform: scale(1.1) translateZ(0); 
    }
    100% { 
        transform: scale(1) rotate(0deg) translateZ(0); 
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 6px 25px rgba(118, 75, 162, 0.6), 0 0 0 2px rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 0 8px 35px rgba(255, 51, 102, 0.8), 0 0 0 3px rgba(255, 255, 255, 0.5);
    }
}

.header-favorite-btn.adding-favorite {
    animation: heartBeat 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), pulseGlow 0.8s ease-in-out !important;
    transition: none !important;
    pointer-events: none;
    /* Force hardware acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

.header-favorite-btn.adding-favorite svg {
    transition: none !important;
    /* Force hardware acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
}

/* Otimização específica para mobile - animação mais simples */
@media (max-width: 768px) {
    @keyframes heartBeatMobile {
        0% { 
            transform: scale(1) translateZ(0); 
        }
        25% { 
            transform: scale(1.2) translateZ(0); 
        }
        50% { 
            transform: scale(0.95) translateZ(0); 
        }
        75% { 
            transform: scale(1.1) translateZ(0); 
        }
        100% { 
            transform: scale(1) translateZ(0); 
        }
    }
    
    .header-favorite-btn.adding-favorite {
        /* Animação simplificada para mobile */
        animation: heartBeatMobile 0.5s ease-out !important;
        transition: none !important;
        pointer-events: none;
        /* Remove backdrop-filter durante animação para melhor performance */
        backdrop-filter: none;
    }
    
    /* Desabilitar ::before durante animação no mobile */
    .header-favorite-btn.adding-favorite::before {
        display: none;
    }
}

/* Partículas de coração ao adicionar */
@keyframes particleFloat {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-40px) scale(0) rotate(180deg);
        opacity: 0;
    }
}

.header-favorite-btn.adding-favorite::after {
    content: '♥';
    position: absolute;
    font-size: 12px;
    color: #ff3366;
    animation: particleFloat 0.8s ease-out forwards;
    pointer-events: none;
}

/* Animação ao remover dos favoritos */
@keyframes heartBreak {
    0% { 
        transform: scale(1) rotate(0deg); 
    }
    20% { 
        transform: scale(1.2) rotate(-10deg); 
    }
    40% { 
        transform: scale(0.9) rotate(10deg); 
    }
    60% { 
        transform: scale(1.1) rotate(-5deg); 
    }
    80% { 
        transform: scale(0.95) rotate(5deg); 
    }
    100% { 
        transform: scale(1) rotate(0deg); 
    }
}

@keyframes fadeOutGlow {
    0% {
        box-shadow: 0 6px 25px rgba(255, 51, 102, 0.6), 0 0 0 2px rgba(255, 255, 255, 0.3);
    }
    100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 0 0 0px rgba(255, 255, 255, 0);
    }
}

.header-favorite-btn.removing-favorite {
    animation: heartBreak 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), fadeOutGlow 0.6s ease-out !important;
    transition: none !important;
    pointer-events: none;
}

.header-favorite-btn.removing-favorite svg {
    animation: fadeOutHeart 0.6s ease-out !important;
    transition: none !important;
}

@keyframes fadeOutHeart {
    0% {
        fill: #ff3366;
        stroke: #ffffff;
        opacity: 1;
    }
    50% {
        transform: scale(0.7);
        opacity: 0.5;
    }
    100% {
        fill: none;
        stroke: #ffffff;
        opacity: 1;
        transform: scale(1);
    }
}

.detail-page-header .view-mode-indicator {
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.detail-page-header .view-mode-indicator.normal-mode {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.detail-page-header .view-mode-indicator.cm-mode {
    color: #ffcccc;
    border-color: rgba(255, 53, 69, 0.4);
    background: rgba(255, 53, 69, 0.1);
}

.detail-page-header .header-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.detail-page-header .btn-primary, 
.detail-page-header .btn-secondary, 
.detail-page-header .copy-all-btn,
.detail-page-header .btn-toggle-cm {
    padding: 10px 18px;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.detail-page-header .btn-primary {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
}

.detail-page-header .btn-primary:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.detail-page-header .btn-secondary {
    background: rgba(118, 75, 162, 0.9);
    color: white;
    display: none; /* Oculto por padrão */
}

body.cm-mode-active .detail-page-header .btn-secondary {
    display: inline-block; /* Mostra quando CM está ativo */
}

.detail-page-header .btn-secondary:hover {
    background: #5a3680;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(118, 75, 162, 0.4);
}

.detail-page-header .copy-all-btn {
    background: rgba(40, 167, 69, 0.9);
    color: white;
}

.detail-page-header .copy-all-btn:hover {
    background: #28a745;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.detail-page-header .btn-toggle-cm {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
}

.detail-page-header .btn-toggle-cm:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.detail-page-header .btn-toggle-cm.active-cm {
    background: linear-gradient(135deg, #dc3545 0%, #9b59b6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

.detail-page-header .btn-toggle-cm.active-cm:hover {
    background: linear-gradient(135deg, #c82333 0%, #8e44ad 100%);
    transform: translateY(-2px);
}

/* Responsividade para o novo header */
@media (max-width: 768px) {
    .detail-page-header {
        padding: 15px 20px;
    }
    
    .detail-page-header .header-top {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .detail-page-header h1 {
        font-size: 1.8rem;
    }
    
    .detail-page-header .header-subtitle {
        font-size: 0.9rem;
    }
    
    .detail-page-header .header-actions {
        justify-content: center;
    }
    
    .detail-page-header .header-buttons {
        justify-content: center;
        gap: 8px;
    }
    
    .detail-page-header .btn-primary, 
    .detail-page-header .btn-secondary, 
    .detail-page-header .copy-all-btn,
    .detail-page-header .btn-toggle-cm {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    
    /* Otimizações específicas para o botão de favorito no mobile */
    .header-favorite-btn {
        /* Remover backdrop-filter pesado no mobile */
        backdrop-filter: none;
        background: rgba(255, 255, 255, 0.2);
        /* Otimizar para toque */
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* Desabilitar hover effects no mobile */
    .header-favorite-btn:hover {
        transform: none;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.3);
    }
    
    .header-favorite-btn:hover::before {
        width: 0;
        height: 0;
    }
    
    .header-favorite-btn:hover svg {
        transform: none;
        stroke: #ffffff;
    }
    
    /* Estado ativo no mobile - mais simples */
    .header-favorite-btn.active,
    button.header-favorite-btn.active,
    .detail-page-header .header-favorite-btn.active {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        border-color: #ffffff !important;
        box-shadow: 0 4px 15px rgba(118, 75, 162, 0.5) !important;
        transform: none !important;
    }
    
    .header-favorite-btn.active:hover,
    button.header-favorite-btn.active:hover,
    .detail-page-header .header-favorite-btn.active:hover {
        transform: none !important;
        box-shadow: 0 4px 15px rgba(118, 75, 162, 0.5) !important;
    }
}

.btn-primary, .btn-secondary, .copy-all-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: white;
    color: #667eea;
}

.btn-primary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #764ba2;
    color: white;
    display: none; /* Oculto por padrão */
}

body.cm-mode-active .btn-secondary {
    display: inline-block; /* Mostra quando CM está ativo */
}

.btn-secondary:hover {
    background: #5a3680;
    transform: translateY(-2px);
}

.copy-all-btn {
    background: #28a745;
    color: white;
}

.copy-all-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-toggle-cm {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background: white;
    color: #667eea;
}

.btn-toggle-cm:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.btn-toggle-cm.active-cm {
    background: linear-gradient(135deg, #dc3545 0%, #9b59b6 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.4);
}

.btn-toggle-cm.active-cm:hover {
    background: linear-gradient(135deg, #c82333 0%, #8e44ad 100%);
    transform: translateY(-2px);
}

/* Indicador de modo de visualização */
.view-mode-indicator {
    background: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    display: inline-block;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.view-mode-indicator.normal-mode {
    color: #667eea;
    border: 2px solid #667eea;
}

.view-mode-indicator.cm-mode {
    color: #dc3545;
    border: 2px solid #dc3545;
}

/* Flashcards */
.flashcards-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.flashcard {
    background: linear-gradient(to bottom right, #fafbfc 0%, #f4f6f8 100%);
    padding: 18px 20px;
    text-align: left;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
}

.flashcard::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px 0 0 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.flashcard:hover::before {
    opacity: 1;
}

.flashcard:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Flashcards no modo CM */
.flashcard.cm-mode-card {
    position: relative;
    background: linear-gradient(to bottom right, #fff9fa 0%, #fef2f3 100%);
    border: 2px solid rgba(220, 53, 69, 0.2);
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.12), 0 1px 4px rgba(220, 53, 69, 0.08);
}

.flashcard.cm-mode-card::before {
    background: linear-gradient(180deg, #dc3545 0%, #c82333 100%);
    width: 5px;
    opacity: 1;
}

/*.flashcard.cm-mode-card::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, #dc3545 0%, #9b59b6 100%);
    border-radius: 12px;
    z-index: -1;
    opacity: 0.8;
}

.flashcard.cm-mode-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #dc3545 0%, #9b59b6 50%, #dc3545 100%);
    background-size: 200% 100%;
    animation: gradientMove 3s ease infinite;
    border-radius: 12px 12px 0 0;
}*/

@keyframes gradientMove {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.flashcard.cm-mode-card:hover {
    box-shadow: 0 4px 18px rgba(220, 53, 69, 0.18), 0 2px 8px rgba(220, 53, 69, 0.12);
    transform: translateY(-2px);
    border-color: rgba(220, 53, 69, 0.35);
}

.flashcard.cm-mode-card .flashcard-title {
    background: linear-gradient(135deg, #dc3545 0%, #9b59b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.flashcard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 12px;
}

.flashcard-title {
    color: #667eea;
    font-size: 1.25rem;
    margin: 0;
    flex: 1;
    font-weight: 600;
    line-height: 1.3;
}

.flashcard-title[contenteditable="true"] {
    outline: 2px dashed transparent;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.flashcard-title[contenteditable="true"]:focus {
    outline-color: #667eea;
    background: #f8f9fa;
}

/* Fix: Texto visível enquanto digita em modo CM */
.flashcard.cm-mode-card .flashcard-title[contenteditable="true"] {
    -webkit-text-fill-color: #dc3545;
    background: none;
    color: #dc3545;
}

.flashcard.cm-mode-card .flashcard-title[contenteditable="true"]:focus {
    -webkit-text-fill-color: #dc3545;
    background: #fff3f4;
    color: #dc3545;
}

.flashcard-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-copy, .btn-remove {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy {
    background: #17a2b8;
    color: white;
}

.btn-copy:hover {
    background: #138496;
    transform: scale(1.05);
}

.btn-remove {
    background: #dc3545;
    color: white;
}

.btn-remove:hover {
    background: #c82333;
    transform: scale(1.05);
}

.flashcard-description {
    color: #555;
    line-height: 1.5;
    font-size: 0.95rem;
    margin: 0;
    white-space: pre-line;
}

.flashcard-description[contenteditable="true"] {
    outline: 2px dashed transparent;
    padding: 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.flashcard-description[contenteditable="true"]:focus {
    outline-color: #667eea;
    background: #f8f9fa;
}

/* Placeholders para elementos contenteditable vazios */
.flashcard-title[contenteditable="true"].empty::before,
.flashcard-description[contenteditable="true"].empty::before {
    content: attr(data-placeholder);
    color: #aaa;
    font-style: italic;
    pointer-events: none;
}

.flashcard-title[contenteditable="true"].empty:focus::before,
.flashcard-description[contenteditable="true"].empty:focus::before {
    content: '';
}

.flashcard.editable {
    border-left: 4px solid #667eea;
}

/* Responsividade para páginas de detalhes */
@media (max-width: 768px) {
    .detail-header h1 {
        font-size: 2rem;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-primary, .btn-secondary, .copy-all-btn {
        width: 100%;
    }
    
    .flashcard-header {
        flex-direction: column;
    }
    
    .flashcard-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Rodapé - SEMPRE VISÍVEL NA PARTE INFERIOR DA TELA */
.site-footer {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    padding: 4px 8px;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
    z-index: 9999 !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
    /* Performance optimization */
    transform: translateZ(0);
    will-change: transform;
    /* Force visibility */
    visibility: visible !important;
    opacity: 1 !important;
}

.footer-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: space-between; /* Mudado de flex-end para space-between */
    max-width: 100%;
    width: 100%;
    padding: 0 15px;
}

.site-footer .back-button {
    margin-bottom: 0;
    margin-right: auto; /* Empurra o botão para a esquerda */
    flex-shrink: 0;
    order: -1; /* Sempre primeiro */
}

.discord-banner {
    order: 1;
    margin-left: auto; /* Empurra para a direita */
}

.footer-divider {
    order: 2;
}

.footer-info {
    order: 3;
}

.discord-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.discord-banner:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.discord-logo {
    height: 32px;
    width: auto;
}

.discord-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.discord-text span:first-child {
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
}

.discord-text span:last-child {
    font-size: 0.95rem;
    color: #5865F2;
    font-weight: 700;
}

.footer-info {
    color: white;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.4;
}

.footer-info p {
    margin: 3px 0;
}

.footer-info strong {
    font-weight: 700;
    font-size: 0.85rem;
}

.footer-text-clickable {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.footer-text-clickable:hover {
    opacity: 0.7;
}

.footer-divider {
    width: 2px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
}

/* Responsividade do rodapé - Resoluções maiores */
@media (min-width: 1440px) {
    .site-footer {
        padding: 10px;
    }
    
    /*.footer-content {
        gap: 30px;
        max-width: 800px;
        padding: 0 20px;
    }*/
    
    .discord-banner {
        padding: 10px 20px;
        gap: 15px;
    }
    
    .discord-logo {
        height: 40px;
    }
    
    .discord-text span:first-child {
        font-size: 0.85rem;
    }
    
    .discord-text span:last-child {
        font-size: 1.1rem;
    }
    
    .footer-info {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .footer-info p {
        margin: 5px 0;
    }
    
    .footer-info strong {
        font-size: 1rem;
    }
    
    .footer-divider {
        height: 50px;
    }
}

/* Responsividade do rodapé - Tablets e menores */
@media (max-width: 768px) {
    .site-footer {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        padding: 15px 10px;
        gap: 15px;
    }
    
    .footer-content {
        gap: 15px;
    }
    
    .discord-banner {
        padding: 8px 15px;
        gap: 10px;
    }
    
    .discord-logo {
        height: 30px;
    }
    
    .discord-text span:first-child {
        font-size: 0.75rem;
    }
    
    .discord-text span:last-child {
        font-size: 0.95rem;
    }
    
    .footer-divider {
        display: none;
    }
}

/* Meta Events - Wiki Style Timers */
.event-timers-container {
    margin-top: 30px;
}

.event-category-section {
    margin-bottom: 40px;
}

.event-category-title {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.event-timer-table {
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-collapse: collapse;
}

.event-timer-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.event-timer-table thead th {
    color: white;
    font-weight: 600;
    padding: 15px;
    text-align: left;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-timer-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

.event-timer-table tbody tr:last-child {
    border-bottom: none;
}

.event-timer-table tbody tr:hover {
    background: #f8f9fa;
}

.event-timer-table tbody td {
    padding: 12px 15px;
    color: #333;
    font-size: 0.9rem;
}

.event-name-col {
    width: 35%;
}

.event-location-col {
    width: 30%;
}

.event-waypoint-col {
    width: 25%;
}

.event-next-col {
    width: 15%;
    text-align: center;
}

.event-countdown-col {
    width: 20%;
    text-align: center;
}

.event-name {
    font-weight: 600;
    color: #667eea;
}

.event-location {
    color: #666;
}

/* Estilo para waypoints clicáveis */
.event-waypoint {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #666;
}

.event-waypoint.has-waypoint {
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.event-waypoint.has-waypoint:hover {
    color: #764ba2;
    text-decoration: underline;
}

.event-waypoint.has-waypoint::before {
    content: "📍 ";
    margin-right: 3px;
}

/* Notificação de cópia */
.copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.copy-notification.success {
    background: #28a745;
    color: white;
}

.copy-notification.error {
    background: #dc3545;
    color: white;
}

.copy-notification.fade-out {
    animation: fadeOut 0.3s ease;
    opacity: 0;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.event-next-time {
    font-weight: 700;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: #333;
}

.event-countdown {
    font-weight: 600;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: #666;
}

/* Estilos de urgência para eventos próximos */
.event-timer-row.event-imminent {
    background: rgba(220, 53, 69, 0.08);
}

.event-timer-row.event-imminent:hover {
    background: rgba(220, 53, 69, 0.15);
}

.event-timer-row.event-imminent .event-next-time,
.event-timer-row.event-imminent .event-countdown {
    color: #dc3545;
    font-weight: 700;
}

.event-timer-row.event-soon {
    background: rgba(255, 193, 7, 0.08);
}

.event-timer-row.event-soon:hover {
    background: rgba(255, 193, 7, 0.15);
}

.event-timer-row.event-soon .event-next-time,
.event-timer-row.event-soon .event-countdown {
    color: #ff9800;
    font-weight: 700;
}

/* Responsividade para tabelas de meta events */
@media (max-width: 768px) {
    .event-timer-table {
        font-size: 0.85rem;
    }
    
    .event-timer-table thead th {
        padding: 10px 8px;
        font-size: 0.8rem;
    }
    
    .event-timer-table tbody td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
    
    .event-category-title {
        font-size: 1.4rem;
    }
    
    .event-name-col {
        width: 45%;
    }
    
    .event-location-col {
        display: none;
    }
    
    .event-waypoint-col {
        display: none;
    }
    
    .event-next-col {
        width: 20%;
    }
    
    .event-countdown-col {
        width: 35%;
    }
}

/* Mensagem de erro */
.error-message {
    background: #dc3545;
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin: 20px auto;
    max-width: 600px;
    font-weight: 600;
}

/* ===== EVENT BAR SYSTEM (Horizontal Timeline) ===== */

/* Category Group Container */
.event-category-group {
    margin-bottom: 50px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 25px;
    /* Removed heavy backdrop-filter for better performance */
    /* backdrop-filter: blur(15px); */
    border: 2px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    /* CSS Containment for performance */
    contain: layout style paint;
    content-visibility: auto;
}

.event-category-group-title {
    color: white;
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, #667eea 0%, #764ba2 50%, transparent 100%) 1;
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.5);
    letter-spacing: 0.5px;
}

.event-bar-section {
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px;
    /* Removed heavy backdrop-filter for better performance */
    /* backdrop-filter: blur(10px); */
    border: 1px solid rgba(255, 255, 255, 0.15);
    /* Performance optimizations */
    contain: layout paint;
    content-visibility: auto; /* Browser skips rendering when off-screen */
    transition: all 0.3s ease;
}

.event-bar-section:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateX(5px);
}

.event-bar-header {
    margin-bottom: 10px;
}

.event-bar-title {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.event-bar-timeline {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 8px 5px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* Performance optimizations for smooth scrolling */
    contain: layout style paint;
    will-change: scroll-position;
}

/* Custom scrollbar for timeline */
.event-bar-timeline::-webkit-scrollbar {
    height: 8px;
}

.event-bar-timeline::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.event-bar-timeline::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

.event-bar-timeline::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.event-card {
    min-width: 200px;
    max-width: 200px;
    background: white;
    border-radius: 8px;
    padding: 8px 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 4px;
    /* Performance optimizations */
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.event-card.event-active {
    border: 2px solid #28a745;
    box-shadow: 0 2px 12px rgba(40, 167, 69, 0.3);
}

.event-card.event-active::before {
    background: #28a745;
}

.event-card.event-imminent {
    border: 2px solid #ffc107;
}

.event-card.event-imminent::before {
    background: #ffc107;
}

/* Only animate on hover to reduce constant animations */
.event-card.event-active:hover {
    animation: pulse-green 1.5s ease-in-out;
}

.event-card.event-imminent:hover {
    animation: pulse-yellow 1.5s ease-in-out;
}

.event-card.event-soon {
    border: 2px solid #ff8c00;
}

.event-card.event-soon::before {
    background: #ff8c00;
}

/* Optimized animations - lighter and only on hover */
@keyframes pulse-green {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(40, 167, 69, 0.4);
        transform: translateZ(0) scale(1);
    }
    50% {
        box-shadow: 0 4px 30px rgba(40, 167, 69, 0.7);
        transform: translateZ(0) scale(1.02);
    }
}

@keyframes pulse-yellow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
        transform: translateZ(0) scale(1);
    }
    50% {
        box-shadow: 0 4px 20px rgba(255, 193, 7, 0.7);
        transform: translateZ(0) scale(1.02);
    }
}

@keyframes pulse-red {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
        transform: translateZ(0) scale(1);
    }
    50% {
        box-shadow: 0 4px 20px rgba(220, 53, 69, 0.6);
        transform: translateZ(0) scale(1.02);
    }
}

/* Disable animations if user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    .event-card,
    .event-card.event-active,
    .event-card.event-imminent {
        animation: none !important;
        transition: none !important;
    }
    
    .event-card:hover {
        transform: none;
    }
}

.event-card-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: #333;
    line-height: 1.15;
    min-height: 28px;
    display: flex;
    align-items: center;
}

.event-card-time {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.event-card-utc {
    font-size: 0.75rem;
    color: #666;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.event-card-countdown {
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.event-card-countdown.event-active-text {
    color: #28a745;
    font-weight: 900;
    font-size: 1rem;
    animation: pulse-text 1.5s infinite;
}

.event-card.event-imminent .event-card-countdown {
    color: #ffc107;
}

.event-card.event-soon .event-card-countdown {
    color: #ff8c00;
}

@keyframes pulse-text {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.event-card-waypoint {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #667eea;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
    word-break: break-all;
}

.event-card-waypoint:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.05);
}

.waypoint-icon {
    font-size: 1.1em;
}

.waypoint-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: all 0.2s ease;
}

.event-card-waypoint:hover .waypoint-icon-img {
    filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.8));
    transform: scale(1.15);
}

.event-card-duration {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(102, 126, 234, 0.9);
    color: white;
    padding: 3px 7px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Responsive para event bars */
@media (max-width: 768px) {
    .event-bar-section {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .event-bar-title {
        font-size: 0.95rem;
        flex-wrap: wrap;
    }
    
    .event-card {
        min-width: 170px;
        max-width: 170px;
        padding: 8px 10px;
    }
    
    .event-card-name {
        font-size: 0.8rem;
        min-height: 26px;
    }
    
    .event-card-countdown {
        font-size: 0.85rem;
    }
    
    .event-card-waypoint {
        font-size: 0.7rem;
        padding: 5px 7px;
    }
    
    .waypoint-icon-img {
        width: 20px;
        height: 20px;
    }
}

/* ===== PROFESSIONS TABLE ===== */
.professions-section {
    margin-top: 60px;
    margin-bottom: 40px;
}

.section-title {
    color: white;
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.professions-table {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.professions-table th,
.professions-table td {
    padding: 10px 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
    vertical-align: middle;
}

/* Header Row */
.header-row th {
    background: #667eea;
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    padding: 12px 8px;
    width: 60px;
}

.empty-header {
    background: rgba(102, 126, 234, 0.1) !important;
    width: 75px;
}

.role-header {
    font-size: 1.5rem;
    line-height: 1;
}

.role-icon-img {
    width: 20px;
    height: 20px;
    display: inline-block;
    margin: 2px;
    vertical-align: middle;
}

/* Profession Names */
.profession-name {
    font-size: 0.8rem;
    font-weight: 700;
    width: 75px;
    color: white;
    line-height: 1.3;
    padding: 8px 4px;
    vertical-align: middle;
}

.profession-name .prof-icon-img {
    display: block;
    width: 18px;
    height: 18px;
    margin: 0 auto 4px;
    border-radius: 4px;
}

.profession-name .prof-name {
    display: block;
    font-size: 0.7rem;
}

.profession-name.heavy-armor {
    background: #93976a;
}

.profession-name.medium-armor {
    background: #93af71;
}

.profession-name.light-armor {
    background: #868eb4;
}

/* Spec Cells */
.spec-cell {
    background: white;
    color: #667eea;
    font-size: 0.7rem;
    font-weight: 700;
    width: 70px;
    line-height: 1.2;
    transition: all 0.3s ease;
    padding: 8px 4px;
    vertical-align: middle;
    text-align: center;
}

.spec-cell:hover {
    background: #f0f4ff;
    transform: scale(1.05);
    cursor: pointer;
}

/* Spec Icons */
.spec-icon {
    width: 22px;
    height: 22px;
    display: inline-block;
    margin: 2px 1px;
    border-radius: 4px;
    transition: transform 0.2s ease;
    vertical-align: middle;
}

.spec-icon:hover {
    transform: scale(1.2);
}

/* Sublines */
.elite-subline {
    height: 0px;
    padding: 0 !important;
    background: rgba(102, 126, 234, 0.05);
    border: none !important;
    line-height: 0;
}

/* Icon Legend Accordion */
.icon-legend-accordion {
    max-width: 800px;
    margin: 30px auto 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.accordion-trigger:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.accordion-trigger:focus-visible {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

.accordion-title {
    color: white;
    font-size: 1.0rem;
    font-weight: 700;
    text-align: left;
}

.accordion-icon {
    color: white;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.accordion-trigger[aria-expanded="true"] .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: white;
}

.accordion-content.expanded {
    max-height: 2000px;
    transition: max-height 0.4s ease-in;
    overflow-y: auto;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 25px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.legend-item:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.legend-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.legend-text {
    flex: 1;
}

.legend-text strong {
    display: block;
    color: #667eea;
    font-size: 1rem;
    margin-bottom: 4px;
    font-weight: 700;
}

.legend-text p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

/* Estilos do Glossário */
.glossary-container {
    padding: 20px;
    background: #fafbfc;
}

.glossary-section {
    margin-bottom: 25px;
}

.glossary-section:last-of-type {
    margin-bottom: 15px;
}

.glossary-section h3 {
    color: #667eea;
    font-size: 1.2rem;
    margin: 0 0 12px 0;
    font-weight: 700;
    padding-bottom: 6px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}

.glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.glossary-item {
    background: white;
    padding: 12px 14px;
    border-radius: 8px;
    border-left: 3px solid #667eea;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-align: left;
}

.glossary-item:hover {
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.15);
    transform: translateX(3px);
}

.glossary-item strong {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.glossary-item strong .card-icon-group {
    margin: 0;
}

.glossary-item p {
    color: #666;
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

.glossary-note {
    background: linear-gradient(135deg, #fff3cd 0%, #fffbe6 100%);
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 3px solid #ffc107;
    margin-top: 10px;
    text-align: left;
}

.glossary-note p {
    color: #856404;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

.glossary-note strong {
    color: #856404;
}

.glossary-item strong {
    display: flex;
    align-items: center;
    gap: 6px; /* espaçamento entre o ícone e o texto */
}

.glossary-item .icon {
    width: 20px;
    height: 20px;
}

/* Links Úteis */
.useful-links-container {
    padding: 20px;
}

.links-section {
    margin-bottom: 25px;
}

.links-section:last-child {
    margin-bottom: 0;
}

.links-section h3 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
    text-align: left;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.link-item {
    display: block;
    padding: 12px 14px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: left;
}

.link-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #4a90e2;
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
}

.link-item strong {
    display: block;
    color: #4a90e2;
    font-size: 0.95rem;
    margin-bottom: 4px;
    font-weight: 700;
}

.link-item:hover strong {
    color: #2868c7;
}

.link-item p {
    color: #666;
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.3;
}

/* Responsividade para tabela de profissões */
@media (max-width: 1024px) {
    .professions-table th,
    .professions-table td {
        padding: 8px 4px;
    }
    
    .header-row th {
        font-size: 1.3rem;
        padding: 10px 5px;
        width: 50px;
    }
    
    .empty-header {
        width: 65px;
    }
    
    .role-icon-img {
        width: 18px;
        height: 18px;
        margin: 1px;
    }
    
    .profession-name {
        font-size: 0.7rem;
        width: 65px;
    }
    
    .profession-name .prof-icon-img {
        width: 16px;
        height: 16px;
        margin-bottom: 3px;
    }
    
    .profession-name .prof-name {
        font-size: 0.65rem;
    }
    
    .spec-cell {
        font-size: 0.6rem;
        width: 60px;
    }
    
    .spec-icon {
        width: 18px;
        height: 18px;
        margin: 1px;
    }
}

@media (max-width: 768px) {
    .professions-section {
        overflow-x: auto;
    }
    
    .professions-table {
        min-width: 800px;
    }
    
    .professions-table th,
    .professions-table td {
        padding: 6px 3px;
    }
    
    .header-row th {
        font-size: 1.1rem;
        padding: 8px 3px;
        width: 40px;
    }
    
    .empty-header {
        width: 60px;
    }
    
    .role-icon-img {
        width: 16px;
        height: 16px;
        margin: 1px;
    }
    
    .profession-name {
        font-size: 0.6rem;
        width: 60px;
        padding: 6px 3px;
    }
    
    .profession-name .prof-icon-img {
        width: 14px;
        height: 14px;
        margin-bottom: 2px;
    }
    
    .profession-name .prof-name {
        font-size: 0.55rem;
    }
    
    .spec-cell {
        font-size: 0.55rem;
        width: 50px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .elite-subline {
        height: 3px;
    }
    
    .spec-icon {
        width: 18px;
        height: 18px;
        margin: 1px;
    }
}

/* ============================================
   ÍCONE DE CONFIGURAÇÕES E MODAL
   ============================================ */

/* Botão de favoritos */
.favorites-button {
    position: fixed;
    top: 20px;
    right: 320px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1100;
    padding: 20px;
}

.favorites-button:hover {
    transform: scale(1.1) rotate(-10deg);
}

.favorites-button svg {
    stroke: #667eea;
    fill: none;
    transition: all 0.3s ease;
    width: 28px;
    height: 28px;
}

.favorites-button:hover svg {
    stroke: #764ba2;
    fill: #764ba2;
}

/* O botão de favoritos do topo NUNCA muda de aparência */
/* Ele apenas abre o modal, independente do estado de favorito */

/* Animação ao adicionar aos favoritos (não é usado no botão do topo) */
.favorites-button.adding-favorite {
    animation: heartBeat 0.6s ease-in-out;
}

/* Botão de ver lista de favoritos */
.view-favorites-button {
    position: fixed;
    top: 20px;
    right: 380px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 20px;
}

.view-favorites-button:hover {
    transform: scale(1.1);
}

.view-favorites-button svg {
    stroke: #667eea;
    fill: none;
    transition: all 0.3s ease;
    width: 28px;
    height: 28px;
}

.view-favorites-button:hover svg {
    stroke: #764ba2;
}

/* Botão de configurações (engrenagem) */
.settings-button {
    position: fixed;
    top: 20px;
    right: 260px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1100;
    padding: 20px;
}

.settings-button:hover {
    transform: scale(1.1) rotate(90deg);
}

.settings-button img,
.settings-button svg {
    width: 28px;
    height: 28px;
    display: block;
}

.settings-button svg {
    stroke: #667eea;
    transition: stroke 0.3s ease;
}

.settings-button:hover svg {
    stroke: #764ba2;
}

/* Modal de configurações - Optimized */
.settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: flex-start;
    justify-content: center;
    padding-top: 50px;
    animation: fadeIn 0.2s ease;
    /* Garantir que o modal sempre apareça no topo da viewport visível */
    overflow-y: auto;
    overflow-x: hidden;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.settings-modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.2s ease;
    /* Performance optimizations */
    will-change: transform, opacity;
    transform: translateZ(0);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.settings-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.settings-modal-header h2 {
    color: #667eea;
    font-size: 1.8rem;
    margin: 0;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal-btn:hover {
    color: #667eea;
    background: #f0f0f0;
}

.settings-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-option {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 15px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.settings-option:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.settings-option h3 {
    color: #667eea;
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-option p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

.settings-option button {
    margin-top: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.settings-option button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.settings-option button:active {
    transform: translateY(0);
}

/* Botões de ação das configurações (sem card) */
.settings-action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.reset-settings-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #e57373 0%, #ef5350 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(229, 115, 115, 0.3);
    font-size: 0.95rem;
}

.reset-settings-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 83, 80, 0.4);
}

.reset-settings-btn:active {
    transform: translateY(0);
}

/* ========================================
   NOVO SISTEMA DE SETTINGS - COMPACTO
   ======================================== */

/* Categorias do settings */
.settings-category {
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.settings-category:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.category-title {
    color: #667eea;
    font-size: 1rem;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.category-title svg {
    flex-shrink: 0;
}

/* Grid de botões compacto (2 colunas) */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.settings-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.settings-btn svg {
    flex-shrink: 0;
}

.export-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.import-btn {
    background: linear-gradient(135deg, #48c6ef 0%, #6f86d6 100%);
    color: white;
}

.import-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 198, 239, 0.4);
}

.settings-btn:active {
    transform: translateY(0);
}

/* Botão de reset com ícone */
.reset-settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Responsivo para mobile */
@media (max-width: 480px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-btn {
        font-size: 0.9rem;
        padding: 12px 16px;
    }
    
    .category-title {
        font-size: 0.95rem;
    }
}

/* Modal de Changelog - Optimized for performance */
.changelog-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    align-items: flex-start;
    justify-content: center;
    padding-top: 50px;
    /* Faster animation */
    animation: fadeIn 0.2s ease;
    /* Garantir que o modal sempre apareça no topo da viewport visível */
    overflow-y: auto;
    overflow-x: hidden;
}

.changelog-modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 650px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    /* Faster animation */
    animation: slideUp 0.2s ease;
    /* Performance optimizations */
    will-change: transform, opacity;
    transform: translateZ(0);
    /* Better scrolling performance */
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.changelog-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.changelog-modal-header h2 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.changelog-content {
    color: #333;
    font-size: 0.9rem;
    /* Optimize scroll performance */
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

.changelog-section {
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 12px;
    border-left: 3px solid #667eea;
    /* Performance optimization for scrolling */
    contain: layout paint;
    content-visibility: auto;
}

.changelog-section:last-child {
    margin-bottom: 0;
}

.changelog-section h3 {
    color: #667eea;
    font-size: 1.1rem;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.changelog-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.changelog-section li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
    font-size: 0.875rem;
}

.changelog-section li:before {
    content: "•";
    color: #667eea;
    font-weight: bold;
    font-size: 1.2rem;
    position: absolute;
    left: 0;
    top: 3px;
}

.changelog-section li strong {
    color: #764ba2;
    font-weight: 600;
}

/* Modal de Confirmação de Reset */
.reset-confirm-modal {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(5px) !important;
    z-index: 9999 !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding-top: 100px !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.reset-confirm-modal[style*="display: flex"] {
    display: flex !important;
}

.reset-confirm-content {
    background: white !important;
    border-radius: 20px !important;
    padding: 30px !important;
    max-width: 420px !important;
    width: 90% !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
    text-align: center !important;
    position: relative !important;
    animation: slideUp 0.2s ease !important;
    margin: 0 !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
}

.reset-confirm-content h3 {
    color: #e57373 !important;
    font-size: 1.3rem !important;
    margin: 0 0 12px 0 !important;
    font-weight: 600 !important;
}

.reset-confirm-content p {
    color: #666 !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    margin: 0 0 20px 0 !important;
}

.reset-confirm-buttons {
    display: flex !important;
    gap: 12px !important;
    justify-content: center !important;
}

.reset-confirm-buttons button {
    padding: 10px 24px !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-size: 0.9rem !important;
}

.reset-confirm-buttons .confirm-btn {
    background: linear-gradient(135deg, #e57373 0%, #ef5350 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(229, 115, 115, 0.3) !important;
}

.reset-confirm-buttons .confirm-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(229, 115, 115, 0.4) !important;
}

.reset-confirm-buttons .cancel-btn {
    background: linear-gradient(135deg, #90a4ae 0%, #78909c 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(120, 144, 156, 0.3) !important;
}

.reset-confirm-buttons .cancel-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(120, 144, 156, 0.4) !important;
}

.reset-confirm-buttons button:active {
    transform: translateY(0) !important;
}

/* ============================================
   MODAL DE FAVORITOS
   ============================================ */

.favorites-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: flex-start;
    justify-content: center;
    padding-top: 50px;
    animation: fadeIn 0.2s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.favorites-modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.2s ease;
    will-change: transform, opacity;
    transform: translateZ(0);
}

.favorites-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.favorites-modal-header h2 {
    color: #667eea;
    font-size: 1.8rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.favorites-modal-header svg {
    stroke: #667eea;
    fill: none;
}

/* Sistema de Abas */
.favorites-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #667eea #f0f0f0;
}

.favorites-tabs::-webkit-scrollbar {
    height: 4px;
}

.favorites-tabs::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 2px;
}

.favorites-tabs::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.favorites-tab {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #999;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.favorites-tab:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.favorites-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.08) 0%, transparent 100%);
}

.favorites-tab-count {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.favorites-tab.active .favorites-tab-count {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 2px 8px rgba(118, 75, 162, 0.3);
}

.favorites-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 300px;
}

.favorites-category {
    display: none;
}

.favorites-category.active {
    display: block;
    animation: fadeInTab 0.3s ease;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.favorites-category-title {
    display: none;
}

.favorites-category-count {
    display: none;
}

.favorites-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.favorite-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    text-decoration: none;
}

.favorite-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    transform: translateX(5px);
}

.favorite-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.favorite-item-name {
    color: #333;
    font-weight: 600;
    font-size: 1rem;
}

.favorite-item-actions {
    display: flex;
    gap: 8px;
}

.btn-remove-favorite {
    background: linear-gradient(135deg, #e57373 0%, #ef5350 100%);
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-remove-favorite:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 115, 115, 0.4);
}

.favorites-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    color: #666;
    flex: 1;
    min-height: 300px;
}

.favorites-empty svg {
    margin-bottom: 20px;
    opacity: 0.5;
    color: #666;
}

.favorites-empty p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666;
}

/* Botão de favoritar nas páginas de detalhes */
.favorite-btn {
    background: white;
    border: 2px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
}

.favorite-btn:hover {
    transform: scale(1.1);
    background: #f8f9fa;
}

.favorite-btn svg {
    stroke: #667eea;
    fill: none;
    transition: all 0.3s ease;
}

.favorite-btn.favorited {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #764ba2;
}

.favorite-btn.favorited svg {
    stroke: white;
    fill: white;
}

/* Responsivo */
@media (max-width: 768px) {
    .favorites-button {
        right: 190px;
        top: 25px;
        width: 42px;
        height: 42px;
        padding: 8px;
        position: fixed;
        z-index: 1100;
        /* Permitir animações no mobile */
        transition: transform 0.3s ease;
    }
    
    .favorites-button svg {
        width: 24px;
        height: 24px;
    }
    
    .favorites-modal-content {
        padding: 30px 20px;
        width: 95%;
    }
    
    .favorites-modal-header h2 {
        font-size: 1.5rem;
    }
    
    .favorites-tabs {
        gap: 4px;
        margin-bottom: 15px;
    }
    
    .favorites-tab {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
    
    .favorites-tab-count {
        font-size: 0.7rem;
        padding: 1px 6px;
    }
    
    .favorites-category {
        padding: 0;
    }
    
    .favorites-category-title {
        font-size: 1rem;
    }
    
    .favorite-item {
        padding: 10px 12px;
    }
    
    .favorite-item-name {
        font-size: 0.9rem;
    }
    
    .favorite-btn {
        width: 36px;
        height: 36px;
        margin-right: 10px;
    }
    
    .favorite-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .settings-button {
        right: 140px !important;
        top: 25px !important;
        padding: 8px !important;
        width: 42px !important;
        height: 42px !important;
        position: fixed !important;
        z-index: 1100 !important;
    }
    
    .settings-button img,
    .settings-button svg {
        width: 24px !important;
        height: 24px !important;
    }
    
    .settings-modal-content {
        padding: 30px 20px;
        width: 95%;
    }
    
    .settings-modal-header h2 {
        font-size: 1.5rem;
    }
    
    .settings-option {
        padding: 15px;
    }
    
    .changelog-modal-content {
        padding: 20px 15px;
        width: 95%;
        max-height: 85vh;
    }
    
    .changelog-modal-header {
        margin-bottom: 15px;
        padding-bottom: 12px;
    }
    
    .changelog-modal-header h2 {
        font-size: 1.3rem;
    }
    
    .changelog-section {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .changelog-section h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .changelog-section li {
        font-size: 0.8rem;
        padding: 4px 0;
        padding-left: 18px;
        line-height: 1.4;
    }
    
    .changelog-section li:before {
        font-size: 1rem;
        top: 2px;
    }
    
    /* Glossário responsivo */
    .glossary-container {
        padding: 15px;
    }
    
    .glossary-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .glossary-section h3 {
        font-size: 1rem;
    }
    
    .glossary-item {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
    
    .glossary-item strong {
        font-size: 0.85rem;
    }
    
    .glossary-note {
        padding: 8px 10px;
        font-size: 0.75rem;
    }
    
    /* Links Úteis responsivo */
    .useful-links-container {
        padding: 15px;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .links-section h3 {
        font-size: 1rem;
    }
    
    .link-item {
        padding: 10px 12px;
    }
    
    .link-item strong {
        font-size: 0.85rem;
    }
    
    .link-item p {
        font-size: 0.75rem;
    }
}

/* Desktop optimizations - Force GPU acceleration */
@media (min-width: 769px) {
    /* Optimize main container */
    .container {
        transform: translateZ(0);
        will-change: scroll-position;
        /* Ensure content doesn't overlap footer */
        margin-bottom: 80px;
    }
    
    /* Optimize event timers container */
    .event-timers-container {
        transform: translateZ(0);
        backface-visibility: hidden;
    }
    
    /* Disable expensive effects on desktop */
    .event-category-group,
    .event-bar-section {
        backdrop-filter: none !important;
    }
    
    /* Optimize animations for desktop */
    .event-card {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    .event-card:hover {
        transform: translateY(-3px) translateZ(0);
    }
    
    /* FORCE footer to be always visible at bottom of viewport */
    .site-footer {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9999 !important;
    }
}

/* CRITICAL: Footer must ALWAYS be fixed at bottom of screen */
footer,
.site-footer,
footer.site-footer {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    width: 100% !important;
    display: flex !important;
}

/* Ensure back button in footer is visible and not hidden */
.site-footer .back-button,
footer .back-button {
    position: relative !important;
    margin-bottom: 0 !important;
    z-index: 10000 !important;
    display: inline-block !important;
}

/* Optimize for high refresh rate monitors */
@media (prefers-reduced-motion: no-preference) and (min-resolution: 120dpi) {
    * {
        will-change: auto !important;
    }
}

/* ===== META EVENT DETAIL PAGE TIMER ===== */
.detail-timer-widget {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 16px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.detail-timer-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
}

.detail-timer-header h3 {
    color: #667eea;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-timer-timeline {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 8px 5px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.detail-timer-timeline::-webkit-scrollbar {
    height: 6px;
}

.detail-timer-timeline::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 3px;
}

.detail-timer-timeline::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

.detail-timer-card {
    min-width: 140px;
    max-width: 140px;
    background: white;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    border: 2px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    transition: all 0.2s ease;
}

.detail-timer-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.detail-timer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px 8px 0 0;
}

.detail-timer-card.detail-active {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.05);
}

.detail-timer-card.detail-active::before {
    background: #28a745;
}

.detail-timer-card.detail-imminent {
    border-color: #ffc107;
    background: rgba(255, 193, 7, 0.05);
}

.detail-timer-card.detail-imminent::before {
    background: #ffc107;
}

.detail-timer-card.detail-soon {
    border-color: #ff8c00;
    background: rgba(255, 140, 0, 0.05);
}

.detail-timer-card.detail-soon::before {
    background: #ff8c00;
}

.detail-timer-time {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    text-align: center;
    font-family: 'Courier New', monospace;
    padding: 4px 0;
}

.detail-timer-countdown {
    font-size: 0.85rem;
    font-weight: 600;
    color: #667eea;
    text-align: center;
    font-family: 'Courier New', monospace;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.detail-active-badge {
    background: #28a745;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    animation: pulse-badge 1.5s infinite;
}

.detail-time-remaining {
    color: #28a745;
    font-size: 0.9rem;
    font-weight: 700;
}

@keyframes pulse-badge {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.detail-timer-duration {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
}

.detail-timer-card.detail-active .detail-timer-countdown {
    color: #28a745;
}

.detail-timer-card.detail-imminent .detail-timer-countdown {
    color: #ffc107;
}

.detail-timer-card.detail-soon .detail-timer-countdown {
    color: #ff8c00;
}

/* Responsive */
@media (max-width: 768px) {
    .detail-timer-widget {
        padding: 12px;
        margin: 15px 0;
    }
    
    .detail-timer-header h3 {
        font-size: 1rem;
    }
    
    .detail-timer-card {
        min-width: 120px;
        max-width: 120px;
        padding: 8px;
    }
    
    .detail-timer-time {
        font-size: 1rem;
    }
    
    .detail-timer-countdown {
        font-size: 0.75rem;
    }
    
    .detail-active-badge {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
}

/* ============================================
   MECHANIC BADGES SYSTEM - Design harmonioso com o site
   ============================================ */

.mechanic-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.mechanic-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

.mechanic-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Stack Badge - Players devem se agrupar */
.mechanic-badge.badge-stack {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
    border: 2px solid rgba(102, 126, 234, 0.3);
}

.mechanic-badge.badge-stack:hover {
    background: rgba(102, 126, 234, 0.25);
    border-color: #667eea;
}

/* Spread Badge - Players devem se espalhar */
.mechanic-badge.badge-spread {
    background: rgba(118, 75, 162, 0.15);
    color: #764ba2;
    border: 2px solid rgba(118, 75, 162, 0.3);
}

.mechanic-badge.badge-spread:hover {
    background: rgba(118, 75, 162, 0.25);
    border-color: #764ba2;
}

/* CC Badge - Crowd Control necessário */
.mechanic-badge.badge-cc {
    background: rgba(23, 162, 184, 0.15);
    color: #17a2b8;
    border: 2px solid rgba(23, 162, 184, 0.3);
}

.mechanic-badge.badge-cc:hover {
    background: rgba(23, 162, 184, 0.25);
    border-color: #17a2b8;
}

/* Coordination Badge - Coordenação de grupo */
.mechanic-badge.badge-coordination {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
    border: 2px solid rgba(40, 167, 69, 0.3);
}

.mechanic-badge.badge-coordination:hover {
    background: rgba(40, 167, 69, 0.25);
    border-color: #28a745;
}

/* Critical Badge - Mecânica crítica/wipe - MUITO VISÍVEL */
.mechanic-badge.badge-critical {
    background: rgba(220, 53, 69, 0.25);
    color: #dc3545;
    border: 2px solid #dc3545;
    position: relative;
    font-weight: 700;
    animation: pulse-critical 1.5s ease-in-out infinite;
}

.mechanic-badge.badge-critical:hover {
    background: rgba(220, 53, 69, 0.35);
    border-color: #c82333;
    animation-play-state: paused;
}

@keyframes pulse-critical {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
        transform: scale(1);
        border-color: #dc3545;
    }
    50% {
        box-shadow: 0 0 15px 5px rgba(220, 53, 69, 0);
        transform: scale(1.05);
        border-color: #ff4757;
    }
}

/* Focus Badge - Prioridade/Foco em algo específico */
.mechanic-badge.badge-focus {
    background: rgba(255, 152, 0, 0.15);
    color: #ff9800;
    border: 2px solid rgba(255, 152, 0, 0.3);
}

.mechanic-badge.badge-focus:hover {
    background: rgba(255, 152, 0, 0.25);
    border-color: #ff9800;
}

/* Dodge Badge - Mecânica de esquiva */
.mechanic-badge.badge-dodge {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border: 2px solid rgba(255, 193, 7, 0.3);
}

.mechanic-badge.badge-dodge:hover {
    background: rgba(255, 193, 7, 0.25);
    border-color: #ffc107;
}

/* Position Badge - Posicionamento específico */
.mechanic-badge.badge-position {
    background: rgba(156, 39, 176, 0.15);
    color: #9c27b0;
    border: 2px solid rgba(156, 39, 176, 0.3);
}

.mechanic-badge.badge-position:hover {
    background: rgba(156, 39, 176, 0.25);
    border-color: #9c27b0;
}

/* Timer Badge - Mecânica com tempo limitado */
.mechanic-badge.badge-timer {
    background: rgba(255, 87, 34, 0.15);
    color: #ff5722;
    border: 2px solid rgba(255, 87, 34, 0.3);
}

.mechanic-badge.badge-timer:hover {
    background: rgba(255, 87, 34, 0.25);
    border-color: #ff5722;
}

/* Defensive Badge - Use skills defensivas */
.mechanic-badge.badge-defensive {
    background: rgba(33, 150, 243, 0.15);
    color: #2196f3;
    border: 2px solid rgba(33, 150, 243, 0.3);
}

.mechanic-badge.badge-defensive:hover {
    background: rgba(33, 150, 243, 0.25);
    border-color: #2196f3;
}

/* Badge icon styling - removido, não usado mais */

/* Responsive adjustments */
@media (max-width: 768px) {
    .mechanic-badges {
        gap: 5px;
        margin-top: 6px;
        margin-bottom: 6px;
    }
    
    .mechanic-badge {
        font-size: 0.7rem;
        padding: 5px 12px;
        gap: 4px;
        border-width: 1.5px;
    }
}

/* ===== BUSCA GLOBAL ===== */

/* Container da barra de busca global */
.global-search-container {
    position: fixed;
    top: 15px;
    right: 400px; /* Posicionado à direita do favorites-button (320px + 80px de largura) */
    width: 280px;
    z-index: 1100; /* Abaixo dos modais (2000) mas acima do conteúdo normal */
    padding: 20px;
}

.global-search-container .event-search-input {
    width: 100%;
    padding: 10px 45px 10px 20px;
    border: 2px solid #667eea;
    border-radius: 25px;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
    background: white;
    color: #333;
}

.global-search-container .event-search-input:focus {
    border-color: #764ba2;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5), 0 0 0 3px rgba(118, 75, 162, 0.1);
    background: #ffffff;
}

.global-search-container .event-search-input::placeholder {
    color: #999;
}

.global-search-container .search-icon {
    position: absolute;
    right: 38px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    pointer-events: none;
    transition: all 0.3s ease;
}

.global-search-container .event-search-input:focus + .search-icon {
    color: #764ba2;
}

/* Modal de Resultados da Busca Global */
.global-search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 10001;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    animation: fadeIn 0.2s ease;
    overflow-y: auto;
}

.global-search-modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 900px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.2s ease;
    position: relative;
}

.global-search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.global-search-modal-header h2 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.global-search-close {
    background: transparent;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.global-search-close:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    transform: rotate(90deg);
}

/* Resultados da busca */
.search-category {
    margin-bottom: 30px;
}

.search-category-title {
    font-size: 1.2rem;
    color: #667eea;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.search-result-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    padding: 15px 18px;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.search-result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.search-result-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

.search-result-item:hover::before {
    transform: scaleY(1);
}

.search-result-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
    transition: color 0.3s ease;
}

.search-result-item:hover .search-result-name {
    color: #667eea;
}

.search-result-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    align-self: flex-start;
}

.search-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.search-no-results svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.search-no-results h3 {
    font-size: 1.3rem;
    color: #667eea;
    margin-bottom: 10px;
}

.search-no-results p {
    font-size: 0.95rem;
    color: #999;
}

/* Shortcut hint */
.search-shortcut-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #667eea;
    margin-left: 10px;
}

.search-shortcut-hint kbd {
    color: white;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    font-family: monospace;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .menu-container {
        padding-top: 180px;
    }

    .global-search-container {
        top: 80px;
        right: 50%;
        transform: translateX(50%);
        width: 90%;
        max-width: 280px;
        margin-bottom: 30px;
    }

    .global-search-modal {
        padding-top: 150px;
    }

    .global-search-modal-content {
        width: 95%;
        padding: 20px;
        max-height: 85vh;
    }

    .search-results-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .search-category-title {
        font-size: 1.1rem;
    }

    .search-shortcut-hint {
        display: none;
    }
}

@media (max-width: 480px) {
    .menu-container {
        padding-top: 160px;
    }

    .global-search-container {
        width: calc(100% - 40px);
        max-width: 100%;
        right: 20px;
        top: 70px;
        transform: none;
        margin-bottom: 25px;
    }
}

