@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
  --primary-color: #4a6fa5;
  --secondary-color: #47b39d;
  --background-color: #f8f9fa;
  --text-color: #333;
  --card-background: #ffffff;
  --hover-color: #e9ecef;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --transition-speed: 0.3s;
}

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

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
}

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

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  margin-bottom: 30px;
  border-bottom: 2px solid var(--primary-color);
}

h1 {
  color: var(--primary-color);
  font-size: 2.5rem;
  font-weight: 700;
  transition: transform var(--transition-speed) ease;
}

h1:hover {
  transform: scale(1.05);
}

nav {
  display: flex;
  gap: 20px;
}

nav button {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition-speed) ease, transform var(--transition-speed) ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

nav button:hover, nav button.active {
  color: var(--primary-color);
  transform: translateY(-2px);
}

.panel {
  display: none;
  animation: fadeIn 0.5s ease;
}

.panel.active {
  display: block;
}

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

.search-bar {
  display: flex;
  margin-bottom: 20px;
  gap: 10px;
}

.search-bar input, .search-bar select {
  flex: 1;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: box-shadow var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.search-bar input:focus, .search-bar select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.2);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}

.resource {
  background-color: var(--card-background);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 6px var(--shadow-color);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.resource:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px var(--shadow-color);
}

.resource h3 {
  color: var(--primary-color);
  margin-bottom: 12px;
  font-size: 1.3rem;
}

.resource-actions {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
}

button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
}

button:hover {
  background-color: #3a5a8c;
  transform: translateY(-2px);
}

.auth-container, .form-container {
  max-width: 400px;
  margin: 0 auto;
  padding: 35px;
  background-color: var(--card-background);
  border-radius: 12px;
  box-shadow: 0 4px 6px var(--shadow-color);
}

form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

input, textarea, select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.2);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

footer {
  text-align: center;
  margin-top: 50px;
  padding: 20px 0;
  border-top: 1px solid #ddd;
  color: #666;
}

#notificationContainer {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

.notification {
  background-color: var(--secondary-color);
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  animation: slideIn 0.5s ease, fadeOut 0.5s ease 2.5s forwards;
}

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

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

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #1a1a1a;
    --text-color: #f0f0f0;
    --card-background: #2a2a2a;
    --hover-color: #333;
    --shadow-color: rgba(0, 0, 0, 0.3);
  }

  input, textarea, select {
    background-color: #333;
    color: var(--text-color);
    border-color: #444;
  }

  input:focus, textarea:focus, select:focus {
    border-color: var(--primary-color);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    margin-top: 20px;
    flex-wrap: wrap;
  }

  .search-bar {
    flex-direction: column;
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }
}