/* ========== 06-page.css - SISTEMA DE EFECTOS ========== */

/* ========== VARIABLES ESPECÍFICAS DE PÁGINA ========== */
/* Solo definimos variables que son específicas para esta página */
:root {
    /* Severidad de efectos - específico de esta página */
    --severity-low: #10b981;     /* Verde */
    --severity-medium: #f59e0b;  /* Naranja */
    --severity-high: #ef4444;    /* Rojo */
    --severity-extreme: #dc2626; /* Rojo oscuro */
    --severity-positive: #4ade80; /* Verde brillante */
    --severity-special: #a78bfa;  /* Púrpura */
}

/* ========== CATEGORÍAS DE EFECTOS ========== */
.effect-category-section {
    margin: var(--space-md) 0;
    /*padding: var(--space-md) 0;*/
    /*border-top: 2px solid var(--border);*/
}

.category-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}
/*
.category-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-bio), var(--accent-crystal), var(--accent-psi));
}*/

.category-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
}

.category-title {
    flex: 1;
}

.category-title h3 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-primary);
    font-family: var(--font-heading);
}

.category-description {
    color: var(--text-secondary);
    margin-top: var(--space-xs);
    font-size: 0.95rem;
}

/* ========== GRID DE EFECTOS ========== */
.effects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
}

/* ========== EFFECT CONTENT GRID - 3 COLUMNS ========== */
.effect-content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    padding: var(--space-lg);
}

.effect-section {
    min-width: 0;
}

.effect-section h5 {
    color: var(--accent-bio);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--border);
    font-family: var(--font-heading);
    font-weight: 600;
}

.effect-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
}

.effect-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.effect-section li {
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 0.25rem 0;
    padding-left: 1.2rem;
    position: relative;
}

.effect-section li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--accent-crystal);
}

/* ========== TARJETAS DE EFECTOS - UNIFIED SYSTEM ========== */
/* Base Effect Card */
.effect-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    margin: var(--space-xl) 0;
    overflow: hidden;
    transition: all var(--transition-normal);
    position: relative;
}

/* Left Accent Bar */
.effect-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--border); /* Default neutral color */
    transition: width var(--transition-fast);
}

/* Hover Effects */
.effect-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.effect-card:hover::before {
    width: 6px;
}

/* ========== TYPE VARIANTS ========== */
/* DoT (Damage over Time) - Red Theme */
.effect-card.dot {
    border-color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), var(--bg-secondary));
}

.effect-card.dot::before {
    background: #ef4444;
}

.effect-card.dot:hover {
    border-color: #dc2626;
}

/* Control Effects - Purple Theme */
.effect-card.control {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), var(--bg-secondary));
}

.effect-card.control::before {
    background: #8b5cf6;
}

.effect-card.control:hover {
    border-color: #7c3aed;
}

/* Buff Effects - Green Theme */
.effect-card.buff {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), var(--bg-secondary));
}

.effect-card.buff::before {
    background: #10b981;
}

.effect-card.buff:hover {
    border-color: #059669;
}

/* Special Effects - Orange Theme */
.effect-card.special {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), var(--bg-secondary));
}

.effect-card.special::before {
    background: #f59e0b;
}

.effect-card.special:hover {
    border-color: #d97706;
}

/* Icon hover effect */
.effect-card:hover .effect-icon {
    transform: scale(1.1);
    transition: transform var(--transition-fast);
}

/* ========== COLOR-CODED SECTION TITLES ========== */
/* DoT Effects (6.1) - Red Theme */
.category-header.dot-header {
    color: #ef4444;
    border-bottom: 3px solid #ef4444;
    border-color: #ef4444 !important;
}

.category-header.dot-header .category-icon {
    color: #ef4444;
}

/* Control Effects (6.2) - Purple Theme */
.category-header.control-header {
    color: #8b5cf6;
    border-bottom: 3px solid #8b5cf6;
    border-color: #8b5cf6 !important;
}

.category-header.control-header .category-icon {
    color: #8b5cf6;
}

/* Buff Effects (6.3) - Green Theme */
.category-header.buff-header {
    color: #10b981;
    border-bottom: 3px solid #10b981;
    border-color: #10b981 !important;
}

.category-header.buff-header .category-icon {
    color: #10b981;
}

/* Special Effects (6.4) - Orange Theme */
.category-header.special-header {
    color: #f59e0b;
    border-bottom: 3px solid #f59e0b;
    border-color: #f59e0b !important;
}

.category-header.special-header .category-icon {
    color: #f59e0b;
}

/* ========== HEADER DE LA TARJETA ========== */
.effect-header {
    display: flex;
    align-items: center;
    padding: var(--space-lg);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
}

.effect-icon {
    font-size: 2.5rem;
    margin-right: var(--space-md);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.effect-title {
    flex: 1;
}

.effect-title h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.effect-type {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-left: var(--space-md);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ========== CUERPO DE LA TARJETA ========== */
.effect-description {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.6;
    font-size: var(--fs-body);
}

/* ========== STATS DE EFECTOS ========== */
.effect-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border-bottom: 1px solid var(--border);
}

.stat-item {
    background: var(--bg-secondary);
    padding: var(--space-md);
    text-align: center;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
    font-weight: 600;
}

.stat-value {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 700;
    font-family: var(--font-heading);
}

.stat-value.damage {
    color: var(--severity-high);
}

.stat-value.heal {
    color: var(--severity-positive);
}

.stat-value.duration {
    color: var(--accent-crystal);
}

.stat-value.range {
    color: var(--accent-tech);
}

/* ========== MECÁNICAS DE EFECTOS ========== */
.effect-mechanics {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
}

.mechanics-title {
    font-size: var(--fs-small);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-heading);
}

.mechanics-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mechanics-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: var(--space-xs);
    color: var(--text-secondary);
    font-size: var(--fs-small);
}

.mechanics-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-bio);
}

/* ========== TAGS DE EFECTOS ========== */
.effect-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-md);
}

.effect-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: var(--fs-xs);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.effect-tag:hover {
    background: var(--hover);
    border-color: var(--accent-bio);
    color: var(--text-primary);
}

.effect-tag.stackable {
    border-color: var(--accent-crystal);
    color: var(--accent-crystal);
}

.effect-tag.unique {
    border-color: var(--accent-psi);
    color: var(--accent-psi);
}

.effect-tag.persistent {
    border-color: var(--accent-tech);
    color: var(--accent-tech);
}

.effect-tag.cleansable {
    border-color: var(--severity-positive);
    color: var(--severity-positive);
}

/* ========== PROGRESO DE EFECTOS ========== */
.effect-progress {
    margin-top: var(--space-md);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xs);
}

.progress-label {
    font-size: var(--fs-small);
    color: var(--text-secondary);
}

.progress-value {
    font-size: var(--fs-small);
    color: var(--text-primary);
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-bio), var(--accent-crystal));
    transition: width var(--transition-normal);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.2),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ========== COMBOS DE EFECTOS ========== */
.combo-section {
    margin: var(--space-2xl) 0;
    padding: var(--space-xl);
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border-radius: var(--radius-lg);
    border: 2px solid var(--accent-psi);
}

.combo-title {
    font-size: 1.5rem;
    color: var(--accent-psi);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-family: var(--font-heading);
}

.combo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.combo-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    position: relative;
}

.combo-card::before {
    content: '⚡';
    position: absolute;
    top: -10px;
    right: 10px;
    font-size: 1.5rem;
    color: var(--accent-psi);
}

.combo-formula {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding: var(--space-sm);
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: var(--fs-small);
}

.combo-operator {
    color: var(--accent-tech);
    font-weight: bold;
}

.combo-result {
    color: var(--accent-psi);
    font-weight: bold;
}

/* ========== RESISTENCIAS Y VULNERABILIDADES ========== */
.resistance-section {
    margin: var(--space-xl) 0;
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.resistance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.resistance-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.resistance-icon {
    font-size: 1.5rem;
}

.resistance-info {
    flex: 1;
}

.resistance-type {
    font-size: var(--fs-small);
    font-weight: 600;
    color: var(--text-primary);
}

.resistance-value {
    font-size: var(--fs-xs);
    color: var(--text-secondary);
}

.resistance-item.immune {
    border-color: var(--severity-positive);
}

.resistance-item.resistant {
    border-color: var(--accent-crystal);
}

.resistance-item.vulnerable {
    border-color: var(--severity-high);
}

/* ========== DETALLES EXPANDIBLES ========== */
.effect-details {
    margin-top: var(--space-md);
}

.details-toggle {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--fs-small);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-heading);
}

.details-toggle:hover {
    background: var(--hover);
    border-color: var(--accent-bio);
}

.details-toggle::after {
    content: '▼';
    transition: transform var(--transition-fast);
}

.details-toggle.active::after {
    transform: rotate(180deg);
}

.details-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.details-content.active {
    max-height: 500px;
    margin-top: var(--space-md);
}

.details-inner {
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

/* ========== TIMELINE DE EFECTOS ========== */
.effect-timeline {
    position: relative;
    padding-left: 2rem;
    margin: var(--space-lg) 0;
}

.timeline-item {
    position: relative;
    padding-bottom: var(--space-lg);
}

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

.timeline-item::after {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 0.5rem;
    width: 10px;
    height: 10px;
    background: var(--accent-bio);
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
}

.timeline-turn {
    font-size: var(--fs-small);
    font-weight: 600;
    color: var(--accent-crystal);
    margin-bottom: var(--space-xs);
}

.timeline-event {
    font-size: var(--fs-body);
    color: var(--text-secondary);
}

/* ========== TOOLTIPS DE INFORMACIÓN ========== */
.tooltip-trigger {
    position: relative;
    display: inline-block;
    color: var(--accent-crystal);
    cursor: help;
    border-bottom: 1px dotted var(--accent-crystal);
}

.tooltip-content {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-sm);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: var(--fs-small);
    color: var(--text-primary);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
    z-index: var(--z-tooltip);
    margin-bottom: var(--space-xs);
}

.tooltip-trigger:hover .tooltip-content {
    opacity: 1;
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--border);
}

/* Variante de tooltip informativo */
.tooltip-trigger.tooltip-info {
    color: var(--accent-bio);
    border-bottom-color: var(--accent-bio);
}

.tooltip-trigger.tooltip-info:hover {
    color: var(--text-primary);
}

/* ========== ICONOS ESPECIALES ========== */
.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
}

/* ========== TABLAS MEJORADAS ========== */
.effects-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: var(--space-lg) 0;
}

.effects-table thead {
    background: var(--bg-tertiary);
}

.effects-table th {
    padding: var(--space-md);
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--fs-small);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border);
    font-family: var(--font-heading);
}

.effects-table td {
    padding: var(--space-md);
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.effects-table tbody tr:hover {
    background: var(--hover);
}

.effects-table tbody tr:last-child td {
    border-bottom: none;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .effect-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .effect-content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .effects-grid {
        grid-template-columns: 1fr;
    }
    
    .effect-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .effect-content-grid {
        grid-template-columns: 1fr;
    }
    
    .combo-grid {
        grid-template-columns: 1fr;
    }
    
    .resistance-grid {
        grid-template-columns: 1fr;
    }
    
    .category-header {
        flex-direction: column;
        text-align: center;
    }
    
    .effect-header {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }
    
    .effect-icon {
        margin-right: 0;
        margin-bottom: var(--space-sm);
    }
    
}

/* ========== ANIMACIONES ESPECIALES ========== */
@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
    }
    50% { 
        opacity: 0.7; 
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(74, 222, 128, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(74, 222, 128, 0.6);
    }
}

/* Active effect animation - for cards that are currently affecting units */
.effect-card.active-effect {
    animation: pulse-glow 2s infinite;
}

/* ========== ESTADO DE CARGA ========== */
.loading-effect {
    position: relative;
    overflow: hidden;
}

.loading-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.1),
        transparent
    );
    animation: loading-sweep 1.5s infinite;
}

@keyframes loading-sweep {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Duplicate styles removed - using unified effect-card system above */

/* Effect Stackeo Section */
.effect-stackeo,
.effect-example-section {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-lg);
    margin-top: var(--space-xl);
}

.effect-stackeo h5,
.effect-example-section h5 {
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    font-size: 1rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


/* Example Cases */
.example-cases {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.example-case {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.case-header {
    background: var(--bg-primary);
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
}

.case-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: var(--font-heading);
}

.case-content {
    padding: var(--space-md);
}

.case-explanation {
    margin-bottom: var(--space-md);
}

/* Code Lines for Examples - Enhanced styling */
.code-line {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding: 0.6rem var(--space-md);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    background: var(--bg-tertiary);
    border-left: 3px solid var(--accent-tech);
    margin: 0.5rem 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: all var(--transition-fast);
}

.code-line:hover {
    background: var(--bg-primary);
    border-left-color: var(--accent-bio);
}

.code-keyword {
    color: var(--accent-psi);
    font-weight: 600;
}

.code-number {
    color: var(--accent-crystal);
    font-weight: 600;
}

.code-damage {
    color: #ef4444;
    font-weight: 600;
}

.code-comment {
    color: var(--text-secondary);
    opacity: 0.7;
    font-style: italic;
}

.example-arrow {
    color: var(--accent-bio);
    font-weight: bold;
}

/* These styles have been moved to css/components/timeline.css */


/* Timeline styles have been moved to css/components/timeline.css */