:root {
    --primary-color: #2563EB;
    --secondary-color: #1E40AF;
    --accent-color: #3B82F6;
    --gradient-start: #1E40AF;
    --gradient-end: #3B82F6;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --background: #F9FAFB;
    --surface: #FFFFFF;
    --border-color: #E5E7EB;
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    --shadow-heavy: rgba(0, 0, 0, 0.15);
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition-smooth: cubic-bezier(0.4, 0.0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    --gradient-surface: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.8));
}

.comparison-toggle-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: var(--gradient-primary);
    color: white;
    border: none;
    box-shadow: 
        0 6px 20px 0 rgba(37, 99, 235, 0.25),
        0 2px 6px 0 rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s var(--transition-smooth);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    animation: buttonFloat 6s ease-in-out infinite;
}

@keyframes buttonFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-4px); }
}

.comparison-toggle-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.comparison-toggle-btn:hover::before {
    opacity: 1;
}

.comparison-toggle-btn:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 
        0 12px 35px 0 rgba(37, 99, 235, 0.35),
        0 6px 20px 0 rgba(0, 0, 0, 0.15);
}

.comparison-toggle-btn:active {
    transform: translateY(-2px) scale(1.02);
    transition: all 0.1s var(--transition-smooth);
}

.comparison-toggle-btn i {
    font-size: 1.25rem;
    margin-bottom: 2px;
    font-weight: 500;
    position: relative;
    z-index: 1;
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.comparison-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, var(--danger) 0%, #DC2626 100%);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 12px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: 2px solid white;
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.3);
    font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, sans-serif;
    animation: countBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes countBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.comparison-panel {
    position: fixed;
    bottom: -100%;
    left: 24px;
    right: 24px;
    max-width: 1200px;
    margin: 0 auto;
    background: var(--gradient-surface);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    z-index: 999;
    transition: all 0.5s var(--transition-smooth);
    box-shadow: 
        0 -8px 40px rgba(0, 0, 0, 0.08),
        0 -2px 8px rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-bottom: none;
    backdrop-filter: blur(20px);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
}

.comparison-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.comparison-panel.show {
    bottom: 0;
    animation: panelSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes panelSlideIn {
    from {
        bottom: -100%;
        opacity: 0;
    }
    to {
        bottom: 0;
        opacity: 1;
    }
}

.comparison-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #FAFBFF 0%, var(--surface) 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    position: relative;
}

.comparison-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.8s ease;
}

.comparison-panel.show .comparison-header::after {
    transform: scaleX(1);
}

.comparison-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    animation: titleSlideIn 0.6s ease 0.2s both;
}

@keyframes titleSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.comparison-header h3 i {
    color: var(--primary-color);
    font-size: 1.125rem;
    width: 20px;
    text-align: center;
    animation: iconGlow 3s ease-in-out infinite;
}

@keyframes iconGlow {
    0%, 100% { color: var(--primary-color); }
    50% { color: var(--accent-color); }
}

.comparison-close {
    background: var(--background);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all 0.3s var(--transition-smooth);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: closeButtonSlide 0.6s ease 0.3s both;
}

@keyframes closeButtonSlide {
    from {
        opacity: 0;
        transform: rotate(-90deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

.comparison-close:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
    transform: scale(1.1) rotate(90deg);
}

.comparison-content {
    padding: 24px;
    background: var(--surface);
}

.comparison-slots {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 20px;
}

.comparison-slot {
    flex: 1;
    background: var(--background);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 2px dashed var(--border-color);
    transition: all 0.4s var(--transition-smooth);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    animation: slotFadeIn 0.6s ease;
    animation-fill-mode: both;
}

.comparison-slot:nth-child(1) { animation-delay: 0.1s; }
.comparison-slot:nth-child(3) { animation-delay: 0.3s; }

@keyframes slotFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.comparison-slot::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.6s ease;
}

.comparison-slot:hover::before {
    left: 100%;
}

.comparison-slot.has-component {
    border: 1px solid var(--accent-color);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(37, 99, 235, 0.02) 100%);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
    animation: componentAdded 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes componentAdded {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.slot-placeholder {
    text-align: center;
    color: var(--text-light);
    animation: placeholderPulse 3s ease-in-out infinite;
}

@keyframes placeholderPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.slot-placeholder i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    display: block;
    color: var(--text-light);
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

.slot-placeholder span {
    font-size: 0.875rem;
    font-weight: 500;
    display: block;
}

.slot-component {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    animation: componentSlideIn 0.6s ease;
}

@keyframes componentSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slot-component-image {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: white;
    padding: 6px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.slot-component:hover .slot-component-image {
    transform: scale(1.05) rotate(2deg);
    border-color: var(--primary-color);
}

.slot-component-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.slot-component-info {
    flex: 1;
    min-width: 0;
}

.slot-component-info h4 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.slot-component:hover .slot-component-info h4 {
    color: var(--primary-color);
}

.slot-component-info .component-type {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.slot-component-info .component-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'JetBrains Mono', monospace;
}

.slot-remove {
    background: var(--danger);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    margin-left: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.2);
}

.slot-remove:hover {
    transform: scale(1.15) rotate(90deg);
    background: #DC2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.vs-divider {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    animation: vsSlideIn 0.6s ease 0.2s both;
}

@keyframes vsSlideIn {
    from {
        opacity: 0;
        transform: scale(0.5) rotate(-180deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.vs-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.1em;
    animation: vsGlow 3s ease-in-out infinite;
}

@keyframes vsGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.vs-lightning {
    color: var(--warning);
    font-size: 1rem;
    opacity: 0.7;
    animation: lightningFlicker 2s ease-in-out infinite;
}

@keyframes lightningFlicker {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.comparison-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    animation: actionsSlideUp 0.6s ease 0.4s both;
}

@keyframes actionsSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-compare, .btn-clear {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-family: inherit;
    letter-spacing: -0.025em;
    position: relative;
    overflow: hidden;
}

.btn-compare::before,
.btn-clear::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-compare:hover::before,
.btn-clear:hover::before {
    left: 100%;
}

.btn-compare {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.btn-compare:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.btn-compare:disabled {
    background: var(--text-light);
    color: white;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.btn-clear {
    background: var(--background);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-clear:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
    transform: translateY(-2px) scale(1.05);
}

.battle-header {
    background: linear-gradient(135deg, var(--text-primary) 0%, #374151 100%);
    color: white;
    border-bottom: none;
    padding: 24px 32px;
    position: relative;
    overflow: hidden;
}

.battle-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: headerShine 4s infinite;
}

@keyframes headerShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.battle-header .modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.025em;
    animation: battleTitleGlow 2s ease-in-out infinite;
}

@keyframes battleTitleGlow {
    0%, 100% { text-shadow: 0 0 10px rgba(255, 255, 255, 0.3); }
    50% { text-shadow: 0 0 20px rgba(255, 255, 255, 0.6); }
}

.battle-header .modal-title i {
    color: var(--warning);
    font-size: 1.25rem;
    animation: crownSpin 3s ease-in-out infinite;
}

@keyframes crownSpin {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(10deg); }
}

.battle-arena {
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    color: var(--text-primary);
    padding: 32px;
    min-height: 80vh;
    position: relative;
    overflow: hidden;
}

.battle-arena::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(100,116,139,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)" /></svg>');
    opacity: 0.4;
    z-index: 0;
}

.battle-participants {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.participant {
    text-align: center;
    flex: 1;
    max-width: 280px;
    animation: participantEnter 0.8s ease;
    animation-fill-mode: both;
}

.participant.left-participant { animation-delay: 0.2s; }
.participant.right-participant { animation-delay: 0.4s; }

@keyframes participantEnter {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.participant-image {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
    border-radius: var(--radius-lg);
    background: white;
    border: 2px solid var(--border-color);
    overflow: hidden;
    transition: all 0.4s var(--transition-smooth);
    box-shadow: 0 6px 20px var(--shadow-medium);
}

.participant-image:hover {
    transform: scale(1.05) rotate(2deg);
    border-color: var(--accent-color);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.2);
}

.participant-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform 0.3s ease;
}

.participant-image:hover img {
    transform: scale(1.1);
}

.participant-score {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--warning) 0%, #D97706 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.125rem;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
    border: 2px solid white;
    animation: scoreUpdate 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes scoreUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.participant-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    transition: color 0.3s ease;
}

.participant:hover .participant-name {
    color: var(--primary-color);
}

.participant-type {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 4px;
}

.participant-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'JetBrains Mono', monospace;
}

.battle-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex: 0 0 200px;
    animation: centerSlideIn 0.8s ease 0.3s both;
}

@keyframes centerSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.vs-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.vs-container .vs-text {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: 0.1em;
    animation: vsTextPulse 3s ease-in-out infinite;
}

@keyframes vsTextPulse {
    0%, 100% { 
        transform: scale(1);
        text-shadow: 0 0 10px rgba(31, 41, 55, 0.3);
    }
    50% { 
        transform: scale(1.05);
        text-shadow: 0 0 20px rgba(31, 41, 55, 0.6);
    }
}

.battle-progress {
    width: 200px;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.3s var(--transition-smooth);
    position: relative;
    animation: progressGlow 2s ease-in-out infinite;
}

@keyframes progressGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(37, 99, 235, 0.3); }
    50% { box-shadow: 0 0 15px rgba(37, 99, 235, 0.6); }
}

.battle-controls {
    display: flex;
    gap: 12px;
}

.btn-battle-start, .btn-battle-reset {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-family: inherit;
    letter-spacing: -0.025em;
    position: relative;
    overflow: hidden;
}

.btn-battle-start::before,
.btn-battle-reset::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-battle-start:hover::before,
.btn-battle-reset:hover::before {
    left: 100%;
}

.btn-battle-start {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.btn-battle-start:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.btn-battle-reset {
    background: var(--background);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-battle-reset:hover {
    background: var(--surface);
    border-color: var(--text-secondary);
    transform: translateY(-2px) scale(1.05);
}

.battle-specs {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
    box-shadow: 0 6px 20px var(--shadow-light);
    animation: specsSlideIn 0.8s ease 0.5s both;
}

@keyframes specsSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.spec-battle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    opacity: 0;
    transform: translateY(20px);
    animation: specFadeIn 0.5s ease forwards;
    transition: all 0.3s ease;
}

.spec-battle-row:hover {
    background: rgba(37, 99, 235, 0.02);
    transform: translateY(0) translateX(4px);
    border-radius: var(--radius-sm);
}

.spec-battle-row:last-child {
    border-bottom: none;
}

.spec-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex: 0 0 180px;
    text-align: center;
    transition: color 0.3s ease;
}

.spec-battle-row:hover .spec-name {
    color: var(--primary-color);
}

.spec-value {
    flex: 1;
    text-align: center;
    padding: 12px 20px;
    background: var(--background);
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.4s var(--transition-smooth);
    position: relative;
    overflow: hidden;
    color: var(--text-primary);
    margin: 0 8px;
}

.spec-value::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.spec-value:hover::before {
    left: 100%;
}

.spec-value.winner {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    font-weight: 700;
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
    animation: winnerPulse 0.8s ease;
}

@keyframes winnerPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1) translateY(-4px); }
    100% { transform: scale(1.05) translateY(-2px); }
}

.spec-value.loser {
    background: var(--background);
    opacity: 0.6;
    color: var(--text-light);
    transform: scale(0.95);
}

.battle-verdict {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    z-index: 10;
    animation: verdictAppear 0.8s var(--transition-smooth);
    max-width: 400px;
    width: 90%;
}

@keyframes verdictAppear {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8) rotate(-5deg);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
}

.winner-crown {
    margin-bottom: 20px;
    animation: crownFloat 3s ease-in-out infinite;
}

@keyframes crownFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.winner-crown i {
    font-size: 3rem;
    color: var(--warning);
    filter: drop-shadow(0 6px 12px rgba(245, 158, 11, 0.3));
    animation: crownGlow 2s ease-in-out infinite;
}

@keyframes crownGlow {
    0%, 100% { 
        color: var(--warning);
        filter: drop-shadow(0 6px 12px rgba(245, 158, 11, 0.3));
    }
    50% { 
        color: #F59E0B;
        filter: drop-shadow(0 8px 20px rgba(245, 158, 11, 0.5));
    }
}

.verdict-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    animation: titleBounce 1s ease;
}

@keyframes titleBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.winner-announcement {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--primary-color);
    animation: announcementSlide 0.8s ease 0.3s both;
}

@keyframes announcementSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.final-scores {
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: scoresSlideUp 0.8s ease 0.5s both;
}

@keyframes scoresSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.final-score {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 16px;
    background: var(--background);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.final-score:hover {
    background: rgba(37, 99, 235, 0.05);
    transform: translateX(4px);
}

@keyframes specFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1200px) {
    .comparison-panel {
        left: 16px;
        right: 16px;
    }
    
    .battle-participants {
        flex-direction: column;
        gap: 24px;
    }
    
    .battle-center {
        order: 2;
        flex: none;
    }
    
    .participant-image {
        width: 120px;
        height: 120px;
    }
    
    .vs-container .vs-text {
        font-size: 2rem;
    }
    
    .battle-verdict {
        padding: 32px 24px;
        width: 95%;
        max-width: 380px;
    }
    
    .verdict-title {
        font-size: 1.75rem;
    }
    
    .winner-announcement {
        font-size: 1.125rem;
    }
}

@media (max-width: 768px) {
    .comparison-panel {
        left: 12px;
        right: 12px;
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }
    
    .comparison-toggle-btn {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }
    
    .comparison-toggle-btn i {
        font-size: 1.1rem;
    }
    
    .comparison-count {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
        top: -4px;
        right: -4px;
    }
    
    .comparison-content {
        padding: 20px;
    }
    
    .comparison-slots {
        flex-direction: column;
        gap: 16px;
    }
    
    .vs-divider {
        order: 2;
        transform: rotate(90deg);
        margin: 8px 0;
    }
    
    .vs-text {
        font-size: 1.2rem;
    }
    
    .comparison-slot {
        min-height: 100px;
        padding: 16px;
    }
    
    .slot-component {
        gap: 12px;
    }
    
    .slot-component-image {
        width: 48px;
        height: 48px;
    }
    
    .slot-component-info h4 {
        font-size: 0.9rem;
    }
    
    .slot-component-info .component-price {
        font-size: 0.9rem;
    }
    
    .comparison-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-compare, .btn-clear {
        width: 100%;
        justify-content: center;
    }
    
    .battle-participants {
        gap: 20px;
    }
    
    .participant-image {
        width: 100px;
        height: 100px;
    }
    
    .participant-score {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        top: -8px;
        right: -8px;
    }
    
    .battle-arena {
        padding: 20px;
    }
    
    .battle-progress {
        width: 150px;
        height: 4px;
    }
    
    .battle-specs {
        padding: 20px;
    }
    
    .spec-battle-row {
        flex-direction: column;
        gap: 12px;
        padding: 12px 0;
        text-align: center;
    }
    
    .spec-name {
        flex: none;
        margin-bottom: 8px;
    }
    
    .spec-value {
        margin: 0;
        width: 100%;
    }
    
    .battle-verdict {
        padding: 24px 20px;
        width: 95%;
    }
    
    .winner-crown i {
        font-size: 2.5rem;
    }
    
    .verdict-title {
        font-size: 1.5rem;
    }
    
    .winner-announcement {
        font-size: 1rem;
    }
    
    .final-score {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .comparison-panel {
        left: 8px;
        right: 8px;
    }
    
    .comparison-toggle-btn {
        bottom: 16px;
        right: 16px;
        width: 50px;
        height: 50px;
    }
    
    .comparison-toggle-btn i {
        font-size: 1rem;
    }
    
    .comparison-count {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }
    
    .comparison-header {
        padding: 16px 20px;
    }
    
    .comparison-header h3 {
        font-size: 1.1rem;
    }
    
    .comparison-content {
        padding: 16px;
    }
    
    .comparison-slot {
        min-height: 80px;
        padding: 12px;
    }
    
    .slot-component-image {
        width: 40px;
        height: 40px;
    }
    
    .slot-component-info h4 {
        font-size: 0.85rem;
    }
    
    .slot-component-info .component-type {
        font-size: 0.7rem;
    }
    
    .slot-component-info .component-price {
        font-size: 0.85rem;
    }
    
    .slot-remove {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }
    
    .vs-text {
        font-size: 1rem;
    }
    
    .vs-lightning {
        font-size: 0.9rem;
    }
    
    .btn-compare, .btn-clear {
        padding: 10px 20px;
        font-size: 0.8rem;
    }
    
    .battle-header {
        padding: 16px 20px;
    }
    
    .battle-header .modal-title {
        font-size: 1.2rem;
    }
    
    .battle-arena {
        padding: 16px;
        min-height: 70vh;
    }
    
    .participant-image {
        width: 80px;
        height: 80px;
        margin-bottom: 16px;
    }
    
    .participant-score {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
        top: -6px;
        right: -6px;
    }
    
    .participant-name {
        font-size: 1rem;
    }
    
    .participant-price {
        font-size: 0.9rem;
    }
    
    .vs-container .vs-text {
        font-size: 1.5rem;
    }
    
    .battle-progress {
        width: 120px;
    }
    
    .btn-battle-start, .btn-battle-reset {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .battle-specs {
        padding: 16px;
    }
    
    .spec-battle-row {
        padding: 8px 0;
    }
    
    .spec-name {
        font-size: 0.8rem;
    }
    
    .spec-value {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .battle-verdict {
        padding: 20px 16px;
    }
    
    .winner-crown i {
        font-size: 2rem;
    }
    
    .verdict-title {
        font-size: 1.25rem;
    }
    
    .winner-announcement {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }
    
    .final-score {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}

@media (max-width: 360px) {
    .comparison-panel {
        left: 4px;
        right: 4px;
    }
    
    .comparison-toggle-btn {
        bottom: 12px;
        right: 12px;
        width: 45px;
        height: 45px;
    }
    
    .comparison-header h3 {
        font-size: 1rem;
    }
    
    .comparison-content {
        padding: 12px;
    }
    
    .slot-component-info h4 {
        font-size: 0.8rem;
    }
    
    .btn-compare, .btn-clear {
        padding: 8px 16px;
        font-size: 0.75rem;
    }
    
    .battle-arena {
        padding: 12px;
    }
    
    .participant-image {
        width: 70px;
        height: 70px;
    }
    
    .participant-name {
        font-size: 0.9rem;
    }
    
    .battle-verdict {
        padding: 16px 12px;
    }
    
    .verdict-title {
        font-size: 1.1rem;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    .battle-arena {
        min-height: 60vh;
        padding: 16px;
    }
    
    .battle-participants {
        margin-bottom: 20px;
    }
    
    .participant-image {
        width: 80px;
        height: 80px;
        margin-bottom: 12px;
    }
    
    .battle-center {
        gap: 12px;
    }
    
    .battle-specs {
        padding: 16px;
    }
    
    .battle-verdict {
        padding: 20px;
        max-width: 320px;
    }
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --shadow-light: rgba(0, 0, 0, 0.2);
        --shadow-medium: rgba(0, 0, 0, 0.3);
    }
    
    .comparison-panel,
    .battle-arena {
        border: 2px solid var(--primary-color);
    }
}
.search-section {
    margin-bottom: 25px;
    animation: slideInDown 0.8s ease 0.2s both;
}

.search-form {
    max-width: 600px;
    margin: 0 auto;
}

.search-input-group {
    display: flex;
    gap: 0;
    background: var(--surface);
    border-radius: 12px;
    padding: 4px;
    box-shadow: 0 4px 15px var(--shadow-light);
    border: 1px solid var(--border-color);
}

.search-input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    border-radius: 8px;
}

.search-input:focus {
    outline: none;
    background: rgba(37, 99, 235, 0.02);
}

.search-btn {
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.pagination-wrapper {
    margin-top: 30px;
    padding: 20px 0;
}

.pagination-info {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

.pagination {
    margin: 0;
}

.page-link {
    color: var(--primary-color);
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    margin: 0 2px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.page-link:hover {
    color: white;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.page-item.disabled .page-link {
    color: var(--text-light);
    background-color: var(--background);
    border-color: var(--border-color);
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .search-input-group {
        flex-direction: column;
        gap: 8px;
        padding: 8px;
    }
    
    .search-btn {
        justify-content: center;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
}
