/
sadwas3da
/
site2
Обзор
Документация
Войти
/
sadwas3da
/
site2
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
css
216 строк
4 KB
sadwas3da
create css
10 ноя 2025, 21:19
10 ноя 2025, 21:19
6d01a6f
Код
Авторство
О чём код?
* { margin: 0; padding: 0; box-sizing: border-box; } :root { --bg: #f5f7fa; --text: #333; --accent: #667eea; --card-bg: #fff; --input-border: rgba(0, 0, 0, 0.15); --placeholder: #888; --shadow: 0 20px 40px rgba(0, 0, 0, 0.1); --border-radius: 16px; --font-family: 'Inter', sans-serif; --line-height: 1.6; --transition-duration: 0.3s; } .dark { --bg: #121212; --text: #e0e0e0; --accent: #ff5252; --card-bg: #212121; --input-border: rgba(255, 255, 255, 0.2); --placeholder: #aaa; --shadow: 0 20px 40px rgba(0, 0, 0, 0.3); } body { font-family: var(--font-family); background: var(--bg); color: var(--text); line-height: var(--line-height); min-height: 100vh; transition: background-color var(--transition-duration), color var(--transition-duration); } .wrapper { min-height: 100vh; display: flex; flex-direction: column; } .header { text-align: center; padding: 40px 20px 20px; position: relative; } .logo { font-size: 1.8em; font-weight: 800; letter-spacing: 1px; color: var(--accent); margin-bottom: 10px; } .header h1 { font-size: 2.4em; margin-bottom: 10px; } .subtitle { font-size: 1.2em; opacity: 0.8; } /* Переключатель темы */ .theme-switch { display: flex; align-items: center; gap: 10px; position: absolute; top: 20px; right: 20px; } .switch-label { position: relative; display: inline-block; width: 50px; height: 26px; } .switch-input { opacity: 0; width: 0; height: 0; } .switch-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--input-border); border-radius: 34px; transition: background-color var(--transition-duration); } .switch-slider::before { position: absolute; content: ''; height: 18px; width: 18px; left: 4px; bottom: 4px; background-color: white; border-radius: 50%; transition: transform var(--transition-duration); } .switch-input:checked + .switch-slider { background-color: var(--accent); } .switch-input:checked + .switch-slider::before { transform: translateX(24px); } .switch-text { font-size: 0.9em; color: var(--text); } .main { flex: 1; padding: 0 20px; } .search-container { max-width: 700px; margin: 0 auto 40px; display: flex; gap: 12px; } #searchInput { flex: 1; padding: 16px 20px; border: 2px solid var(--input-border); border-radius: 12px; background: var(--card-bg); color: var(--text); font-size: 1em; outline: none; transition: border-color var(--transition-duration); } #searchInput::placeholder { color: var(--placeholder); } #searchInput:focus { border-color: var(--accent); } #searchButton { padding: 0 24px; background: var(--accent); color: white; border: none; border-radius: 12px; cursor: pointer; font-weight: 600; font-size: 1em; transition: background var(--transition-duration); } #searchButton:hover { background: #556cd6; /* затемнённый акцент */ } .loading { text-align: center; font-size: 1.2em; color: var(--accent); margin: 30px auto; animation: pulse 1.5s infinite; } @keyframes pulse { 0% { opacity: 0.4; } 50% { opacity: 1; } 100% { opacity: 0.4; } } .hidden { display: none !important; } .results { max-width: 800px; margin: 0 auto; background: var(--card-bg); border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--shadow); } /* Дополнительные стили для footer */ .footer { text-align: center; padding: 20px; font-size: 0.9em; color: var(--text); opacity: 0.7; background: var(--card-bg); border-top: 1px solid var(--input-border); }