:root {
  /* Светлая тема */
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --accent-primary: #4361ee;
  --accent-secondary: #3f37c9;
  --success: #4cc9f0;
  --warning: #f72585;
  --border: #dee2e6;
  --shadow: rgba(0, 0, 0, 0.1);
  --neon-color: #00eeff;
}

[data-theme="dark"] {
  /* Темная тема */
  --bg-primary: #121212;
  --bg-secondary: #1e1e1e;
  --text-primary: #f8f9fa;
  --text-secondary: #adb5bd;
  --accent-primary: #6a8cff;
  --accent-secondary: #5a7ae0;
  --success: #7ad4f5;
  --warning: #ff6bba;
  --border: #343a40;
  --shadow: rgba(0, 0, 0, 0.3);
  --neon-color: #ff00ff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Шапка сайта */
.header {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  padding: 1rem 0;
  box-shadow: 0 4px 12px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--neon-color);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.admin-login-btn {
  background: linear-gradient(to right, var(--success), var(--warning));
  color: white;
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: 30px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.admin-login-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 15px var(--neon-color);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Кнопка переключения темы */
.theme-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  margin-left: 1rem;
  transition: transform 0.3s ease;
}

.theme-toggle:hover {
  transform: rotate(30deg);
}

/* Основной контент */
.main-content {
  padding: 2rem 0;
}

.page-title {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2.5rem;
  background: linear-gradient(90deg, var(--accent-primary), var(--neon-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
}

.page-title::after {
  content: '';
  display: block;
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-primary), var(--neon-color));
  margin: 10px auto;
  border-radius: 2px;
}

/* Меню блюд */
.dish-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Стили для ссылки в кнопке оплаты */
.pay-button {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    color: inherit;
    width: 100%;
    max-width: 400px;
    margin: 40px auto 0;
    padding: 18px 30px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px var(--shadow);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pay-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px var(--shadow), 0 0 15px var(--neon-color);
    text-decoration: none;
    color: white;
}

.pay-button:active {
    transform: translateY(1px);
}

.dish-card {
  background-color: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px var(--shadow);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  border: 1px solid var(--border);
}

.dish-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 12px 25px var(--shadow), 0 0 20px var(--neon-color);
}

.dish-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.dish-card .no-image {
  display: none;
}

.dish-info {
  padding: 1.5rem;
}

.dish-name {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.dish-description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.dish-price {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--accent-primary);
  display: block;
}

/* Форма администратора */
.admin-form-container {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: var(--bg-secondary);
  border-radius: 12px;
  box-shadow: 0 6px 16px var(--shadow);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 1rem;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #e63946, #d90429);
  color: white;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
}

.btn-outline:hover {
  background: var(--accent-primary);
  color: white;
}

/* Таблица администратора */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.admin-table th,
.admin-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-weight: 600;
}

.admin-table tr:hover {
  background-color: rgba(67, 97, 238, 0.05);
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
}

/* Адаптивность */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .dish-grid {
    grid-template-columns: repeat(2, 1fr); /* Две карточки в строке */
    gap: 1.5rem;
    padding: 0 10px;
  }
  
  .dish-card {
    margin: 0.5rem;
  }
  
  .dish-info {
    padding: 1rem;
  }
  
  .dish-name {
    font-size: 1.2rem;
  }
  
  .dish-description {
    font-size: 0.9rem;
  }
  
  .dish-price {
    font-size: 1.1rem;
  }
  
  .page-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }
  
  .container {
    padding: 0 15px;
  }
  
  .main-content {
    padding: 1.5rem 0;
  }
  
  .admin-form-container {
    margin: 1.5rem auto;
    padding: 1.5rem;
  }
  
  .form-group {
    margin-bottom: 1.2rem;
  }
  
  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
  
  .admin-table {
    font-size: 0.85rem;
  }
  
  .admin-table th,
  .admin-table td {
    padding: 0.7rem;
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 0.3rem;
  }
  
  .action-buttons .btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .dish-grid {
    grid-template-columns: 1fr; /* На очень маленьких экранах одна карточка */
    gap: 1rem;
  }
  
  .navbar {
    flex-direction: column;
    gap: 0.8rem;
    padding: 0.8rem;
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
  }
  
  .logo {
    font-size: 1.5rem;
  }
  
  .dish-name {
    font-size: 1.1rem;
  }
  
  .dish-description {
    font-size: 0.85rem;
  }
  
  .dish-price {
    font-size: 1rem;
  }
  
  .page-title {
    font-size: 1.6rem;
  }
  
  .container {
    padding: 0 10px;
  }
  
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
  
  .admin-table {
    font-size: 0.8rem;
    display: block;
    overflow-x: auto;
  }
  
  .admin-table th,
  .admin-table td {
    padding: 0.6rem;
    min-width: 100px;
  }
  
  /* Дополнительные стили для мобильных устройств */
  .dish-card {
    margin: 0.5rem auto;
    max-width: calc(100% - 1rem);
  }
  
  .dish-info {
    padding: 0.8rem;
  }
  
  .header {
    padding: 0.8rem 0;
  }
  
  .main-content {
    padding: 1rem 0;
  }
  
  .page-title {
    margin-bottom: 1rem;
  }
  
  .payment-section {
    margin-top: 1.5rem;
  }
  
  .pay-button {
    padding: 0.8rem 1.2rem;
    font-size: 0.95rem;
  }
}

/* Анимации */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-element {
  animation: fadeIn 0.6s ease-out forwards;
}

/* Неоновый эффект */
.neon-text {
  text-shadow: 0 0 5px var(--neon-color), 0 0 10px var(--neon-color), 0 0 20px var(--neon-color);
}

.neon-border {
  border: 1px solid var(--neon-color);
  box-shadow: 0 0 10px var(--neon-color);
}

/* Улучшенные стили для формы */
.dish-form {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
  background-color: var(--bg-secondary);
  border-radius: 12px;
  box-shadow: 0 6px 16px var(--shadow);
}

.dish-form .form-group {
  margin-bottom: 1.5rem;
}

.dish-form .form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.dish-form .form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.dish-form .form-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.dish-form .form-input:valid {
  border-color: var(--success);
}

.dish-form .form-input:invalid:not(:focus):not(:placeholder-shown) {
  border-color: #e74c3c;
}

.dish-form .form-error {
  color: #e74c3c;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  min-height: 1.2rem;
}

.dish-form .form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
}

.dish-form .btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.dish-form .btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
}

.dish-form .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.4);
}

.dish-form .btn-outline {
  background: transparent;
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
}

.dish-form .btn-outline:hover {
  background: var(--accent-primary);
  color: white;
}

/* Улучшенные стили для админ-панели */
.admin-form-container {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: var(--bg-secondary);
  border-radius: 12px;
  box-shadow: 0 6px 16px var(--shadow);
}

/* Улучшенные стили для таблицы администратора */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background-color: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px var(--shadow);
}

.admin-table th,
.admin-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  background-color: var(--accent-primary);
  color: white;
  font-weight: 600;
}

/* Улучшенные стили для уведомлений */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 8px;
  color: white;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  min-width: 250px;
}

.notification-success {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.notification-error {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.notification-info {
  background: linear-gradient(135deg, #3498db, #2980b9);
}

.notification.show {
  transform: translateX(0);
}

/* Стили для ссылки в кнопке оплаты */
.Sber-link {
  color: white;
  text-decoration: none;
  display: block;
  width: 100%;
  height: 100%;
  text-align: center;
  line-height: inherit;
}

.Sber-link:hover {
  color: white;
  text-decoration: none;
}

/* Стили для мобильных устройств */
.mobile-device {
  font-size: 14px;
}

/* Дополнительные стили для улучшения адаптивности */
@media (max-width: 768px) {
  .dish-grid {
    grid-template-columns: repeat(2, 1fr) !important; /* Убедиться, что на планшетах и мобильных устройствах отображаются 2 карточки */
  }
  
  .dish-card {
    margin: 0.5rem;
    max-width: calc(50% - 1rem);
  }
  
  .dish-info {
    padding: 1rem;
  }
  
  .dish-name {
    font-size: 1.1rem;
  }
  
  .dish-description {
    font-size: 0.85rem;
  }
  
  .dish-price {
    font-size: 1rem;
  }
  
  .page-title {
    font-size: 1.8rem;
  }
  
  .container {
    padding: 0 15px;
  }
  
  .main-content {
    padding: 1.5rem 0;
  }
  
  .admin-form-container {
    margin: 1.5rem auto;
    padding: 1.5rem;
  }
  
  .form-group {
    margin-bottom: 1.2rem;
  }
  
  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
  
  .admin-table {
    font-size: 0.85rem;
  }
  
  .admin-table th,
  .admin-table td {
    padding: 0.7rem;
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 0.3rem;
  }
  
  .action-buttons .btn {
    width: 100%;
    text-align: center;
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
  }
  
  .logo {
    font-size: 1.5rem;
  }
  
  .payment-section {
    margin-top: 1.5rem;
  }
  
  .pay-button {
    padding: 0.8rem 1.2rem;
    font-size: 0.95rem;
  }
}

/* Стиль для адаптивной таблицы */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Дополнительные стили для очень маленьких экранов */
@media (max-width: 480px) {
  .dish-grid {
    grid-template-columns: 1fr !important; /* На очень маленьких экранах одна карточка */
  }
  
  .dish-card {
    max-width: 100%;
    margin: 0.5rem auto;
  }
  
  .dish-name {
    font-size: 1rem;
  }
  
  .dish-description {
    font-size: 0.8rem;
  }
  
  .dish-price {
    font-size: 0.9rem;
  }
  
  .page-title {
    font-size: 1.5rem;
  }
  
  .container {
    padding: 0 10px;
  }
  
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
  
  .admin-table {
    font-size: 0.75rem;
    display: block;
    overflow-x: auto;
  }
  
  .admin-table th,
  .admin-table td {
    padding: 0.5rem;
    min-width: 80px;
  }
  
  .form-group {
    margin-bottom: 1rem;
  }
  
  .form-label {
    font-size: 0.9rem;
  }
  
  .form-input {
    padding: 0.6rem;
    font-size: 0.9rem;
  }
  
  .action-buttons {
    gap: 0.2rem;
  }
  
  .action-buttons .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
}