:root {
  --primary: #ff6b35;
  --secondary: #2a9d8f;
  --dark: #264653;
  --light: #f8f9fa;
  --danger: #e76f51;
  --success: #2a9d8f;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  margin: 0;
  padding: 0;
  color: #333;
  min-height: 100vh;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Mascot background layer */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("mascot.png") no-repeat center center;
  background-size: cover;
  opacity: 0.1;
  z-index: -1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  background: rgba(38, 70, 83, 0.9);
  color: white;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

header h1 {
  margin: 0 0 10px 0;
  font-size: 2.5rem;
  background: linear-gradient(45deg, #ff6b35, #f7931e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 15px;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
  font-weight: 500;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

nav a.active {
  background: var(--primary);
}

.category-selector {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
}

.category-btn {
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.category-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.category-btn.active {
  background: var(--primary);
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.search-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 30px 0;
  flex-wrap: wrap;
}

#decalId {
  padding: 15px 20px;
  border: none;
  border-radius: 30px;
  width: 300px;
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  outline: none;
  transition: all 0.3s ease;
}

#decalId:focus {
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

button {
  padding: 15px 25px;
  border: none;
  border-radius: 30px;
  background: var(--primary);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  background: #ff5a1f;
}

button:active {
  transform: translateY(1px);
}

#preview {
  margin: 30px auto;
  max-width: 500px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

#preview img {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.loading {
  font-size: 1.2rem;
  color: #666;
  padding: 20px;
  text-align: center;
}

.error {
  color: var(--danger);
  font-weight: bold;
  padding: 20px;
  text-align: center;
  background: rgba(231, 111, 81, 0.1);
  border-radius: 10px;
  margin: 10px 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  padding: 15px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
}

.image-error {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  color: #666;
  border-radius: 10px;
  margin-bottom: 15px;
  font-weight: bold;
}

.copy-btn, .remove-btn {
  padding: 10px 15px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  margin: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.copy-btn {
  background: var(--secondary);
  color: white;
}

.copy-btn:hover {
  background: #21867a;
  transform: translateY(-2px);
}

.remove-btn {
  background: var(--danger);
  color: white;
}

.remove-btn:hover {
  background: #d14936;
  transform: translateY(-2px);
}

.empty-gallery {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px;
  color: #666;
  font-size: 1.2rem;
}

.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 25px;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  animation: slideIn 0.3s ease, fadeOut 0.5s ease 2.5s forwards;
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.notification.success {
  background: var(--success);
}

.notification.error {
  background: var(--danger);
}

/* Responsive design */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  header h1 {
    font-size: 2rem;
  }
  
  #decalId {
    width: 250px;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: 1fr;
  }
  
  .search-container {
    flex-direction: column;
    align-items: center;
  }
  
  #decalId {
    width: 100%;
    max-width: 300px;
  }
  
  .category-selector {
    flex-wrap: wrap;
  }
}
