:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --secondary-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

.app-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 5px 1px;
    margin-bottom: 5px;
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 1.8rem;
}

.language-switcher {
    display: flex;
    gap: 8px;
}

.lang-btn {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    color: var(--text-secondary);
}

.lang-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.lang-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.selection-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 5px 1px;
    box-shadow: var(--shadow-md);
}

.search-boxes {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    width: 100%;
    margin-bottom: 15px;
    align-items: flex-start;
}

.search-box-wrapper {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 0;
}

.search-box input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-box-btn {
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-box-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 2px;
    max-height: 500px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
}

.character-grid::-webkit-scrollbar {
    width: 8px;
}

.character-grid::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.character-grid::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 4px;
}

.character-grid::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.character-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    position: relative;
    min-height: 80px;
}

.character-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.character-item.selected {
    background: var(--primary-light);
    border-color: var(--primary-color);
}

.character-item.selected::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--primary-color);
    color: white;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.character-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.character-img {
    width: 100%;
    aspect-ratio: 0.6;
    object-fit: contain;
    border-radius: 4px;
    background: var(--bg-primary);
}

.character-name-fallback {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    width: 100%;
    aspect-ratio: 0.6;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 4px;
}

.selected-item-img {
    width: 56px;
    aspect-ratio: 0.6;
    object-fit: contain;
    border-radius: 4px;
    display: block;
    background: var(--bg-primary);
}

.selected-item-text {
    font-weight: 600;
    font-size: 1.2rem;
    width: 56px;
    aspect-ratio: 0.6;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 4px;
}

.result-character-img {
    width: 100%;
    aspect-ratio: 0.6;
    object-fit: contain;
    border-radius: 4px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.result-character-img.highlighted {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-light), 0 0 8px rgba(79, 70, 229, 0.3);
}

.favorite-character-img {
    width: 100%;
    aspect-ratio: 0.6;
    object-fit: contain;
    border-radius: 4px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
}

.selected-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 5px 1px;
    box-shadow: var(--shadow-md);
}

.selected-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.selected-header h2 {
    font-size: 1.2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.selected-header h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.clear-btn {
    padding: 8px 20px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.clear-btn:hover {
    background: var(--danger-color);
    color: white;
}

.selected-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    min-height: 80px;
    padding: 5px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 2px dashed var(--border-color);
}

.empty-hint {
    color: var(--text-light);
    font-size: 0.95rem;
    width: 100%;
    text-align: center;
    padding: 10px;
}

.selected-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    background: var(--bg-primary);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    animation: slideIn 0.3s ease;
    position: relative;
}

.selected-item:hover {
    border-color: var(--danger-color);
    transform: scale(1.05);
}

.selected-item::after {
    content: '×';
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--danger-color);
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.selected-item:hover::after {
    opacity: 1;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.selected-item .remove-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: var(--transition);
}

.selected-item .remove-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.action-section {
    text-align: center;
    padding: 5px 1px;
}

.search-btn {
    padding: 12px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #818cf8, #67e8f9);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.search-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(129, 140, 248, 0.4);
}

.search-btn:active {
    transform: translateY(-1px);
}

.search-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.favorites-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 5px 1px;
    box-shadow: var(--shadow-md);
    display: none;
}

.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.favorites-header h2 {
    font-size: 1.3rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.favorites-header h2 i {
    color: var(--warning-color);
}

.favorites-count {
    background: var(--warning-color);
    color: white;
    padding: 6px 15px;
    border-radius: var(--radius-md);
    font-weight: 600;
}

.favorites-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.action-btn.primary {
    background: var(--primary-color);
    color: white;
}

.action-btn.primary:hover {
    background: var(--primary-hover);
}

.action-btn.danger {
    background: var(--danger-color);
    color: white;
}

.action-btn.danger:hover {
    background: #dc2626;
}

.favorites-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.favorite-card {
    background: var(--bg-secondary);
    border: 2px solid var(--warning-color);
    border-radius: var(--radius-md);
    padding: 15px;
    transition: var(--transition);
}

.favorite-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.favorite-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.favorite-id {
    flex: 1;
    background: linear-gradient(135deg, var(--warning-color), #f97316);
    color: white;
    padding: 8px 15px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.favorite-id.clickable:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.favorite-id.copied {
    background: var(--success-color);
}

.favorite-characters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 4px;
    margin-bottom: 10px;
    width: 100%;
}

.favorite-character-img {
    width: 100%;
    aspect-ratio: 0.6;
    object-fit: contain;
    border-radius: 4px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.favorite-character {
    background: var(--bg-primary);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorite-count-badge {
    background: var(--warning-color);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.8rem;
    display: inline-block;
}

.remove-favorite-btn {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
    flex-shrink: 0;
}

.remove-favorite-btn:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

.results-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 5px 1px;
    box-shadow: var(--shadow-md);
    display: none;
}

.results-section.visible {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-tertiary);
}

.results-header h2 {
    font-size: 1.3rem;
    color: var(--text-primary);
}

.result-count {
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 6px 15px;
    border-radius: var(--radius-md);
    font-weight: 600;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.sort-controls span {
    color: var(--text-secondary);
    font-weight: 500;
}

.sort-btn {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sort-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.sort-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.loading {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    gap: 15px;
}

.loading.visible {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.results-container {
    display: grid;
    gap: 10px;
    padding: 0 1px;
}

.result-card {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.result-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.result-card.is-favorite {
    border-color: var(--warning-color);
    background: #fffbeb;
}

.result-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: nowrap;
}

.result-id {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.result-id.clickable:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.result-id.copied {
    background: var(--success-color);
}

.result-characters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 4px;
    margin-bottom: 8px;
    width: 100%;
}

.result-character-img {
    width: 100%;
    aspect-ratio: 0.6;
    object-fit: contain;
    border-radius: 4px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.result-character-img.highlighted {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-light), 0 0 8px rgba(79, 70, 229, 0.3);
}

.result-character {
    background: var(--bg-primary);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.result-character.highlighted {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-light), 0 0 8px rgba(79, 70, 229, 0.3);
}

.result-count-badge {
    background: var(--warning-color);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.8rem;
    display: inline-block;
}

.favorite-btn {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.favorite-btn:hover {
    border-color: var(--warning-color);
    color: var(--warning-color);
}

.favorite-btn.active {
    background: var(--warning-color);
    border-color: var(--warning-color);
    color: white;
}

.copy-btn {
    padding: 12px 25px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-btn:hover {
    background: #059669;
    transform: translateY(-2px);
}

.copy-btn.copied {
    background: var(--primary-color);
}

.no-results {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.no-results i {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.pagination-container {
    margin-top: 20px;
    padding: 20px 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
}

.page-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-ellipsis {
    padding: 0 8px;
    color: var(--text-light);
    font-size: 1.1rem;
}

.page-info {
    text-align: center;
    margin-top: 15px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer {
    text-align: center;
    padding: 20px 1px;
    color: white;
    margin-top: 5px;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: white;
    padding: 15px 30px;
    border-radius: var(--radius-md);
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--success-color);
}

.toast.error {
    background: var(--danger-color);
}

@media (max-width: 768px) {
    .app-container {
        padding: 1px;
    }

    .header {
        padding: 5px 1px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .logo {
        font-size: 1.3rem;
    }

    .selection-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-boxes {
        flex-direction: column;
    }

    .search-box-wrapper {
        width: 100%;
        min-width: 0;
    }

    .search-box {
        width: 100%;
    }

    .search-box-btn {
        padding: 10px 14px;
    }

    .character-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        max-height: 300px;
    }

    .search-btn {
        width: 100%;
        justify-content: center;
    }

    .result-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .result-info {
        width: 100%;
    }

    .result-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .copy-btn {
        flex: 1;
        justify-content: center;
    }

    .pagination {
        gap: 5px;
    }
    
    .page-btn {
        min-width: 36px;
        height: 36px;
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    .page-info {
        font-size: 0.85rem;
    }

    .favorites-container {
        grid-template-columns: 1fr;
    }

    .favorites-actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }

    .sort-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .sort-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 1px;
    }

    .character-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 2px;
    }

    .character-item {
        padding: 2px;
    }

    .character-img {
        width: 100%;
        aspect-ratio: 0.6;
        object-fit: contain;
    }

    .character-name {
        font-size: 1rem;
    }

    .result-characters,
    .favorite-characters {
        grid-template-columns: repeat(5, 1fr);
        gap: 2px;
    }

    .result-character-img,
    .favorite-character-img {
        width: 100%;
        aspect-ratio: 0.6;
        object-fit: contain;
    }

    .language-switcher {
        flex-wrap: wrap;
        justify-content: center;
    }

    .lang-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .page-btn {
        min-width: 32px;
        height: 32px;
        padding: 4px 8px;
        font-size: 0.8rem;
    }
}

.results-actions-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.action-btn.primary {
    background: var(--primary-color);
    color: white;
}

.action-btn.primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.action-btn.danger {
    background: var(--danger-color);
    color: white;
}

.action-btn.danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.skeleton-container {
    display: none;
    gap: 12px;
}

.skeleton-container.visible {
    display: grid;
}

.skeleton-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 15px;
    position: relative;
    overflow: hidden;
    min-height: 80px;
}

.skeleton-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255,255,255,0.4) 50%, 
        transparent 100%);
    animation: skeleton-loading 1.5s infinite;
}

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

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal.visible {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 25px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--danger-color);
    color: white;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-body input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    background: var(--bg-secondary);
}

.modal-body .action-btn {
    width: 100%;
    justify-content: center;
}
