/* Кнопки */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.sort-arrow {
    width: 24px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #ff8a65);
    color: white;
    box-shadow: 0 0 20px rgba(255, 108, 66, 0.4);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 30px rgba(255, 108, 66, 0.6), 0 8px 25px rgba(255, 108, 66, 0.3);
    animation: pulse 0.6s ease-in-out;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), #26c6da);
    color: white;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.6), 0 8px 25px rgba(0, 212, 255, 0.3);
}

.btn-tertiary {
    background: linear-gradient(135deg, #7c4dff, #b388ff);
    color: white;
    box-shadow: 0 0 18px rgba(124, 77, 255, 0.35);
    border-color: #7c4dff;
}

.btn-tertiary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 26px rgba(124, 77, 255, 0.55), 0 8px 22px rgba(124, 77, 255, 0.25);
}

.btn-small {
    padding: 10px 12px;
}

.btn-rate {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: var(--border-radius-small);
    backdrop-filter: blur(6px);
    font-weight: 700;
    letter-spacing: 0.03em;
    transition: var(--transition);
}

.btn-rate.btn-icon {
    padding: 8px 14px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-rate.btn-icon::after {
    content: "★";
    font-size: 1rem;
    color: #ffd75e;
    margin-left: 4px;
}

.btn-rate:hover {
    background: rgba(0, 212, 255, 0.15);
    box-shadow: 0 0 18px rgba(0, 212, 255, 0.35);
    transform: translateY(-2px);
}

.btn-rate:active {
    transform: translateY(0);
    box-shadow: 0 0 2px rgba(0, 212, 255, 0.2);
}

.btn-rate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.05);
}

.loading-spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--secondary-color);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: spin 1s linear infinite;
}

.autocomplete-loading {
    display: flex;
    justify-content: center;
    padding: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-text-delete {
    background: none;
    border: none;
    color: #ff4d4d;
    text-decoration: underline;
    font-size: 0.8rem;
    padding: 10px;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
    text-align: center;
    transition: opacity 0.2s;
    text-transform: none;
    letter-spacing: normal;
}

.btn-text-delete:hover {
    opacity: 0.8;
}