/* Иконка-геймпад и заголовок */
.gamepad-icon {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 4px;
    filter: drop-shadow(0 0 8px var(--accent));
}

.subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.05rem;
}

/* Блок для ошибок/успеха */
.combo-message {
    margin: 18px auto 0 auto;
    padding: 16px 20px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    max-width: 420px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    border: 2px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    display: none;
}
.combo-message.error {
    background: linear-gradient(90deg, #2d1b2b 0%, #3a1a1f 100%);
    color: var(--error);
    border-color: var(--border-red);
}
.combo-message.success {
    background: linear-gradient(90deg, #1b2d1b 0%, #1a3a1f 100%);
    color: var(--success);
    border-color: var(--success);
}

/* Номер и название навыка */
.skill-num {
    color: var(--accent-red);
    font-weight: bold;
    margin-right: 2px;
    font-size: 0.95em;
}
.skill-name {
    color: var(--text-primary);
}
/* Фэнтезийный дизайн с фиолетово-красной гаммой */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #050a18;
    --bg-card: #0f1729;
    --text-primary: #ffffff;
    --text-secondary: #d0d8ec;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: #60a5fa;
    --accent-red: #3b82f6;
    --accent-red-light: #60a5fa;
    --border: #1e293b;
    --border-red: #1e3a8a;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --shadow: 0 4px 15px rgba(0,0,0,0.7);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.9);
    --glow-purple: 0 0 20px rgba(60, 130, 246, 0.5);
    --glow-red: 0 0 20px rgba(60, 130, 246, 0.5);
}

/* Верхняя панель с языками и телеграмом */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 200;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.lang-container {
    display: flex;
    gap: 8px;
}

.lang-btn {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.lang-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 0 10px rgba(30, 64, 175, 0.3);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
}

.telegram-btn {
    padding: 8px 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.telegram-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 12px rgba(30, 64, 175, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: url("../static/background.jpg") no-repeat center center fixed;
    background-size: cover;
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    padding: 40px 20px;
    padding-top: 60px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(220, 38, 38, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(220, 38, 38, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    top: -10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: -1;
    animation: floatMoon 8s ease-in-out infinite;
}

@keyframes floatMoon {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20px, 20px); }
}

.container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.container::before {
    content: '◆';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--accent);
    opacity: 0.6;
}

/* Заголовок */
header {
    text-align: center;
    margin-bottom: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.header-top {
    position: fixed;
    top: 0;
    right: 0;
    padding: 10px 20px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    width: 100%;
    pointer-events: none;
}

.lang-container {
    display: flex;
    gap: 8px;
    pointer-events: auto;
}

.lang-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.lang-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 25%, #1e40af 50%, #1e3a8a 75%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 20px rgba(30, 58, 175, 0.8)) drop-shadow(0 0 40px rgba(30, 64, 175, 0.6)) drop-shadow(0 0 60px rgba(30, 64, 175, 0.4));
    animation: titleGlow 3s ease-in-out infinite, titleFloat 4s ease-in-out infinite;
    position: relative;
    padding: 20px 30px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
}

h1::before {
    content: 'SLR BUILDS';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #1e3a8a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(20px);
    opacity: 0.7;
    z-index: -1;
}

h1::after {
    content: 'SLR BUILDS';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(8px);
    opacity: 0.4;
    z-index: -1;
    animation: titlePulse 2s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(30, 58, 175, 0.8)) drop-shadow(0 0 40px rgba(30, 64, 175, 0.6)) drop-shadow(0 0 60px rgba(30, 64, 175, 0.4)); }
    50% { filter: drop-shadow(0 0 30px rgba(30, 58, 175, 1)) drop-shadow(0 0 50px rgba(30, 64, 175, 0.8)) drop-shadow(0 0 70px rgba(30, 64, 175, 0.5)); }
}

@keyframes titleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes titlePulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

/* Ссылка на телеграм */
.telegram-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

.telegram-link:hover {
    color: var(--accent-hover);
}

/* Кнопки авторизации */
#auth-section, #user-section {
    display: flex;
    gap: 8px;
    align-items: center;
}

#builds-counter {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: inline-block;
}

#auth-section button, #user-section button {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

#auth-section button:hover, #user-section button:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

/* Subtitle и Message блоки */
.subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.combo-message {
    margin: 18px auto 0 auto;
    padding: 16px 20px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    max-width: 420px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    border: 2px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    display: none;
}
.combo-message.error {
    background: linear-gradient(90deg, #2d1b2b 0%, #3a1a1f 100%);
    color: var(--error);
    border-color: var(--border-red);
}
.combo-message.success {
    background: linear-gradient(90deg, #1b2d1b 0%, #1a3a1f 100%);
    color: var(--success);
    border-color: var(--success);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    pointer-events: none;
}

.modal-content {
    background: var(--bg-card);
    padding: 32px;
    border-radius: 16px;
    width: 90%;
    max-width: 360px;
    position: relative;
    pointer-events: auto;
    margin: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.modal-content input {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    pointer-events: auto;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.modal-content input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.modal-content button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    pointer-events: auto;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.modal-content button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.close {
    position: absolute;
    right: 16px;
    top: 16px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.close:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

/* Карточка выбора */
.selection-card {
    background: rgba(26, 31, 58, 0.85);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 5;
    backdrop-filter: blur(10px);
}

.view-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.view-tab {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(15, 23, 41, 0.9);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-tab:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.view-tab.active {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
    color: #fff;
    border-color: var(--accent-light);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}

.view-panel.active {
    display: block;
}

.tier-list-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tier-list-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.tier-list-export-area {
    flex: 1;
    min-width: 0;
}

.tier-list-export-area.exporting {
    padding: 6px;
}

.tier-list-title {
    margin: 0 0 6px 0;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.tier-list-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.tier-list-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.tier-action-btn {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(15, 23, 41, 0.85);
    color: var(--text-primary);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tier-action-btn:hover {
    border-color: var(--accent);
    color: var(--accent-light);
}

.tier-action-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.tier-download-btn {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95) 0%, rgba(37, 99, 235, 0.95) 100%);
    border-color: rgba(96, 165, 250, 0.7);
    color: #fff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}

.tier-download-btn:hover {
    color: #fff;
    border-color: rgba(147, 197, 253, 0.9);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.36);
}

.tier-download-btn.loading {
    opacity: 0.8;
}

.tier-list-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tier-row {
    display: grid;
    grid-template-columns: 78px 1fr;
    min-height: 86px;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(5, 10, 24, 0.78);
}

.tier-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
    color: #111827;
}

.tier-rank-S { background: #f87171; }
.tier-rank-A { background: #fdba74; }
.tier-rank-B { background: #fde68a; }
.tier-rank-C { background: #fef08a; }
.tier-rank-D { background: #bef264; }
.tier-rank-F { background: #86efac; }

.tier-dropzone,
.tier-hero-pool {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    min-height: 86px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.tier-dropzone.drag-over,
.tier-hero-pool.drag-over {
    background: rgba(59, 130, 246, 0.14);
}

.tier-pool-section {
    margin-top: 8px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

.tier-pool-title {
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.tier-hero-pool {
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: rgba(5, 10, 24, 0.65);
}

.tier-hero-icon {
    width: 58px;
    height: 58px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    cursor: grab;
    transition: transform 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.tier-hero-icon:hover {
    transform: translateY(-2px) scale(1.04);
    border-color: var(--accent);
}

.tier-hero-icon.dragging {
    opacity: 0.45;
    cursor: grabbing;
}

@media (max-width: 768px) {
    .tier-list-header {
        flex-direction: column;
    }

    .tier-list-actions {
        width: 100%;
        flex-direction: row;
    }

    .tier-action-btn {
        flex: 1;
    }

    .tier-row {
        grid-template-columns: 64px 1fr;
    }
}

.selection-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.1), transparent);
    transition: left 0.5s ease;
}

.selection-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 24px var(--glow-purple);
}

.selection-card:hover::before {
    left: 100%;
}

.selection-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-align: center;
}

/* Сетка навыков */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

/* Сетка 4x4 для форм */
.skills-grid-4x4 {
    display: grid;
    grid-template-columns: repeat(4, 80px);
    gap: 8px;
    justify-content: center;
    pointer-events: auto;
}

/* Кнопки навыков */
.skill-btn {
    padding: 12px 8px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.skill-btn::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 50%;
    opacity: 0.5;
    transition: all 0.2s ease;
}

.skill-btn:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.skill-btn.selected {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
    border-color: var(--accent-light);
    color: white;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.4);
    transform: scale(1.05);
}

.skill-btn.selected::after {
    background: white;
    opacity: 1;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

/* Кнопки навыков для форм - прямоугольные 80x40 */
.skill-btn-grid {
    width: 80px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.skill-btn-grid:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.skill-btn-grid.selected {
    background: var(--success);
    border-color: var(--success);
    color: white;
    font-weight: 600;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.6);
}

/* Центрированный заголовок */
.center-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.25rem;
}

/* Кнопка проверки */
.check-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.check-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
}

.check-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Кнопка добавить сборку */
.add-build-btn {
    display: block;
    width: 100%;
    padding: 12px 24px;
    margin-top: 12px;
    background: transparent;
    color: var(--accent);
    border: 1px dashed var(--accent);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.add-build-btn:hover {
    background: var(--accent);
    color: white;
    border-style: solid;
}

/* Большой модал */
.modal-large {
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    pointer-events: auto;
    margin: auto;
}

#hero-select-modal .modal-content {
    max-width: 750px;
}

.modal-large h2 {
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.form-group {
    margin-bottom: 18px;
    pointer-events: auto;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 600;
    text-align: center;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s ease;
    text-align: center;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.conditions-list {
    margin-bottom: 8px;
    pointer-events: auto;
}

.condition-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    pointer-events: auto;
}

.condition-row span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.condition-row select {
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.75rem;
    background: var(--bg-card);
    color: var(--text-primary);
}

.remove-btn {
    padding: 4px 8px;
    background: var(--error);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
    pointer-events: auto;
}

.add-condition-btn {
    background: transparent;
    border: 1px dashed var(--border);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    width: 100%;
    pointer-events: auto;
}

.add-condition-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.save-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
    pointer-events: auto;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

/* Сложные условия */
.complex-condition {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: rgba(15, 23, 41, 0.8);
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.condition-part {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
    min-width: 200px;
}

.condition-part span {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.multi-select {
    display: grid;
    grid-template-columns: repeat(4, 70px);
    gap: 6px;
    pointer-events: auto;
    justify-content: center;
}

.skill-btn-tiny {
    width: 70px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.skill-btn-tiny:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.skill-btn-tiny.selected {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    border-color: var(--success);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    transform: scale(1.05);
}

.condition-arrow {
    font-size: 1.2rem;
    color: var(--accent);
    font-weight: bold;
}

/* Счетчик */
.selection-counter {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 12px;
}

/* Результаты */
.results-area {
    margin-top: 24px;
}

/* Карточка комбо - с центрированием */
.combo-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.combo-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.2);
    transform: translateY(-4px);
}

.combo-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    text-transform: uppercase;
}

.combo-card p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 6px 0;
    padding-left: 0;
}

/* Герои в результатах */
.combo-heroes {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.combo-hero {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    border: 2px solid var(--border);
}

/* Автор и рейтинг */
.combo-card .author {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.combo-card .score {
    font-weight: 600;
    color: var(--text-primary);
}

.combo-heroes {
    display: flex;
    gap: 6px;
    margin: 8px 0;
    flex-wrap: wrap;
}

.combo-hero-icon {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: 1px solid var(--border);
    cursor: pointer;
}

.combo-hero-icon:hover {
    transform: scale(1.1);
    border-color: var(--accent);
}

/* Кнопки голосования */
.vote-buttons {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    justify-content: center;
}

.vote-buttons button {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--text-primary);
}

.vote-buttons button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    border-color: var(--accent);
}

/* Активные кнопки голосования */
.vote-btn-active-like {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border-color: #10b981 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4) !important;
}

.vote-btn-active-dislike {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    border-color: #ef4444 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4) !important;
}

/* Цвета для статусов */
.status-success { color: #10b981; font-weight: 500; }
.status-error { color: #f87171; font-weight: 500; }
.status-warning { color: #fbbf24; font-weight: 500; }
.status-info { color: var(--accent); font-weight: 500; }

/* Подсказка */
.combo-hint {
    margin-top: 12px;
    padding: 12px;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 8px;
    font-size: 0.8125rem;
    color: var(--text-primary);
    border-left: 3px solid var(--accent);
}

/* Обязательные навыки */
.required-skills {
    margin-top: 12px;
    padding: 12px;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    font-size: 0.8125rem;
    color: #ffffff;
    font-weight: 500;
    border-left: 3px solid #10b981;
}

/* Запрещенные навыки */
.forbidden-skills {
    margin-top: 8px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.15);
    border-radius: 8px;
    font-size: 0.8125rem;
    color: #f87171;
    border-left: 3px solid #ef4444;
}

/* Состояния */
.loading, .no-results, .error-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Выбор героев */
.heroes-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-slot {
    width: 70px;
    height: 70px;
    background: var(--bg-primary);
    border: 2px dashed var(--border);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.15s ease;
    pointer-events: auto;
}

.hero-slot:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.heroes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    align-items: center;
}

.heroes-icons-grid {
    display: grid;
    grid-template-columns: repeat(8, 60px);
    gap: 8px;
    max-height: 500px;
    overflow-y: auto;
}

.hero-icon {
    width: 60px;
    height: 60px;
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    opacity: 0.9;
}

.hero-icon:hover {
    border-color: var(--accent);
    opacity: 1;
    transform: scale(1.05);
}

.hero-icon.hero-remove {
    background: var(--error);
    border: none;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-bottom: 8px;
    margin-right: auto;
}

.hero-icon.hero-remove:hover {
    opacity: 0.9;
}

/* Адаптивность */
@media (max-width: 480px) {
    body {
        padding: 24px 16px;
    }
    
    .selection-card {
        padding: 16px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .skills-grid-4x4 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .skill-btn-grid {
        width: 100%;
    }
}

/* My Builds Styles */
.my-builds-list {
    max-height: 60vh;
    overflow-y: auto;
}

.my-build-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.my-build-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.my-build-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
    text-transform: uppercase;
}

.my-build-score {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
}

.my-build-heroes {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.my-build-skills {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.my-build-hint {
    font-size: 0.8125rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding: 8px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 6px;
    border-left: 2px solid var(--accent);
}

.my-build-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.edit-btn {
    flex: 1;
    padding: 10px 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.edit-btn:hover {
    background: var(--accent-hover);
}

.delete-btn {
    flex: 1;
    padding: 10px 16px;
    background: var(--error);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.delete-btn:hover {
    opacity: 0.9;
}
