/* ------------------ global ------------------ */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #ffffff;
  font-weight: 400;
  letter-spacing: 0.3px;
}

/* ------------------ parent grid ------------------ */
.parent {
  display: grid;
  grid-template-columns: 1.2fr repeat(4, 1fr);
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  background-color: #ffffff;
}

/* ------------------ header ------------------ */
.header {
  grid-column: 1 / 6;
  background-color: #ff8c00;
  color: white;
  height: 80px;
  padding: 0 20px;

  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

/* menu */
.menu {
  justify-self: start;
}

.menu a {
  color: white;
  margin-right: 15px;
  text-decoration: none;
  font-size: 16px;
  transition: all 0.2s ease;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.menu a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* title */
.title {
  justify-self: center;
  margin: 0;
  text-align: center;
  font-family: 'Poppins', 'Arial Black', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 1.5px;
}

/* ------------------ sidebar ------------------ */
.sidebar {
  grid-column: 1 / 2;
  background-color: #ffe8cc;
  color: rgb(0, 0, 0);
  padding: 20px;
  margin: 10px;
  border-radius: 15px;
  font-size: 16px;
  line-height: 1.8;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.sidebar p {
  margin: 0 0 15px 0;
  color: #333;
  font-weight: 400;
}

#searchBox {
  width: 300px !important;
  padding: 8px !important;
  font-size: 15px !important;
}

/* Custom checkbox styling */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid #ff8c00;
  border-radius: 4px;
  background-color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 8px;
  vertical-align: middle;
  flex-shrink: 0;
}

input[type="checkbox"]:hover {
  border-color: #e67e00;
  box-shadow: 0 0 6px rgba(255, 140, 0, 0.3);
}

input[type="checkbox"]:checked {
  background-color: #ff8c00;
  border-color: #e67e00;
}

input[type="checkbox"]:checked::after {
  content: "✓";
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 12px;
  font-weight: bold;
}

label {
  cursor: pointer;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  user-select: none;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 500;
  color: #333;
  gap: 6px;
  line-height: 1;
}

/* ------------------ main ------------------ */
.main {
  grid-column: 2 / 6;
  background-color: #ffe8cc;
  margin: 10px;
  padding: 16px;
  font-size: 20px;
  line-height: 1.8;
  border-radius: 15px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
}

.main p {
  margin: 0 0 15px 0;
  font-weight: 400;
  letter-spacing: 0.3px;
  font-size: 18px;
}

.aboutme {
  background-color: #e0b669;
  padding: 20px;
  border-radius: 12px;
  border: 2px solid #f3a647;
  box-shadow: 0 4px 12px rgba(255, 140, 0, 0.1);
}

.imagerow {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.imagerow img {
    width: 25%;
    height: auto;
    border-radius: 10px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(255, 140, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color:rgb(0, 0, 0);
  cursor: pointer;
  border: 2px solid #ffe8cc;
  position: relative;
}

.card[hidden] {
  display: none !important;
}

.card-image {
  height: 140px;
  background: #000;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  color: #ff8c00;
  font-family: 'Poppins', 'Arial', sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.card-body p {
  font-size: 0.9rem;
  opacity: 0.8;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 400;
  line-height: 1.6;
}

.tag {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  letter-spacing: 0.5px;
}

.tag.vegan {
  background: #2ecc71;
  color: #0b3d1e;
}

.tag.vegetarian {
  background: #f1c40f;
  color: #4a3b00;
}

.tag.meat {
  background: #e74c3c;
  color: #4a0f0f;
}

/* Spice level tags */
.tag.spicy {
  background: #e67e22;
  color: #5a2d0c;
}

.tag.mild {
  background: #3498db;
  color: #0f2540;
}

.tag.not-spicy {
  background: #95a5a6;
  color: #1c1c1c;
}

/* Cuisine tags */
.tag.middle-eastern {
  background: #9b59b6;
  color: #3d1552;
}

.tag.finnish {
  background: #1abc9c;
  color: #0a3d34;
}

.tag.italian {
  background: #e74c3c;
  color: #fff;
}

.tag.asian {
  background: #f39c12;
  color: #fff;
}

.tag.french {
  background: #2980b9;
  color: #fff;
}

.tag.spanish {
  background: #c0392b;
  color: #fff;
}

.tag.greek {
  background: #16a085;
  color: #fff;
}

.tag.indian {
  background: #d35400;
  color: #fff;
}

.card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 40px rgba(255, 140, 0, 0.3);
  border-color: #ff8c00;
}

.like-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #ff8c00;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.like-btn:hover {
  background: #ff8c00;
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(255, 140, 0, 0.4);
}

.like-btn.liked {
  background: #ff8c00;
  border-color: #e67e00;
}


/* ------------------ footer ------------------ */
.footer {
  grid-column: 1 / 6;
  background-color: #ff8c00;
  color: #ffffff;
  padding: 10px 0;
  text-align: center;
  font-size: 14px;
}


/*------------------forum stuff-----------------------*/

.kellotaulu {
  background-color: #ffffff;
  width: 350px;
  border: 2px solid #ff8c00;
  padding: 10px;
  margin: 10px;
  font-size: 110%;
  color: #ff8c00;
  box-shadow: 0 4px 8px rgba(255, 140, 0, 0.2);
  text-align: center;
  font-weight: bold;
}

/* Recipe Detail Page */
.recipe-detail {
  max-width: 800px;
  margin: 0 auto;
}

.recipe-header {
  margin-bottom: 40px;
  border-bottom: 2px solid #ff8c00;
  padding-bottom: 20px;
}

.recipe-header h1 {
  margin: 0 0 15px 0;
  color: #ff8c00;
  font-family: 'Poppins', 'Arial', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.recipe-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.course {
  margin-bottom: 40px;
}

.course h2 {
  color: #ff8c00;
  border-bottom: 2px solid #ffe8cc;
  padding-bottom: 10px;
  margin-bottom: 15px;
  font-family: 'Poppins', 'Arial', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.8px;
}

.course-card {
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(255, 140, 0, 0.1);
  border-left: 4px solid #ff8c00;
}

.course-card h3 {
  margin: 0 0 10px 0;
  color: #ff8c00;
  font-size: 1.2rem;
  font-family: 'Poppins', 'Arial', sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.course-card p {
  margin: 0;
  color: #333;
  line-height: 1.8;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 400;
  font-size: 0.95rem;
}

.back-button {
  background-color: #ff8c00;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
  margin-bottom: 20px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.back-button:hover {
  background-color: #e67e00;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 140, 0, 0.3);
}

.drink-card {
  border-left-color: #ff8c00;
}

.highlight {
  background-color: #ffeb3b;
  color: #000;
  font-weight: 600;
  padding: 0px 4px;
  border-radius: 3px;
}


/*------------------signin stuff-----------------------*/

.signin-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  background-color: #ffe8cc;
}

.form-box {
  width: 100%;
  max-width: 550px;
  padding: 45px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  display: none;
}

.form-box.active {
  display: block;
}

h2 {
  font-size: 42px;
  text-align: center;
  margin-bottom: 30px;
}

input,
select {
  width: 100%;
  padding: 16px;
  background: #eee;
  border-radius: 6px;
  border: none;
  outline: none;
  font-size: 18px;
  color: #333;
  margin-bottom: 25px;
}

button {
  width: 100%;
  padding: 16px;
  background: #ff8c00;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.5s;
  margin-bottom: 25px;
}

button:hover {
  background: #e67e00;
}

p {
  text-align: center;
  font-size: 14.5px;
  margin-bottom: 10px;
}

p a {
  color: #ff8c00;
  text-decoration: none;
}

p a:hover {
  text-decoration: underline;
}

/* User Profile Section Styles */
.user-section {
  background: linear-gradient(135deg, #fff5e6 0%, #ffffff 100%);
  padding: 15px;
  border-radius: 10px;
  border: 2px solid #ff8c00;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(255, 140, 0, 0.1);
}

.user-logged-out h3 {
  margin: 0 0 10px 0;
  color: #ff8c00;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'Poppins', 'Arial Black', sans-serif;
}

.user-logged-out p {
  margin: 0;
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 400;
}

.profile-info {
  margin-bottom: 15px;
}

.profile-info h3 {
  margin: 0 0 5px 0;
  color: #ff8c00;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'Poppins', 'Arial Black', sans-serif;
}

.profile-info .join-date {
  margin: 0;
  color: #999;
  font-size: 0.85rem;
  font-weight: 400;
}

.logout-btn {
  width: 100%;
  padding: 10px;
  background-color: #ff8c00;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 15px !important;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.logout-btn:hover {
  background-color: #e67e00;
  box-shadow: 0 4px 8px rgba(255, 140, 0, 0.3);
  transform: translateY(-2px);
}

.admin-panel-link {
  display: block;
  width: 100%;
  padding: 10px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 10px;
  text-align: center;
  text-decoration: none;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.admin-panel-link:hover {
  background-color: #45a049;
  box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
  transform: translateY(-2px);
  text-decoration: none;
}

.liked-menus-section {
  border-top: 1px solid #ffe8cc;
  padding-top: 12px;
  margin-top: 12px;
}

.liked-menus-section h4 {
  margin: 0 0 10px 0;
  color: #ff8c00;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.liked-menus-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.liked-menu-item {
  background: white;
  padding: 8px 10px;
  border-radius: 4px;
  border-left: 3px solid #ff8c00;
  font-size: 0.85rem;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.liked-menu-item:hover {
  background: #fff5e6;
  box-shadow: 0 2px 4px rgba(255, 140, 0, 0.2);
}

/* Chat Page Styles */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 15px;
}

.chat-header {
  text-align: center;
  border-bottom: 2px solid #ff8c00;
  padding-bottom: 15px;
  margin-bottom: 10px;
}

.chat-header h2 {
  margin: 0 0 5px 0;
  color: #ff8c00;
  font-family: 'Poppins', 'Arial', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.chat-header p {
  margin: 0;
  color: #555;
  font-size: 0.95rem;
  font-weight: 400;
  font-style: italic;
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 0;
  min-height: 300px;
  max-height: 800px;
}

.message {
  background: #ffffff;
  padding: 15px;
  border-radius: 10px;
  border-left: 4px solid #ff8c00;
  box-shadow: 0 2px 6px rgba(255, 140, 0, 0.1);
  animation: slideInMessage 0.3s ease-out;
}

@keyframes slideInMessage {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 10px;
}

.message-username {
  font-weight: 700;
  color: #ff8c00;
  font-size: 0.95rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.message-timestamp {
  font-size: 0.8rem;
  color: #999;
  font-weight: 400;
  white-space: nowrap;
}

.message-content {
  color: #333;
  font-size: 0.95rem;
  line-height: 1.6;
  word-wrap: break-word;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 400;
}

.empty-messages {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999;
  font-style: italic;
  font-size: 1rem;
}

.chat-input-area {
  border-top: 2px solid #ff8c00;
  padding-top: 15px;
  margin-top: auto;
}

.input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#messageInput {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #ff8c00;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  resize: vertical;
  color: #333;
  background: #ffffff;
  transition: all 0.2s ease;
}

#messageInput:focus {
  outline: none;
  border-color: #e67e00;
  box-shadow: 0 0 8px rgba(255, 140, 0, 0.3);
  background: #fffbf7;
}

#messageInput::placeholder {
  color: #ccc;
}

.send-btn {
  background-color: #ff8c00;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  letter-spacing: 0.5px;
  align-self: flex-end;
}

.send-btn:hover {
  background-color: #e67e00;
  box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
  transform: translateY(-2px);
}

.send-btn:active {
  transform: translateY(0);
}

.delete-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  display: none;
}

.message:hover .delete-btn {
  display: inline-block;
}

.delete-btn:hover {
  transform: scale(1.3);
  opacity: 0.7;
}

.filters-section {
  background: linear-gradient(135deg, #fff5e6 0%, #ffffff 100%);
  padding: 15px;
  border-radius: 10px;
  border: 2px solid #ff8c00;
  margin-bottom: 20px;
}

.filters-section h3 {
  margin: 0 0 12px 0;
  color: #ff8c00;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'Poppins', 'Arial Black', sans-serif;
}

.filter-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
}

.filter-btn {
  background: white;
  color: #ff8c00;
  border: 2px solid #ff8c00;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.filter-btn:hover {
  background: #ffe8cc;
  box-shadow: 0 2px 6px rgba(255, 140, 0, 0.2);
}

.filter-btn.active {
  background: #ff8c00;
  color: white;
  box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

.chat-stats {
  background: white;
  padding: 12px;
  border-radius: 6px;
  border-left: 3px solid #ff8c00;
}

.chat-stats h4 {
  margin: 0 0 8px 0;
  color: #ff8c00;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.chat-stats p {
  margin: 6px 0;
  color: #333;
  font-size: 0.85rem;
  font-weight: 400;
}

/* Greeting Notification */
.greeting-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #ff8c00 0%, #ff6b35 100%);
  color: white;
  padding: 30px 40px;
  border-radius: 12px;
  font-size: 24px;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  animation: slideIn 0.5s ease-out;
  font-family: 'Poppins', 'Arial Black', sans-serif;
  letter-spacing: 0.5px;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.greeting-notification.fade-out {
  animation: slideOut 0.5s ease-in forwards;
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
}

/* Admin Panel Styles */
.admin-container {
  width: 100%;
  max-width: 1000px;
  margin: 30px auto;
  padding: 30px;
}

.admin-container h2 {
  font-size: 42px;
  color: #333;
  margin-bottom: 10px;
  text-align: center;
}

.admin-subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 40px;
  font-size: 16px;
}

.admin-users-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.admin-user-card {
  background: #fff;
  border: 2px solid #ff8c00;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.admin-user-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.admin-user-card h3 {
  font-size: 20px;
  color: #333;
  margin: 0 0 15px 0;
  border-bottom: 2px solid #ff8c00;
  padding-bottom: 10px;
}

.admin-user-card p {
  margin: 10px 0;
  color: #555;
  font-size: 14px;
}

.admin-user-card strong {
  color: #333;
}

.role-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  margin-left: 5px;
}

.role-badge.admin {
  background: #ff8c00;
  color: white;
}

.role-badge.user {
  background: #e0e0e0;
  color: #333;
}

.delete-user-btn {
  width: 100%;
  padding: 12px;
  margin-top: 20px;
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

.delete-user-btn:hover {
  background: #c0392b;
}

.empty-users {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 18px;
  grid-column: 1 / -1;
}

