nakama/frontend/src/pages/Search.css

308 lines
4.9 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;
}
.search-header h1 {
font-size: 24px;
font-weight: 700;
color: var(--text-primary);
}
.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;
}
.result-item img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.2s;
}
.result-item:active img {
transform: scale(1.05);
}
.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);
}
.viewer-btn {
width: 44px;
height: 44px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.1);
color: white;
display: flex;
align-items: center;
justify-content: center;
backdrop-filter: blur(10px);
}
.viewer-counter {
font-size: 16px;
font-weight: 600;
color: white;
}
.viewer-content {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.viewer-content img {
max-width: 100%;
max-height: 100%;
object-fit: contain;
}
.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);
}