Files
interfaces/lab1/screen-forms/common.css

412 lines
9.6 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* Общие переменные для всех экранных форм приложения "По грибы!" */
:root {
/* Цветовая палитра */
--color-primary: #2D5F3F;
/* Лесной зелёный */
--color-primary-light: #3A7A52;
/* Светлый зелёный для градиентов */
--color-accent: #E67E22;
/* Янтарный оранжевый */
--color-danger: #C0392B;
/* Тревожный красный */
--color-info: #3498DB;
/* Небесный голубой */
/* Нейтральная палитра */
--color-text-dark: #2C3E50;
/* Основной цвет текста */
--color-text-medium: #7F8C8D;
/* Второстепенный текст */
--color-bg-light: #FAFAFA;
/* Основной фон */
--color-bg-card: #FFFFFF;
/* Фон карточек */
--color-border: #ECF0F1;
/* Разделители */
--color-bg-secondary: #ECF0F1;
/* Вторичный фон */
/* Семантические цвета */
--color-success: #2ECC71;
/* Успех */
--color-warning: #F39C12;
/* Предупреждение */
/* Типографика */
--font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
--font-size-base: 16px;
--font-size-small: 14px;
--font-size-tiny: 12px;
--font-size-large: 18px;
--font-size-xlarge: 22px;
--font-size-xxlarge: 24px;
--font-weight-regular: 400;
--font-weight-medium: 500;
--font-weight-semibold: 600;
--font-weight-bold: 700;
--line-height-tight: 1.2;
--line-height-normal: 1.4;
--line-height-relaxed: 1.5;
/* Размеры и отступы */
--spacing-xs: 4px;
--spacing-sm: 8px;
--spacing-md: 12px;
--spacing-lg: 16px;
--spacing-xl: 20px;
--spacing-xxl: 24px;
--spacing-xxxl: 32px;
/* Радиусы скругления */
--radius-sm: 8px;
--radius-md: 12px;
--radius-lg: 16px;
--radius-full: 50%;
/* Размеры элементов */
--touch-target-min: 48px;
/* Минимальный размер для касания */
--touch-target-large: 56px;
/* Увеличенный размер */
--sos-button-size: 80px;
/* Размер кнопки SOS */
/* Размеры контейнера */
--app-width: 375px;
--app-height: 700px;
--header-height: 64px;
--nav-height: 72px;
/* Тени */
--shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
--shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
--shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.1);
--shadow-sos: 0 4px 16px rgba(192, 57, 43, 0.4);
/* Длительность анимаций */
--transition-fast: 150ms;
--transition-medium: 250ms;
--transition-slow: 400ms;
}
/* Общие стили сброса */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: var(--font-family);
background-color: var(--color-bg-light);
color: var(--color-text-dark);
font-size: var(--font-size-base);
line-height: var(--line-height-normal);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* Контейнер приложения */
.app-container {
width: var(--app-width);
height: var(--app-height);
margin: 20px auto;
background: var(--color-bg-light);
position: relative;
display: flex;
flex-direction: column;
box-shadow: var(--shadow-lg);
border-radius: 20px;
overflow: hidden;
}
/* Шапка приложения */
.app-header {
background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
padding: var(--spacing-lg) var(--spacing-xl) var(--spacing-md);
box-shadow: var(--shadow-md);
}
.header-content {
display: flex;
align-items: center;
gap: var(--spacing-md);
}
.app-logo {
width: 36px;
height: 36px;
object-fit: contain;
}
.app-title {
font-size: var(--font-size-xxlarge);
font-weight: var(--font-weight-bold);
color: var(--color-bg-card);
letter-spacing: -0.5px;
}
/* Основной контент */
.app-main {
flex: 1;
overflow-y: auto;
padding-bottom: calc(var(--nav-height) + var(--spacing-sm));
}
.content-container {
padding: var(--spacing-xl);
}
/* Скроллбар */
.app-main::-webkit-scrollbar {
width: 4px;
}
.app-main::-webkit-scrollbar-track {
background: transparent;
}
.app-main::-webkit-scrollbar-thumb {
background: #BDC3C7;
border-radius: 2px;
}
.app-main::-webkit-scrollbar-thumb:hover {
background: #95A5A6;
}
/* Заголовки */
.screen-title {
font-size: var(--font-size-xlarge);
font-weight: var(--font-weight-semibold);
color: var(--color-text-dark);
margin-bottom: var(--spacing-sm);
}
.screen-description {
font-size: var(--font-size-base);
line-height: var(--line-height-relaxed);
color: var(--color-text-medium);
margin-bottom: var(--spacing-xxl);
}
/* Карточки */
.card {
background: var(--color-bg-card);
border-radius: var(--radius-md);
padding: var(--spacing-lg);
margin-bottom: var(--spacing-lg);
box-shadow: var(--shadow-md);
}
.card-title {
font-size: var(--font-size-large);
font-weight: var(--font-weight-semibold);
color: var(--color-text-dark);
margin-bottom: var(--spacing-sm);
}
.card-text {
font-size: var(--font-size-base);
line-height: var(--line-height-normal);
color: var(--color-text-medium);
}
/* Элементы списка */
.list-item {
display: flex;
align-items: center;
gap: var(--spacing-md);
background: var(--color-bg-card);
border-radius: var(--radius-md);
padding: 14px var(--spacing-lg);
margin-bottom: var(--spacing-md);
box-shadow: var(--shadow-sm);
transition: transform var(--transition-fast) ease, box-shadow var(--transition-fast) ease;
cursor: pointer;
}
.list-item:active {
transform: scale(0.98);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.list-item-icon {
font-size: 28px;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
background: var(--color-bg-secondary);
border-radius: 10px;
flex-shrink: 0;
}
.list-item-content {
flex: 1;
}
.list-item-title {
font-size: 17px;
font-weight: var(--font-weight-medium);
color: var(--color-text-dark);
margin-bottom: 3px;
}
.list-item-subtitle {
font-size: var(--font-size-small);
color: var(--color-text-medium);
}
/* Кнопки */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: var(--spacing-sm);
padding: var(--spacing-md) var(--spacing-xxl);
border: none;
border-radius: var(--radius-sm);
font-size: var(--font-size-base);
font-weight: var(--font-weight-semibold);
cursor: pointer;
transition: all var(--transition-fast) ease;
min-height: var(--touch-target-min);
}
.btn-primary {
background: var(--color-accent);
color: var(--color-bg-card);
}
.btn-primary:active {
background: #D35400;
transform: scale(0.97);
}
.btn-secondary {
background: var(--color-bg-secondary);
color: var(--color-text-dark);
}
.btn-secondary:active {
background: #D5DBDB;
transform: scale(0.97);
}
.btn-full {
width: 100%;
}
/* Нижняя навигация */
.app-navigation {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: var(--nav-height);
background: var(--color-bg-card);
border-top: 1px solid var(--color-border);
display: flex;
justify-content: space-around;
align-items: center;
padding: var(--spacing-sm) 0;
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}
.nav-button {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: var(--spacing-xs);
background: none;
border: none;
padding: 6px 10px;
cursor: pointer;
transition: transform var(--transition-fast) ease;
min-width: 56px;
}
.nav-button:active {
transform: scale(0.95);
}
.nav-icon {
font-size: 24px;
line-height: 1;
}
.nav-label {
font-size: 11px;
color: var(--color-text-medium);
font-weight: var(--font-weight-medium);
}
.nav-button-active .nav-label {
color: var(--color-primary);
font-weight: var(--font-weight-semibold);
}
.nav-button-active {
position: relative;
}
.nav-button-active::after {
content: '';
position: absolute;
bottom: -8px;
left: 50%;
transform: translateX(-50%);
width: 32px;
height: 3px;
background: var(--color-primary);
border-radius: 2px 2px 0 0;
}
/* Кнопка SOS */
.sos-button {
position: absolute;
bottom: calc(var(--nav-height) + var(--spacing-lg));
right: var(--spacing-xl);
width: var(--sos-button-size);
height: var(--sos-button-size);
background: var(--color-danger);
border: 4px solid var(--color-bg-card);
border-radius: var(--radius-full);
display: flex;
align-items: center;
justify-content: center;
box-shadow: var(--shadow-sos);
cursor: pointer;
transition: transform var(--transition-fast) ease, box-shadow var(--transition-fast) ease;
z-index: 100;
animation: pulse 2s ease-in-out infinite;
}
.sos-button:active {
transform: scale(0.95);
box-shadow: 0 2px 8px rgba(192, 57, 43, 0.5);
}
.sos-icon {
font-size: 32px;
color: var(--color-bg-card);
font-weight: bold;
}
@keyframes pulse {
0%,
100% {
box-shadow: 0 4px 16px rgba(192, 57, 43, 0.4);
}
50% {
box-shadow: 0 4px 24px rgba(192, 57, 43, 0.6);
}
}