/* Import Roboto font from Google Fonts (or host locally for offline use) */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600&display=swap');

body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 20px;
  line-height: 1.6;
  background-color: #000000;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  overflow: auto;
}

.container {
  width: 90%;
  max-width: 800px;
  margin: 0 auto;
}

.card, .nav-container, .content-container, .welcome-container {
  background-color: #1a1a1a;
  padding: 20px;
  border-radius: 8px;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
  text-align: center;
}

.welcome-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border-radius: 12px;
  border: 2px solid #ffffff;
  box-shadow: 0 6px 15px rgba(255, 255, 255, 0.1);
  margin-top: 20px;
}

.welcome-container h1 {
  font-size: 36px;
  margin-bottom: 15px;
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.2);
}

.welcome-container p {
  font-size: 18px;
  color: #d9d9d9;
  margin-bottom: 30px;
  max-width: 600px;
}

.action-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.action-buttons a {
  padding: 12px 30px;
  background-color: #4CAF50;
  color: #ffffff;
  border: 2px solid #4CAF50;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
}

.action-buttons a:hover {
  background-color: #45a049;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 255, 0, 0.2);
}

.action-buttons .secondary-action {
  background-color: #1a1a1a;
  color: #ffffff;
  border: 2px solid #ffffff;
}

.action-buttons .secondary-action:hover {
  background-color: #333333;
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
}

h1, h2, h3 {
  color: #ffffff;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 15px;
}

.welcome-text {
  color: #d9d9d9;
  font-size: 16px;
  margin-bottom: 15px;
}

.nav-container {
  width: 100%;
  max-width: 900px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 15px 0;
  background-color: #000000;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
  position: relative;
}

.nav-button {
  background-color: #ffffff;
  color: #000000;
  padding: 12px 20px;
  border: 2px solid #ffffff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease;
  text-align: center;
  width: 100%;
  max-width: 120px;
  box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

.nav-button:hover {
  background-color: #e5e5e5;
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
}

.nav-button.create-toggle {
  background-color: #ff4444;
  color: #ffffff;
  border: 2px solid #ff4444;
}

.nav-button.create-toggle:hover {
  background-color: #cc0000;
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(255, 0, 0, 0.2);
}

.menu-split {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 120px;
  z-index: 2;
}

.menu-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-width: 120px;
  margin-top: 5px;
  background-color: #1a1a1a;
  border: 1px solid #666666;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
  z-index: 1000;
  transition: display 0.2s ease;
}

.menu-split:hover .menu-options {
  display: block;
}

.menu-options a {
  display: block;
  padding: 10px 20px;
  color: #d9d9d9;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: background-color 0.3s ease, color 0.3s ease;
  text-align: center;
  border-bottom: 1px solid #333333;
}

.menu-options a:last-child {
  border-bottom: none;
}

.menu-options a:hover {
  background-color: #ff4444;
  color: #ffffff;
}

@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .nav-container, .card, .content-container, .welcome-container {
    width: 100%;
    max-width: none;
    padding: 15px;
  }

  .nav-container {
    flex-direction: row;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
  }

  .nav-button, .menu-split, .menu-options {
    width: 100%;
    max-width: 120px;
    margin: 0;
  }

  .menu-split:hover .menu-options {
    display: none;
  }

  .menu-options {
    display: none;
    border-radius: 8px;
  }

  .welcome-container h1 {
    font-size: 28px;
  }

  .welcome-container p {
    font-size: 16px;
  }

  .action-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .action-buttons a {
    width: 100%;
    max-width: 300px;
    padding: 10px;
  }
}

.primary-button, .secondary-button {
  padding: 12px 30px;
  background-color: #ffffff;
  color: #000000;
  border: 2px solid #ffffff;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
  margin-right: 15px;
}

.secondary-button {
  background-color: #1a1a1a;
  color: #ffffff;
}

.primary-button:hover, .secondary-button:hover {
  background-color: #e5e5e5;
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
}

.secondary-button:hover {
  background-color: #333333;
  color: #ffffff;
}

.primary-button:active, .secondary-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(255, 255, 255, 0.1);
}

form {
  max-width: 600px;
  margin: 20px auto;
  background-color: #1a1a1a;
  padding: 20px;
  border-radius: 8px;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
  width: 90%;
  text-align: left;
}

input, textarea, select {
  width: 100%;
  margin: 10px 0;
  padding: 12px;
  box-sizing: border-box;
  border: 2px solid #ffffff;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 400;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  cursor: text;
  background-color: #1a1a1a;
  color: #ffffff;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #e5e5e5;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.error-message {
  margin-top: 10px;
  font-size: 14px;
  color: #ff0000;
}

.loading {
  margin-top: 10px;
  font-size: 16px;
  color: #d9d9d9;
}

button {
  padding: 12px 30px;
  background-color: #ffffff;
  color: #000000;
  border: 2px solid #ffffff;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
  margin-top: 15px;
}

button:hover {
  background-color: #e5e5e5;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(255, 255, 255, 0.1);
}

ul, ol {
  list-style-type: none;
  padding: 0;
  width: 90%;
  max-width: 600px;
  margin: 20px auto;
}

li {
  margin: 15px 0;
  padding: 15px;
  background-color: #1a1a1a;
  border-radius: 8px;
  border: 1px solid #ffffff;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #ffffff;
}

li:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #e5e5e5;
  text-decoration: underline;
}

.time-input {
  margin: 10px 0;
  position: relative;
}

.time-input input {
  width: 100%;
  padding: 12px;
  border: 2px solid #ffffff;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 400;
  background-color: #1a1a1a;
  color: #ffffff;
}

.time-input .time-hint {
  font-size: 12px;
  color: #d9d9d9;
  margin-top: 5px;
  display: block;
}

.ingredient-row {
  margin-bottom: 15px;
}

.ingredient-row select, .ingredient-row input[type="number"] {
  width: 100%;
  margin-bottom: 10px;
  padding: 12px;
  border: 2px solid #ffffff;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 400;
  background-color: #1a1a1a;
  color: #ffffff;
}

.ingredient-row label {
  display: block;
  margin: 10px 0 5px;
  font-size: 16px;
  color: #d9d9d9;
}

.ingredient-row button {
  padding: 10px 20px;
  background-color: #ffffff;
  color: #000000;
  border: 2px solid #ffffff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
  margin-left: 10px;
}

.ingredient-row button:hover {
  background-color: #e5e5e5;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
}

.ingredient-row button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(255, 255, 255, 0.1);
}

.step-row {
  margin-bottom: 15px;
}

.step-row textarea, .step-row input[type="text"] {
  width: 100%;
  margin-bottom: 10px;
  padding: 12px;
  border: 2px solid #ffffff;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 400;
  resize: vertical;
  background-color: #1a1a1a;
  color: #ffffff;
}

.step-row button {
  padding: 10px 20px;
  background-color: #ffffff;
  color: #000000;
  border: 2px solid #ffffff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
  margin-left: 10px;
}

.step-row button:hover {
  background-color: #e5e5e5;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
}

.step-row button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(255, 255, 255, 0.1);
}

.attributes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin: 20px 0;
  border: 1px solid #ffffff;
  border-radius: 8px;
  padding: 15px;
  background-color: #1a1a1a;
}

.attribute-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.attribute-column label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background-color: #333333;
  border-radius: 6px;
  border: 1px solid #ffffff;
  cursor: pointer;
  color: #ffffff;
}

.attribute-column label:hover {
  background-color: #4a4a4a;
}

.attribute-column input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
  accent-color: #ffffff;
}

.ingredient-search {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
}

.search-input {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 100%;
}

.ingredient-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
/* Buffet Table Container */
.buffet-table {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Buffet Header */
.buffet-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.buffet-header h2 {
  margin: 0;
  font-size: 1.8em;
  color: #333;
}

.buffet-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}

#search-buffet {
  padding: 8px;
  width: 200px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
}

.share-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

#share-username {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#share-button, .calculate-button {
  padding: 8px 16px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
}

#share-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

#share-button:hover:not(:disabled), .calculate-button:hover {
  background-color: #0056b3;
}

/* Buffet Sections */
.buffet-sections {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.buffet-section {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}

.buffet-section summary {
  padding: 12px;
  background-color: #f8f9fa;
  font-weight: bold;
  cursor: pointer;
  font-size: 1.1em;
}

.buffet-section summary:hover {
  background-color: #e9ecef;
}

.section-content {
  padding: 15px;
  background-color: #fff;
}

.sub-section {
  margin: 10px 0;
}

.sub-section-content {
  padding: 10px;
}

/* Item List */
.item-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: flex-start;
}

.dish, .ingredient-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 160px;
  padding: 10px;
  border-radius: 6px;
  background-color: #f9f9f9;
  transition: transform 0.2s;
}

.dish:hover, .ingredient-item:hover {
  transform: translateY(-2px);
}

.dish img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
}

.dish a, .ingredient-item a {
  color: #007bff;
  text-decoration: none;
  font-size: 1em;
  text-align: center;
  word-wrap: break-word;
}

.dish a:hover, .ingredient-item a:hover {
  text-decoration: underline;
}

.no-items {
  color: #666;
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
  .buffet-table {
    padding: 10px;
  }

  .buffet-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .buffet-controls {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  #search-buffet {
    width: 100%;
  }

  .share-form {
    width: 100%;
    flex-direction: column;
  }

  #share-username {
    width: 100%;
  }

  .dish, .ingredient-item {
    width: 130px;
  }

  .dish img {
    width: 120px;
    height: 120px;
  }
}

@media (max-width: 480px) {
  .item-list {
    justify-content: center;
  }

  .dish, .ingredient-item {
    width: 100%;
    max-width: 150px;
  }
}