/* DEVELOPER UPDATES PAGE STYLES */

/* HERO SECTION */
.updates-hero {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  background: linear-gradient(180deg, rgba(180, 22, 22, 0.08) 0%, rgba(0, 0, 0, 0) 100%);
}

.updates-hero-content {
  max-width: 800px;
}

.updates-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
  letter-spacing: -1px;
}

.updates-subtitle {
  font-size: 1.15rem;
  color: #aaa;
  line-height: 1.6;
}

/* FILTER SECTION */
.filter-section {
  padding: 2rem 2rem 3rem;
  background: rgba(255, 255, 255, 0.01);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.updates-container {
  max-width: 1200px;
  margin: 0 auto;
}

.filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  color: #aaa;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: translateY(-2px);
}

.filter-btn.active {
  background: linear-gradient(135deg, #b41616 0%, #d11a1a 100%);
  border-color: #b41616;
  color: #fff;
  box-shadow: 0 4px 15px rgba(180, 22, 22, 0.3);
}

/* UPDATES SECTION */
.updates-section {
  padding: 4rem 2rem;
  min-height: 60vh;
}

.loading-state,
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #aaa;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #b41616;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-state svg {
  color: #666;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 1rem;
  color: #888;
}

/* UPDATES GRID */
.updates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  align-items: start;
  width: 100%;
}

.update-card {
  background: rgba(30, 30, 30, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  opacity: 1 !important;
  z-index: 1;
  min-height: 450px;
  max-height: 450px;
}

.update-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #b41616 0%, #d11a1a 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.update-card:hover {
  background: rgba(40, 40, 40, 0.9) !important;
  border-color: rgba(180, 22, 22, 0.5) !important;
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(180, 22, 22, 0.3);
}

.update-card:hover::before {
  transform: scaleX(1);
}

/* UPDATE HEADER */
.update-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.update-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.update-category {
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: fit-content;
}

.update-category.feature {
  background: rgba(87, 242, 135, 0.15);
  color: #57f287;
}

.update-category.improvement {
  background: rgba(88, 101, 242, 0.15);
  color: #5865f2;
}

.update-category.bugfix {
  background: rgba(254, 231, 92, 0.15);
  color: #fee75c;
}

.update-category.security {
  background: rgba(237, 66, 69, 0.15);
  color: #ed4245;
}

.update-date {
  font-size: 0.85rem;
  color: #999;
}

.update-version {
  padding: 0.4rem 0.9rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ccc;
  white-space: nowrap;
}

/* UPDATE CONTENT */
.update-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.update-excerpt {
  font-size: 0.95rem;
  color: #bbb;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* UPDATE TAGS */
.update-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  font-size: 0.8rem;
  color: #aaa;
  transition: all 0.2s ease;
}

.tag:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

/* UPDATE FOOTER */
.update-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.update-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b41616 0%, #d11a1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.author-name {
  font-size: 0.9rem;
  color: #bbb;
  font-weight: 500;
}

.read-more-btn {
  padding: 0.6rem 1.25rem;
  background: rgba(180, 22, 22, 0.1);
  border: 1px solid rgba(180, 22, 22, 0.3);
  border-radius: 25px;
  color: #b41616;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.read-more-btn:hover {
  background: linear-gradient(135deg, #b41616 0%, #d11a1a 100%);
  border-color: #b41616;
  color: #fff;
  transform: translateX(3px);
}

/* MODAL */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
}

.modal-container {
  position: relative;
  max-width: 900px;
  width: 100%;
  max-height: 85vh;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  overflow-y: auto;
  z-index: 1;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: sticky;
  top: 1.5rem;
  left: calc(100% - 1.5rem);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
  margin-bottom: -40px;
}

.modal-close:hover {
  background: rgba(237, 66, 69, 0.2);
  border-color: #ed4245;
  transform: rotate(90deg);
}

.modal-close svg {
  color: #aaa;
  transition: color 0.3s ease;
}

.modal-close:hover svg {
  color: #ed4245;
}

.modal-content {
  padding: 3rem;
  color: #ddd;
}

.modal-content h2 {
  font-size: 2.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.modal-content .update-date {
  font-size: 0.95rem;
  color: #888;
  margin-bottom: 2rem;
  display: block;
}

.modal-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  margin: 2rem 0 1rem;
}

.modal-content p {
  font-size: 1rem;
  line-height: 1.8;
  color: #bbb;
  margin-bottom: 1.5rem;
}

.modal-content ul {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.modal-content li {
  font-size: 1rem;
  line-height: 1.8;
  color: #bbb;
  margin-bottom: 0.75rem;
}

.modal-content strong {
  color: #fff;
  font-weight: 600;
}

.modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  color: #aaa;
}

/* PAGINATION (For future use) */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-top: 4rem;
}

.pagination-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  color: #aaa;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: translateY(-2px);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination-info {
  color: #aaa;
  font-size: 0.95rem;
}

/* SCROLLBAR */
.modal-container::-webkit-scrollbar {
  width: 8px;
}

.modal-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

.modal-container::-webkit-scrollbar-thumb {
  background: rgba(180, 22, 22, 0.5);
  border-radius: 4px;
}

.modal-container::-webkit-scrollbar-thumb:hover {
  background: rgba(180, 22, 22, 0.7);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .updates-hero {
    padding: 6rem 1.5rem 3rem;
    min-height: 40vh;
  }

  .updates-title {
    font-size: 2.5rem;
  }

  .updates-subtitle {
    font-size: 1rem;
  }

  .filter-section {
    padding: 1.5rem 1.5rem 2rem;
  }

  .filter-bar {
    gap: 0.5rem;
  }

  .filter-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .updates-section {
    padding: 3rem 1.5rem;
  }

  .updates-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .update-card {
    padding: 1.5rem;
  }

  .update-title {
    font-size: 1.2rem;
  }

  .update-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .read-more-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .modal {
    padding: 1rem;
  }

  .modal-container {
    max-height: 90vh;
    border-radius: 16px;
  }

  .modal-close {
    top: 1rem;
    left: calc(100% - 1rem);
  }

  .modal-content {
    padding: 2rem 1.5rem;
  }

  .modal-content h2 {
    font-size: 1.75rem;
  }

  .modal-content h3 {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .updates-title {
    font-size: 2rem;
  }

  .updates-hero {
    padding: 5rem 1rem 2rem;
  }

  .filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .updates-section {
    padding: 2rem 1rem;
  }

  .update-header {
    flex-direction: column;
    gap: 0.75rem;
  }

  .update-version {
    align-self: flex-start;
  }

  .modal-content {
    padding: 1.5rem 1rem;
  }

  .modal-content h2 {
    font-size: 1.5rem;
  }
}