@import url("https://fonts.googleapis.com/css2?family=Indie+Flower&display=swap");


* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


body {
  font-family: "Indie Flower", cursive;
  background-color: #f5e6c8;
  background-image: radial-gradient(
    ellipse at top,
    #fdf0d5 0%,
    #f5e6c8 60%,
    #e8d0a0 100%
  );
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 40px 20px;
}

body::after {
  content: "🌿";
  position: fixed;
  bottom: 20px;
  right: 30px;
  font-size: 2.5rem;
  opacity: 0.25;
  pointer-events: none;
}


#fileInput {
  font-family: "Indie Flower", cursive;
  font-size: 1rem;
  color: #6b3f1f;
  background-color: #fffbf0;
  border: 2px dashed #c8853a;
  border-radius: 12px;
  padding: 14px 22px;
  cursor: pointer;
  transition: 0.2s;
  max-width: 360px;
  width: 100%;
}

#fileInput:hover {
  border-color: #a0622a;
  background-color: #fff3d6;
}

#fileInput::file-selector-button {
  font-family: "Indie Flower", cursive;
  font-size: 0.95rem;
  background-color: #d4874a;
  color: #fff8ee;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  margin-right: 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}

#fileInput::file-selector-button:hover {
  background-color: #b86b30;
}


#buttonSearch {
  font-family: "Indie Flower", cursive;
  font-size: 1.25rem;
  color: #fff8ee;
  background: linear-gradient(145deg, #d4874a, #b8622a);
  border: none;
  border-radius: 14px;
  padding: 14px 40px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(180, 90, 30, 0.35);
  transition: 0.2s;
}

#buttonSearch:hover {
  background: linear-gradient(145deg, #c77840, #a0551f);
  box-shadow: 0 6px 18px rgba(180, 90, 30, 0.45);
  transform: translateY(-2px);
}

#buttonSearch:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(180, 90, 30, 0.3);
}


#result {
  font-family: "IM Fell English", serif;
  font-size: 1.15rem;
  color: #5a3010;
  background-color: #fffbf0;
  border: 2px solid #d9b882;
  border-radius: 16px;
  padding: 28px 32px;
  max-width: 580px;
  width: 100%;
  line-height: 1.85;
  box-shadow: 0 4px 20px rgba(180, 120, 40, 0.15);
  position: relative;
  min-height: 80px;
}

#result::before {
  content: "📋 Recipe";
  display: block;
  font-size: 1rem;
  color: #c8853a;
  margin-bottom: 12px;
}


.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 60px;
  background-color: #fffbf0;
  border-right: 2px solid #d4874a;
  padding: 20px 0;
  overflow: hidden;
  transition: width 0.3s ease;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  box-shadow: -2px 0 8px rgba(180, 120, 40, 0.1);
}


.sidebar:not(.open):hover {
  width: 300px;
}


.sidebar.open {
  width: 300px;
}


.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  height: 60px;
  border-bottom: 1px solid #f0e0d0;
  overflow: hidden;
  min-width: 0;
}


.sidebar-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  pointer-events: none;
}


.sidebar-title {
  font-family: "Indie Flower", cursive;
  font-size: 1.1rem;
  color: #d4874a;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}


.sidebar:hover .sidebar-title,
.sidebar.open .sidebar-title {
  opacity: 1;
  pointer-events: auto;
}


#historyBtn {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
  position: relative;
  z-index: 1001;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}


.sidebar-history {
  flex: 1;
  overflow-y: auto;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: "Indie Flower", cursive;
  font-size: 0.9rem;
  color: #6b3f1f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: 0.2s;
}

.history-item:hover {
  background-color: #f5e6c8;
  color: #5a3010;
}


.sidebar:hover .history-item,
.sidebar.open .history-item {
  white-space: normal;
  overflow: visible;
}


.sidebar-footer {
  border-top: 1px solid #f0e0d0;
  padding: 12px 8px;
  display: flex;
  justify-content: center;
}

.sidebar-footer button {
  padding: 10px 12px;
  background-color: transparent;
  border: 1px solid #d4874a;
  border-radius: 8px;
  color: #d4874a;
  font-family: "Indie Flower", cursive;
  font-size: 0.85rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
}

.sidebar:hover .sidebar-footer button,
.sidebar.open .sidebar-footer button {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-footer button:hover {
  background-color: #d4874a;
  color: #fff8ee;
}