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

/* general body styling */
body {
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.6;
  background-color: #0f0f0f;
  color: #f0f0f0;
  padding: 20px;
}

/* header styling */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #2e7d32; /* deep green instead of red */
  color: #ffffff;
  padding: 12px 24px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  border-radius: 0 0 12px 12px;
}

header h1 {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.5px;
}

/* icons */
.header-icons {
  display: flex;
  gap: 16px;
}

.icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  transition: all 0.2s ease;
  border-radius: 50%;
}

.icon-btn:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.1);
}

.icon-btn i {
  font-size: 1.1rem;
  color: #ffffff;
}

/* notification badge */
#bell-icon {
  position: relative;
}

#notification-count {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: #4caf50;
  color: white;
  font-size: 0.7rem;
  padding: 2px 5px;
  border-radius: 50%;
  display: none;
}

/* form styling */
form {
  background-color: #1e1e1e;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  margin-top: 80px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid #333;
}

form input,
form textarea {
  background-color: #252525;
  color: #f5f5f5;
  width: 100%;
  padding: 12px;
  margin-bottom: 16px;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

form input:focus,
form textarea:focus {
  border-color: #4caf50; /* green focus */
  outline: none;
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

form button {
  background-color: #4caf50;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  text-transform: lowercase;
}

form button:hover {
  background-color: #388e3c;
  transform: translateY(-1px);
}

/* notifications */
#notification {
  padding: 12px;
  margin: 12px 0;
  border-radius: 8px;
  display: none;
  font-size: 0.9rem;
}

#notification.success {
  background-color: #2e7d32;
  color: white;
}

#notification.error {
  background-color: #d32f2f;
  color: white;
}

/* news display */
#news-list {
  margin-top: 80px;
}

#news-list h2 {
  font-size: 1.3rem;
  color: #4caf50;
  font-weight: 500;
  margin-bottom: 16px;
}

#news-container {
  display: grid;
  gap: 16px;
}

.news-item {
  background-color: #1e1e1e;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid #333;
}

.news-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.news-item h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: #ffffff;
  font-weight: 500;
}

.news-item p {
  font-size: 0.95rem;
  color: #e0e0e0;
  line-height: 1.5;
}

.news-item small {
  color: #9e9e9e;
  font-size: 0.8rem;
  display: block;
  margin-top: 12px;
}

/* footer */
footer {
  text-align: center;
  margin-top: 60px;
  color: #9e9e9e;
  font-size: 0.85rem;
  background-color: #1e1e1e;
  padding: 24px;
  border-radius: 12px 12px 0 0;
}

footer a {
  color: #4caf50;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #81c784;
  text-decoration: underline;
}

/* floating button */
#floating-button {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 12px;
  z-index: 1000;
}

#toggle-add-news {
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

#toggle-add-news:hover {
  background-color: #388e3c;
  transform: scale(1.1) rotate(90deg);
}

/* responsive adjustments */
@media (max-width: 768px) {
  body {
    padding: 12px;
  }
  
  header {
    padding: 12px 16px;
  }
  
  form {
    padding: 16px;
    margin-top: 60px;
  }
  
  .news-item {
    padding: 16px;
  }
}