nakama/frontend/src/pages/Search.css

436 lines
7.1 KiB
CSS
Raw Normal View History

2025-11-03 20:35:01 +00:00
.search-page {
min-height: 100vh;
}
.search-header {
position: sticky;
top: 0;
background: var(--bg-secondary);
padding: 16px;
border-bottom: 1px solid var(--divider-color);
z-index: 10;
2025-11-03 22:17:25 +00:00
display: flex;
justify-content: space-between;
align-items: center;
2025-11-03 20:35:01 +00:00
}
.search-header h1 {
font-size: 24px;
font-weight: 700;
color: var(--text-primary);
}
2025-11-03 22:17:25 +00:00
.selection-toggle {
padding: 8px 16px;
border-radius: 20px;
background: var(--bg-primary);
color: var(--text-primary);
font-size: 14px;
font-weight: 600;
border: none;
cursor: pointer;
}
.selection-toggle.active {
background: #1C1C1E;
color: white;
}
[data-theme="dark"] .selection-toggle.active {
background: #FFFFFF;
color: #000000;
}
2025-11-03 20:35:01 +00:00
.search-modes {
display: flex;
gap: 8px;
padding: 12px 16px;
background: var(--bg-secondary);
border-bottom: 1px solid var(--divider-color);
}
.mode-btn {
padding: 8px 16px;
border-radius: 20px;
2025-11-03 22:03:30 +00:00
background: #E5E5EA;
color: #666666;
2025-11-03 20:35:01 +00:00
font-size: 14px;
font-weight: 600;
transition: all 0.2s;
}
.mode-btn.active {
2025-11-03 22:03:30 +00:00
background: #1C1C1E;
color: #FFFFFF;
font-weight: 700;
2025-11-03 21:29:00 +00:00
}
2025-11-03 22:03:30 +00:00
/* Тёмная тема */
2025-11-03 21:29:00 +00:00
[data-theme="dark"] .mode-btn {
2025-11-03 22:03:30 +00:00
background: #3A3A3C;
color: #999999;
2025-11-03 21:43:00 +00:00
font-weight: 600;
2025-11-03 21:29:00 +00:00
}
[data-theme="dark"] .mode-btn.active {
2025-11-03 21:43:00 +00:00
background: #FFFFFF;
color: #000000;
font-weight: 700;
2025-11-03 20:35:01 +00:00
}
.search-container {
padding: 16px;
background: var(--bg-secondary);
position: relative;
}
.search-input-wrapper {
display: flex;
align-items: center;
gap: 8px;
padding: 12px 16px;
background: var(--search-bg);
border-radius: 24px;
}
.search-icon {
color: var(--search-icon);
flex-shrink: 0;
}
.search-input-wrapper input {
flex: 1;
background: transparent;
color: var(--text-primary);
font-size: 16px;
}
.clear-btn {
width: 24px;
height: 24px;
border-radius: 50%;
background: var(--text-secondary);
color: white;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.tag-suggestions {
position: absolute;
top: 70px;
left: 16px;
right: 16px;
background: var(--bg-secondary);
border-radius: 12px;
box-shadow: 0 4px 12px var(--shadow-lg);
overflow: hidden;
z-index: 100;
animation: scaleIn 0.2s;
}
.tag-suggestion {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 16px;
background: transparent;
transition: background 0.2s;
}
.tag-suggestion:not(:last-child) {
border-bottom: 1px solid var(--divider-color);
}
.tag-suggestion:active {
background: var(--bg-primary);
}
.tag-name {
font-size: 15px;
color: var(--text-primary);
font-weight: 500;
}
.tag-count {
font-size: 13px;
color: var(--text-secondary);
}
.search-results {
padding: 16px;
min-height: 400px;
}
.results-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 12px;
}
.result-item {
position: relative;
aspect-ratio: 1;
overflow: hidden;
cursor: pointer;
padding: 0;
2025-11-03 22:17:25 +00:00
transition: all 0.2s;
}
.result-item.selected {
outline: 3px solid #1C1C1E;
outline-offset: -3px;
}
[data-theme="dark"] .result-item.selected {
outline-color: #FFFFFF;
2025-11-03 20:35:01 +00:00
}
.result-item img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.2s;
}
.result-item:active img {
transform: scale(1.05);
}
2025-11-03 22:17:25 +00:00
.selection-checkbox {
position: absolute;
top: 8px;
right: 8px;
width: 28px;
height: 28px;
border-radius: 50%;
background: #1C1C1E;
color: white;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
font-weight: bold;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .selection-checkbox {
background: #FFFFFF;
color: #000000;
}
.send-selected-bar {
position: fixed;
bottom: 80px;
left: 0;
right: 0;
padding: 12px 16px;
background: var(--bg-secondary);
border-top: 1px solid var(--divider-color);
z-index: 100;
}
.send-selected-btn {
width: 100%;
padding: 14px;
border-radius: 12px;
background: #1C1C1E;
color: white;
font-size: 16px;
font-weight: 600;
border: none;
cursor: pointer;
}
[data-theme="dark"] .send-selected-btn {
background: #FFFFFF;
color: #000000;
}
2025-11-03 20:35:01 +00:00
.result-overlay {
position: absolute;
bottom: 0;
left: 0;
right: 0;
padding: 8px;
background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
display: flex;
justify-content: space-between;
align-items: center;
}
.result-source {
font-size: 11px;
font-weight: 600;
color: white;
text-transform: uppercase;
}
.result-rating {
font-size: 11px;
font-weight: 600;
color: white;
padding: 2px 6px;
border-radius: 4px;
background: rgba(255, 255, 255, 0.2);
}
/* Просмотрщик изображений */
.image-viewer {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.95);
z-index: 1000;
display: flex;
flex-direction: column;
animation: fadeIn 0.2s;
}
.viewer-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px;
background: rgba(0, 0, 0, 0.5);
}
2025-11-03 22:17:25 +00:00
.viewer-actions {
display: flex;
gap: 8px;
}
2025-11-03 20:35:01 +00:00
.viewer-btn {
width: 44px;
height: 44px;
border-radius: 50%;
2025-11-03 22:17:25 +00:00
background: rgba(255, 255, 255, 0.15);
2025-11-03 20:35:01 +00:00
color: white;
display: flex;
align-items: center;
justify-content: center;
backdrop-filter: blur(10px);
2025-11-03 22:17:25 +00:00
border: none;
cursor: pointer;
}
.viewer-btn svg {
stroke: white;
2025-11-03 20:35:01 +00:00
}
.viewer-counter {
font-size: 16px;
font-weight: 600;
color: white;
}
.viewer-content {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
2025-11-03 22:17:25 +00:00
position: relative;
user-select: none;
-webkit-user-select: none;
touch-action: pan-y pinch-zoom;
2025-11-03 20:35:01 +00:00
}
.viewer-content img {
max-width: 100%;
max-height: 100%;
object-fit: contain;
2025-11-03 22:17:25 +00:00
pointer-events: none;
}
2025-11-10 20:35:21 +00:00
.viewer-content video {
max-width: 100%;
max-height: 100%;
object-fit: contain;
background: black;
}
2025-11-03 22:17:25 +00:00
.swipe-hint {
position: absolute;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
display: flex;
align-items: center;
gap: 12px;
padding: 8px 16px;
background: rgba(0, 0, 0, 0.7);
border-radius: 20px;
color: white;
font-size: 13px;
backdrop-filter: blur(10px);
animation: fadeIn 0.3s;
}
.swipe-hint svg {
stroke: white;
2025-11-03 20:35:01 +00:00
}
.viewer-nav {
position: absolute;
top: 50%;
left: 0;
right: 0;
transform: translateY(-50%);
display: flex;
justify-content: space-between;
padding: 0 16px;
pointer-events: none;
}
.nav-btn {
width: 56px;
height: 56px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.15);
color: white;
display: flex;
align-items: center;
justify-content: center;
backdrop-filter: blur(10px);
pointer-events: all;
}
.nav-btn:disabled {
opacity: 0.3;
}
.viewer-info {
padding: 16px;
background: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(10px);
}
.info-tags {
display: flex;
gap: 8px;
flex-wrap: wrap;
margin-bottom: 12px;
}
.info-tag {
padding: 4px 10px;
border-radius: 12px;
background: rgba(255, 255, 255, 0.15);
color: white;
font-size: 12px;
font-weight: 500;
}
.info-stats {
display: flex;
gap: 16px;
font-size: 13px;
color: rgba(255, 255, 255, 0.7);
}