/
Cooolprogrammers
/
web-nodejs-labs
Обзор
Документация
Войти
/
Cooolprogrammers
/
web-nodejs-labs
Код
Запросы
0
Задачи
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
public/lab9/task2/style.css
727 строк
12 KB
darkvoid6@mail.ru
ЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫ
18 дек 2025, 07:59
18 дек 2025, 07:59
f2c4f06
Код
Авторство
О чём код?
* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); color: #2c3e50; line-height: 1.6; min-height: 100vh; } .container { max-width: 1200px; margin: 0 auto; padding: 20px; } .header { background: linear-gradient(135deg, #3498db 0%, #2980b9 100%); color: white; padding: 30px; border-radius: 12px; margin-bottom: 30px; text-align: center; box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3); border: 1px solid #3498db; } .header h1 { font-size: 2.3em; margin-bottom: 8px; font-weight: 400; } .header p { font-size: 1.1em; opacity: 0.95; margin-bottom: 20px; } .back-btn { display: inline-block; background: rgba(255, 255, 255, 0.15); color: white; padding: 10px 20px; border-radius: 20px; text-decoration: none; transition: all 0.3s ease; border: 1px solid rgba(255, 255, 255, 0.3); font-weight: 500; backdrop-filter: blur(10px); } .back-btn:hover { background: rgba(255, 255, 255, 0.25); transform: translateY(-2px); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); } /* API Section */ .api-section { background: white; padding: 20px; border-radius: 10px; margin-bottom: 25px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); border: 1px solid #e9ecef; } .api-section h2 { color: #3498db; margin-bottom: 15px; font-weight: 500; font-size: 1.3em; } .api-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; } .api-link { display: inline-block; background: #3498db; color: white; padding: 8px 16px; border-radius: 6px; text-decoration: none; font-size: 0.85em; transition: all 0.3s ease; border: 1px solid #2980b9; font-weight: 500; } .api-link:hover { background: #2980b9; transform: translateY(-1px); box-shadow: 0 2px 6px rgba(41, 128, 185, 0.3); } /* Task Sections */ .task-section { background: white; padding: 25px; border-radius: 10px; margin-bottom: 25px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); border: 1px solid #e9ecef; } .task-header { margin-bottom: 20px; padding-bottom: 15px; border-bottom: 2px solid #f8f9fa; } .task-header h2 { color: #3498db; margin-bottom: 15px; font-weight: 500; font-size: 1.4em; } .endpoint-info { background: #f8f9fa; padding: 12px; border-radius: 6px; border-left: 4px solid #3498db; font-family: 'Courier New', monospace; font-size: 0.9em; line-height: 1.4; color: #495057; } /* Buttons */ .btn { padding: 10px 20px; border: none; border-radius: 6px; cursor: pointer; font-size: 0.95em; transition: all 0.3s ease; margin: 4px; font-weight: 500; border: 1px solid transparent; } .btn-primary { background: #3498db; color: white; border-color: #2980b9; } .btn-primary:hover { background: #2980b9; transform: translateY(-1px); box-shadow: 0 2px 6px rgba(41, 128, 185, 0.3); } .btn-secondary { background: #6c757d; color: white; border-color: #5a6268; } .btn-secondary:hover { background: #5a6268; transform: translateY(-1px); box-shadow: 0 2px 6px rgba(90, 98, 104, 0.3); } .btn-success { background: #28a745; color: white; border-color: #218838; } .btn-success:hover { background: #218838; transform: translateY(-1px); } .btn-warning { background: #ffc107; color: #212529; border-color: #e0a800; } .btn-warning:hover { background: #e0a800; transform: translateY(-1px); } .btn-danger { background: #e74c3c; color: white; border-color: #c0392b; } .btn-sm { padding: 6px 12px; font-size: 0.85em; } /* Search Controls */ .search-controls { margin: 18px 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; } .search-input { padding: 10px 15px; border: 1px solid #ced4da; border-radius: 6px; font-size: 0.95em; width: 280px; transition: all 0.3s ease; background: white; } .search-input:focus { outline: none; border-color: #3498db; box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1); } /* Sections */ .stats-section, .search-section { background: #f8f9fa; padding: 20px; border-radius: 8px; margin: 20px 0; border: 1px solid #e9ecef; } .stats-section h3, .search-section h3 { color: #3498db; margin-bottom: 12px; font-weight: 500; } /* Results */ .result-card { background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); padding: 20px; border-radius: 8px; margin-top: 18px; border: 1px solid #e9ecef; } .result-card h3 { color: #3498db; margin-bottom: 15px; font-weight: 500; font-size: 1.2em; } /* Stats Grid */ .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 18px; } .stat-item { background: white; padding: 20px; border-radius: 8px; text-align: center; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06); border: 1px solid #e9ecef; transition: transform 0.3s ease; } .stat-item:hover { transform: translateY(-2px); } .stat-value { font-size: 2em; font-weight: bold; color: #3498db; margin-bottom: 6px; } .stat-label { color: #6c757d; font-size: 0.9em; font-weight: 500; } /* Products */ .products-container { display: grid; gap: 16px; margin-top: 18px; } .product-card { background: white; padding: 20px; border-radius: 8px; border: 1px solid #e9ecef; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05); transition: all 0.3s ease; position: relative; overflow: hidden; } .product-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: #3498db; } .product-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); border-color: #3498db; } .product-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; gap: 12px; } .product-title { flex: 1; font-size: 1.2em; font-weight: 600; color: #2c3e50; } .product-actions { display: flex; gap: 8px; flex-wrap: wrap; } .product-details { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; color: #6c757d; font-size: 0.9em; } .price { font-weight: bold; color: #28a745; font-size: 1.1em; } .availability { font-size: 0.85em; padding: 3px 6px; border-radius: 3px; font-weight: 500; } .available { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; } .low-stock { background: #fff3cd; color: #856404; border: 1px solid #ffeaa7; } .out-of-stock { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; } /* Cart Styles */ .cart-items { display: grid; gap: 12px; margin: 18px 0; } .cart-item { background: #f8f9fa; padding: 16px; border-radius: 8px; border: 1px solid #e9ecef; display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 12px; align-items: center; } .cart-item-info h4 { color: #2c3e50; margin-bottom: 4px; font-size: 1.1em; } .cart-item-price { color: #28a745; font-weight: bold; font-size: 1em; } .quantity-controls { display: flex; align-items: center; gap: 8px; } .quantity-select { padding: 6px 10px; border: 1px solid #3498db; border-radius: 4px; background: white; font-size: 0.9em; width: 70px; } .cart-summary { background: #f8f9fa; padding: 20px; border-radius: 8px; border: 1px solid #e9ecef; margin-top: 18px; } .summary-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #e9ecef; font-size: 0.95em; } .summary-item:last-child { border-bottom: none; } .total-price { color: #3498db; font-size: 1.2em; font-weight: bold; } /* Order Actions */ .order-actions { display: flex; gap: 16px; margin: 20px 0; flex-wrap: wrap; } .check-results { background: #f8f9fa; padding: 16px; border-radius: 8px; border: 1px solid #e9ecef; margin-top: 18px; } .check-result-item { padding: 8px; margin: 4px 0; border-radius: 4px; display: flex; justify-content: space-between; align-items: center; font-size: 0.9em; } .check-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; } .check-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; } /* Empty Cart */ .empty-cart { text-align: center; padding: 50px 20px; } .empty-icon { font-size: 3.5em; margin-bottom: 16px; color: #3498db; } .empty-cart h2 { color: #3498db; margin-bottom: 8px; font-weight: 500; } .empty-cart p { color: #6c757d; margin-bottom: 25px; font-size: 1em; } /* Features Grid */ .features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 18px; } .feature-item { background: #f8f9fa; padding: 20px; border-radius: 8px; text-align: center; border: 1px solid #e9ecef; transition: all 0.3s ease; } .feature-item:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); } .feature-icon { font-size: 2.2em; margin-bottom: 12px; color: #3498db; } .feature-item h4 { color: #3498db; margin-bottom: 8px; font-weight: 600; font-size: 1.1em; } .feature-item p { color: #6c757d; line-height: 1.5; font-size: 0.9em; } /* Process Steps */ .process-steps { display: grid; gap: 16px; margin-top: 18px; } .step { display: flex; align-items: flex-start; gap: 16px; padding: 16px; background: #f8f9fa; border-radius: 8px; border: 1px solid #e9ecef; } .step-number { background: #3498db; color: white; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1em; flex-shrink: 0; } .step-content h4 { color: #2c3e50; margin-bottom: 4px; font-size: 1em; } .step-content p { color: #6c757d; font-size: 0.9em; } /* Messages */ .message-container { margin: 18px 0; } .message { padding: 12px 16px; border-radius: 6px; margin: 8px 0; font-weight: 500; border: 1px solid; } .message-success { background: #d4edda; color: #155724; border-color: #c3e6cb; } .message-error { background: #f8d7da; color: #721c24; border-color: #f5c6cb; } .message-info { background: #d1ecf1; color: #0c5460; border-color: #bee5eb; } /* Utility Classes */ .hidden { display: none; } /* Responsive */ @media (max-width: 768px) { .container { padding: 15px; } .header { padding: 20px; } .header h1 { font-size: 1.8em; } .task-section { padding: 18px; } .search-input { width: 100%; } .api-links { flex-direction: column; } .stats-grid { grid-template-columns: 1fr; } .product-details { grid-template-columns: 1fr; gap: 10px; } .product-header { flex-direction: column; align-items: flex-start; } .product-actions { width: 100%; justify-content: flex-start; } .features-grid { grid-template-columns: 1fr; } .cart-item { grid-template-columns: 1fr; gap: 8px; } .order-actions { flex-direction: column; } .step { flex-direction: column; text-align: center; gap: 12px; } .step-number { align-self: center; } } /* Анимация для успешной покупки */ @keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.02); } 100% { transform: scale(1); } } .purchase-success-badge { animation: pulse 2s infinite; }