/* Base Styles */
:root {
  --primary: #ff6b6b;
  --secondary: #ffa3a3;
  --accent: #74b9ff;
  --highlight: #ffeaa7;
  --text: #2d3436;
  --bg: #f5f6fa;
}

body {
  font-family: "Comic Neue", cursive;
  background-color: #fff5f5;
  color: var(--text);
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
button {
  font-family: "Rubik Bubbles", cursive;
}

.sol-gradient {
  background: linear-gradient(90deg, #ff6b6b, #74b9ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.app-container {
  display: flex;
  min-height: 100vh;
}

.external-link {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
}

.external-btn {
  width: 50px;
  height: 50px;
  transition: transform 0.3s;
  margin-left: 20px;
  padding-top: 7px;
}

.external-btn:hover {
  transform: scale(1.1);
}

/* Sidebar */
.dream-sidebar {
  width: 320px;
  background: white;
  padding: 2rem;
  border-right: 2px dashed var(--accent);
  height: 100vh;
  position: fixed;
  overflow-y: auto;
}

.sol-price-ticker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, #ff6b6b, #74b9ff);
  color: white;
  padding: 1rem;
  border-radius: 20px;
  margin-bottom: 2rem;
  font-size: 1.1rem;
  box-shadow: 5px 5px 0px var(--accent);
}

.sol-logo {
  font-size: 1.5rem;
}

.income-input label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #718096;
}

.input-group {
  display: flex;
  align-items: center;
}

.input-group input {
  flex: 1;
  padding: 1rem;
  border: 2px solid var(--accent);
  border-radius: 12px 0 0 12px;
  font-size: 1rem;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.input-group span {
  background: #f7fafc;
  padding: 1rem;
  border: 2px solid var(--accent);
  border-left: none;
  border-radius: 0 12px 12px 0;
}

.dream-stats {
  background: #fff;
  padding: 1rem;
  border-radius: 20px;
  margin-bottom: 2rem;
  border: 2px dashed var(--primary);
}

.dream-stats h3 {
  margin-top: 0;
  color: var(--primary);
}

.total-amount {
  display: flex;
  justify-content: space-between;
  margin: 1rem 0;
  font-size: 1.5rem;
}

.usd-total {
  color: #718096;
}

.sol-total {
  color: var(--primary);
  font-weight: 700;
}

.days-to-dream {
  background: white;
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
  color: var(--accent);
}

/* Cart */
.dream-cart h3 {
  color: var(--primary);
  margin-top: 0;
}

.cart-items {
  max-height: 300px;
  overflow-y: auto;
}

.empty-cart {
  text-align: center;
  padding: 1rem;
  color: #718096;
  font-style: italic;
}

.cart-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: white;
  border-radius: 12px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  animation: fadeIn 0.3s ease;
  border: 2px solid var(--accent);
}

.item-image {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  overflow: hidden;
  margin-right: 1rem;
}

.item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-details {
  flex: 1;
}

.item-name {
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.item-price {
  font-size: 0.9rem;
  color: #718096;
}

.sol-price {
  color: var(--primary);
  font-weight: 600;
}

.remove-item {
  background: none;
  border: none;
  color: #718096;
  cursor: pointer;
  font-size: 1.2rem;
  transition: color 0.2s ease;
}

.remove-item:hover {
  color: #f00;
}

/* Catalog */
.catalog-container {
  margin-left: 370px;
  padding: 3rem;
  width: calc(100% - 320px);
}

.catalog-header {
  margin-bottom: 3rem;
  text-align: center;
}

.catalog-header h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.catalog-header p {
  font-size: 1.2rem;
  color: #718096;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.category-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.filter-btn {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 50px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: capitalize;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.product-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  overflow: hidden;
  border: 2px solid var(--accent);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.product-image {
  height: 200px;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-info {
  padding: 1rem;
}

.product-info h3 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
}

.product-price {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.usd-price {
  color: #718096;
}

.add-to-dream {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50px;
  width: 100%;
  padding: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.add-to-dream:hover {
  transform: translateY(-2px);
  background: var(--accent);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .app-container {
    flex-direction: column;
  }

  .dream-sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--accent);
  }

  .catalog-container {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  }

  .catalog-header h1 {
    font-size: 2rem !important;
  }
}

@media (max-width: 480px) {
  .category-filters {
    flex-direction: column;
    align-items: stretch;
  }
}
