/* History Section - Arcade Timeline */
.history {
    background: var(--darker);
    position: relative;
    overflow: hidden;
    --neon-pink: rgba(255, 107, 157, 0.6);
    --neon-cyan: rgba(0, 212, 170, 0.6);
    --neon-yellow: rgba(248, 181, 0, 0.6);
}

.history::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(255, 107, 157, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(0, 212, 170, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.history-container {
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--dark) 0%, var(--darker) 100%);
    border: 4px solid var(--primary);
    padding: 20px;
    box-shadow: 
        var(--pixel-shadow),
        0 0 30px rgba(255, 107, 157, 0.3),
        inset 0 0 50px rgba(0, 0, 0, 0.3);
    position: relative;
}

.history-container::before {
    content: 'ИЗБЕРИ ГОДИНА';
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--dark);
    color: var(--accent);
    padding: 2px 10px;
    font-size: 8px;
    letter-spacing: 2px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 2px solid transparent;
    border-bottom: 2px dashed rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--accent);
    transform: scaleY(0);
    transition: transform 0.3s;
}

.history-item:hover::before {
    transform: scaleY(1);
}

.history-item::after {
    content: '►';
    position: absolute;
    right: 15px;
    color: var(--accent);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
}

.history-item:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(10px);
    border-color: rgba(255, 107, 157, 0.3);
}

.history-item .year {
    color: var(--accent);
    font-weight: bold;
    margin-right: 20px;
    min-width: 60px;
    text-shadow: 0 0 10px var(--neon-yellow);
    transition: all 0.3s;
}

.history-item:hover .year {
    color: var(--primary);
    text-shadow: 0 0 15px var(--neon-pink);
}

.history-item .location {
    color: var(--light);
    font-size: 10px;
    transition: all 0.3s;
}

.history-item.lame {
    opacity: 0.5;
}

.history-item.lame .location {
    color: var(--secondary);
    text-decoration: line-through;
}

.history-item.lame:hover {
    opacity: 0.7;
}

.history-item.pause {
    opacity: 0.6;
}

.history-item.pause .location {
    color: #666;
    font-style: italic;
}

.history-item.current {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border: 2px solid var(--light);
    animation: current-pulse 2s infinite;
    transform: scale(1.02);
}

.history-item.current::before {
    display: none;
}

.history-item.current::after {
    content: '★ СЕГА!';
    opacity: 1;
    transform: translateX(0);
    color: var(--dark);
    font-size: 8px;
    animation: blink 1s infinite;
}

.history-item.current .year,
.history-item.current .location {
    color: var(--dark);
    text-shadow: none;
}

.history-item.current:hover {
    transform: scale(1.03);
}

@keyframes current-pulse {
    0%, 100% { 
        box-shadow: 0 0 10px var(--neon-pink);
    }
    50% { 
        box-shadow: 0 0 25px var(--neon-pink), 0 0 40px var(--neon-pink);
    }
}

/* Selected state for gallery */
.history-item.active {
    background: var(--accent) !important;
    border-color: var(--light);
    transform: translateX(15px) scale(1.02);
}

.history-item.active::before {
    transform: scaleY(1);
    background: var(--dark);
}

.history-item.active::after {
    content: '◄';
    opacity: 1;
    color: var(--dark);
}

.history-item.active .year,
.history-item.active .location {
    color: var(--dark);
    text-shadow: none;
}

/* Mobile Responsive for History */
@media (max-width: 768px) {
    .history-container {
        padding: 15px;
        border-width: 3px;
    }
    
    .history-container::before {
        font-size: 7px;
        top: -10px;
        left: 15px;
        padding: 2px 8px;
    }
    
    .history-list {
        gap: 5px;
    }
    
    .history-item {
        padding: 10px 12px;
        flex-wrap: wrap;
    }
    
    .history-item .year {
        min-width: 50px;
        font-size: 11px;
        margin-right: 12px;
    }
    
    .history-item .location {
        font-size: 8px;
        flex: 1;
    }
    
    .history-item::after {
        right: 10px;
        font-size: 10px;
    }
    
    .history-item:hover {
        transform: translateX(5px);
    }
    
    .history-item.active {
        transform: translateX(8px) scale(1.01);
    }
    
    .history-item.current {
        transform: scale(1.01);
    }
    
    .history-item.current::after {
        font-size: 7px;
    }
}

@media (max-width: 480px) {
    .history-container {
        padding: 12px;
    }
    
    .history-item {
        padding: 8px 10px;
    }
    
    .history-item .year {
        min-width: 45px;
        font-size: 10px;
        margin-right: 10px;
    }
    
    .history-item .location {
        font-size: 7px;
    }
}