        :root {
            --primary: #4361ee;
            --primary-dark: #3a56d4;
            --secondary: #7209b7;
            --success: #4cc9f0;
            --danger: #f72585;
            --warning: #ff9e00;
            --light: #f8f9fa;
            --dark: #212529;
            --gray: #6c757d;
            --light-gray: silver;
            --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            --card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
            --transition: all 0.3s ease;
            --border-radius: 12px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
            color: var(--dark);
            line-height: 1.6;
            min-height: 100vh;
            padding: 20px;
			padding-top: 10px;/* чтобы карточки не прилипали вплотную */
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
        }

		header {
			position: sticky;
			top: 0;
			z-index: 1000;
			background: #f2f2f2;
			padding: 12px 0;
			text-align: center;
			transition: box-shadow 0.3s;
		}

		header.scrolled {
			box-shadow:  0px 10px 13px 0px rgba(0, 0, 0, 0.2);
		}

        h1 {
            font-size: 2.8rem;
            font-weight: 700;
            color: var(--primary);
            margin-bottom: 8px;
            background: linear-gradient(90deg, var(--primary), var(--secondary));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
			text-align: center;
			margin: 0;
        }

        .subtitle {
            font-size: 0.5rem;
            color: var(--gray);
            font-weight: 400;
            max-width: 600px;
            margin: 0 auto;
        }

        /* Контролы */
        .controls-panel {
            background: white;
			border: 1px solid silver;
            border-radius: var(--border-radius);
            padding: 22px;
            margin-bottom: 30px;
            box-shadow: var(--card-shadow);
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            align-items: center;
        }

        .search-container {
            flex: 1;
            min-width: 250px;
            position: relative;
        }

        .search-container i {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--gray);
        }

        .search {
            width: 100%;
            padding: 12px 15px 12px 45px;
            border: 2px solid var(--light-gray);
            border-radius: 8px;
            font-size: 16px;
            transition: var(--transition);
			border: 1px solid black;
        }

        .search:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
        }

        .filter-sort-container {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            align-items: center;
            align-content: center;
            justify-content: center;
        }
		
		#sort {
			border: 1px solid;
		}
        select {
            padding: 12px 15px;
            border: 2px solid var(--light-gray);
            border-radius: 8px;
            font-size: 16px;
            background-color: white;
            cursor: pointer;
            transition: var(--transition);
            min-width: 200px;
        }

        select:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
        }

        .btn {
            padding: 12px 20px;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            display: inline-flex;
            align-items: center;
            gap: 8px;
            justify-content: center;
        }

        .btn-primary {
            background-color: var(--primary);
            color: white;
        }

        .btn-primary:hover {
            background-color: var(--primary-dark);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
        }

        .btn-secondary {
            background-color: var(--primary);
            color: white;
        }

        .btn-secondary:hover {
            background-color: var(--primary-dark);
            transform: translateY(-2px);
        }

        .btn-outline {
            background-color: transparent;
            color: var(--primary);
            border: 2px solid var(--primary);
        }

        .btn-outline:hover {
            background-color: var(--primary);
            color: white;
        }

        .btn-danger {
            background-color: var(--danger);
            color: white;
        }

        .btn-danger:hover {
            background-color: #e11575;
            transform: translateY(-2px);
        }

        .btn-warning {
            background-color: var(--warning);
            color: white;
        }

        .btn-warning:hover {
            background-color: #e68a00;
            transform: translateY(-2px);
        }

        /* Форма */
        .form-container {
			display: none;
            background: white;
			border: 1px solid black;
            border-radius: var(--border-radius);
            padding: 25px;
            margin-bottom: 30px;
            box-shadow: var(--card-shadow);
        }

        .form-title {
            font-size: 1.4rem;
            font-weight: 600;
            margin-bottom: 20px;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .form-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 20px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
        }

        label {
            font-weight: 500;
            margin-bottom: 8px;
            color: var(--dark);
            font-size: 0.95rem;
        }

        .form-input {
            padding: 12px 15px;
            border: 2px solid var(--light-gray);
            border-radius: 8px;
            font-size: 16px;
			width: 100%;
            transition: var(--transition);
        }

        .form-input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
        }

        .form-actions {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
        }

        .photo-preview {
            margin-top: 10px;
            width: 100px;
            height: 100px;
            border-radius: 8px;
            object-fit: cover;
            border: 2px solid var(--light-gray);
            display: none;
        }

        .photo-preview.visible {
            display: block;
        }

        /* Карточки */
        .cards-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 25px;
            margin-bottom: 40px;
        }

        .card {
            background: white;
            border-radius: var(--border-radius);
            overflow: hidden;
            box-shadow: var(--card-shadow);
            transition: var(--transition);
            position: relative;
        }

        .card:hover {
            transform: translateY(-8px);
            box-shadow: var(--card-shadow-hover);
        }

        .card-header {
            height: 180px;
            overflow: hidden;
            position: relative;
        }

        .card-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: var(--transition);
        }

        .card:hover .card-img {
            transform: scale(1.05);
        }

        .card-badge {
            position: absolute;
            top: 15px;
            right: 15px;
            background: var(--warning);
            color: white;
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 5px;
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
        }

        .card-content {
            padding: 20px;
        }

        .card-name {
            font-size: 1.4rem;
            font-weight: 700;
            margin-bottom: 8px;
            color: var(--dark);
            line-height: 1.3;
        }

        .card-details {
            color: var(--gray);
            font-size: 0.95rem;
            margin-bottom: 15px;
            display: flex;
            flex-direction: column;
            gap: 5px;
        }

        .card-details div {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .card-comment {
            padding: 12px;
            background-color: var(--light);
            border-radius: 8px;
            font-size: 0.95rem;
            line-height: 1.5;
            margin-top: 15px;
            border-left: 4px solid var(--primary);
        }

        .card-actions {
            display: flex;
            gap: 10px;
            margin-top: 20px;
        }

        .card-actions .btn {
            flex: 1;
            padding: 10px 15px;
            font-size: 0.9rem;
        }

        .soon {
            border-top: 5px solid var(--warning);
        }

        .today {
            border-top: 5px solid var(--danger);
        }

        .stats-bar {
            display: flex;
            justify-content: space-between;
            background: white;
            border-radius: var(--border-radius);
            padding: 18px 25px;
            margin: 20px 0 25px 0;
            box-shadow: 0px 0px 7px;
            flex-wrap: wrap;
            gap: 15px;
        }

        .stat-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
        }

        .stat-value {
            font-size: 2rem;
            font-weight: 700;
            color: var(--primary);
        }

        .stat-label {
            font-size: 0.9rem;
            color: var(--gray);
            margin-top: 5px;
        }

        /* Модальное окно */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.7);
            z-index: 1000;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        .modal-content {
            background: white;
            border-radius: var(--border-radius);
            width: 100%;
            max-width: 500px;
            padding: 30px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
            position: relative;
            animation: modalFadeIn 0.3s ease;
        }

        @keyframes modalFadeIn {
            from { opacity: 0; transform: translateY(-30px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .modal-title {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--dark);
        }

        .close-modal {
            background: none;
            border: none;
            font-size: 1.8rem;
            color: var(--gray);
            cursor: pointer;
            transition: var(--transition);
        }

        .close-modal:hover {
            color: var(--danger);
        }

        .modal-body {
            margin-bottom: 25px;
        }

        .modal-footer {
            display: flex;
            justify-content: flex-end;
            gap: 15px;
        }

        /* Адаптивность */
        @media (max-width: 768px) {
            h1 {
                font-size: 2.2rem;
            }
            
            .controls-panel {
                flex-direction: column;
                align-items: stretch;
            }
            
            .search-container, select {
                min-width: 100%;
            }
            
            .form-actions {
                flex-direction: column;
            }
            
            .form-actions .btn {
                width: 100%;
            }
            
            .cards-container {
                grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            }
            
            .stats-bar {
                justify-content: center;
				box-shadow: 0px 0px 7px;
				margin-top: 20px;
            }
        }

        @media (max-width: 480px) {
            body {
                padding: 15px;
            }
            
            .cards-container {
                grid-template-columns: 1fr;
            }
            
            .form-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Анимация появления карточек */
        @keyframes cardFadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .card {
            animation: cardFadeIn 0.4s ease;
        }

        /* Секция без данных */
        .empty-state {
            text-align: center;
            padding: 60px 20px;
            background: white;
            border-radius: var(--border-radius);
            box-shadow: var(--card-shadow);
        }

        .empty-icon {
            font-size: 4rem;
            color: var(--light-gray);
            margin-bottom: 20px;
        }

        .empty-title {
            font-size: 1.8rem;
            font-weight: 600;
            color: var(--gray);
            margin-bottom: 10px;
        }

        .empty-text {
            color: var(--gray);
            max-width: 500px;
            margin: 0 auto 30px;
        }

        footer {
            text-align: center;
            padding: 20px;
            color: var(--gray);
            font-size: 0.9rem;
            border-top: 1px solid var(--light-gray);
            margin-top: 30px;
        }

        /* Индикатор загрузки */
        .loading {
            display: none;
            text-align: center;
            padding: 40px;
        }

        .loading.active {
            display: block;
        }

        .spinner {
            border: 4px solid rgba(0, 0, 0, 0.1);
            border-radius: 50%;
            border-top: 4px solid var(--primary);
            width: 50px;
            height: 50px;
            animation: spin 1s linear infinite;
            margin: 0 auto 20px;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
		
		footer{
		text-align: center;
		position: fixed;
		bottom: 0;
		background: radial-gradient(circle, rgba(238, 174, 202, 1) 6%, rgba(148, 187, 233, 1) 100%);
		width: 100%;
		left: 0px;
		padding: 2px;
	}
	
	html {
            scroll-behavior: smooth; /* Плавная прокрутка для всего сайта */
        }

        #topButton {
			width: 50px;
			height: 50px;
            display: none; /* Скрыто по умолчанию */
            position: fixed;
            bottom: 30px;
            right: 10px;
            z-index: 99;
            border: none;
            outline: none;
            background-color: silver;
            color: white;
            cursor: pointer;
            padding: 15px;
            border-radius: 50%;
            font-size: 18px;
            transition: background-color 0.3s;
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }

        #topButton:hover {
            background-color: darkgray;
        }