/**
 * 13th.lol - Pages Stylesheet
 * Styles for bios, minecraft, and images pages
 */

/* =====================================================
   PAGE HEADER
   ===================================================== */
.page-header {
  padding: 8rem 0 4rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.8) 0%, transparent 100%);
}

.page-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
}

.page-subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* =====================================================
   PAGE CONTENT
   ===================================================== */
.page-content {
  padding: 3rem 0 6rem;
  min-height: 60vh;
}

/* =====================================================
   FILTER BAR
   ===================================================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 250px;
  max-width: 400px;
}

.search-box svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9375rem;
  backdrop-filter: blur(var(--glass-blur));
  transition: border-color 0.3s, box-shadow 0.3s;
}

.search-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.filter-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-tag {
  padding: 0.5rem 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s;
}

.filter-tag:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.filter-tag.active {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text-primary);
}

/* =====================================================
   USERS GRID (Bios Listing)
   ===================================================== */
.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.bio-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(var(--glass-blur));
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.bio-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.bio-card-banner {
  height: 100px;
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
  background-size: cover;
  background-position: center;
}

.bio-card-content {
  padding: 1.5rem;
  text-align: center;
  margin-top: -40px;
}

.bio-card-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.1);
  background: #1a1a1a;
  object-fit: cover;
  margin-bottom: 0.75rem;
}

.bio-card-name {
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.bio-card-username {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.bio-card-bio {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bio-card-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.bio-card-stat {
  text-align: center;
}

.bio-card-stat-value {
  font-weight: 600;
  font-size: 0.9375rem;
}

.bio-card-stat-label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
}

/* =====================================================
   LOADING & EMPTY STATES
   ===================================================== */
.loading-state {
  text-align: center;
  padding: 4rem 2rem;
  color: rgba(255, 255, 255, 0.6);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: rgba(255, 255, 255, 0.6);
}

.empty-icon {
  margin-bottom: 1rem;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
}

.pagination-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s;
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-info {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

/* =====================================================
   TOOLS GRID (Minecraft Page)
   ===================================================== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.tool-card {
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s;
  position: relative;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.3);
}

.tool-icon {
  margin-bottom: 1.25rem;
  color: rgba(255, 255, 255, 0.7);
}

.tool-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.tool-description {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.tool-badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* =====================================================
   INFO SECTION
   ===================================================== */
.info-section {
  padding: 2rem;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.info-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.info-section p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

/* =====================================================
   UPLOAD SECTION (Images Page)
   ===================================================== */
.upload-section {
  max-width: 600px;
  margin: 0 auto 3rem;
  padding: 2rem;
}

.upload-area {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.upload-icon {
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.5);
}

.upload-area h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.upload-area p {
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.5rem;
}

.upload-info {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 1rem;
}

.upload-progress {
  margin-top: 1.5rem;
}

.progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.8));
  border-radius: 2px;
  width: 0;
  transition: width 0.3s;
}

.progress-text {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.upload-result {
  margin-top: 1.5rem;
}

.result-preview {
  margin-bottom: 1.5rem;
  text-align: center;
}

.result-preview img {
  max-width: 100%;
  max-height: 300px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.result-link-group label {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-input-group {
  display: flex;
  gap: 0.5rem;
}

.result-input-group input {
  flex: 1;
  padding: 0.625rem 0.875rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: monospace;
}

.copy-btn {
  flex-shrink: 0;
}

/* =====================================================
   IMAGES GRID
   ===================================================== */
.section-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.image-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

.image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.image-item:hover img {
  transform: scale(1.05);
}

.image-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.8));
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

.image-item:hover .image-item-overlay {
  opacity: 1;
}

.image-item-info {
  width: 100%;
}

.image-item-name {
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-item-size {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.empty-gallery {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: rgba(255, 255, 255, 0.5);
}

.empty-gallery svg {
  margin-bottom: 1rem;
  opacity: 0.4;
}

/* =====================================================
   FEATURES SECTION
   ===================================================== */
.features-section {
  margin-top: 4rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  padding: 1.5rem;
  text-align: center;
}

.feature-icon {
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.6);
}

.feature-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* =====================================================
   IMAGE MODAL
   ===================================================== */
.image-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.image-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.3s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.image-modal img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
  .page-header {
    padding: 6rem 0 3rem;
  }
  
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-box {
    max-width: none;
  }
  
  .filter-tags {
    justify-content: center;
  }
  
  .pagination {
    flex-direction: column;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
  }
  
  .upload-area {
    padding: 2rem 1.5rem;
  }
}
