/* ==============================
  MAIN.CSS – Unified Stylesheet
  For: profile, post, explore, admin
  Theme: Dark Modern UI
============================== */

/* 🎨 Color Variables */
:root {
  --bg-dark: #121212;
  --bg-light: #1e1e1e;
  --accent: #4ade80;  /* emerald-400 */
  --text-light: #f1f1f1;
  --text-muted: #a3a3a3;
  --border: #2c2c2c;
  --danger: #f87171;
  --warning: #facc15;
  --info: #38bdf8;
  --radius: 8px;
  --transition: 0.25s ease-in-out;
  --shadow: 0 4px 12px rgba(0,0,0,0.3);
}


/* ⚙️ Global Resets */
body {
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-family: 'Segoe UI', sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

main {
    width: 90%;
    display: block;
    place-self: center;
    min-height: 100%;
}

/* Apply the animation to the whole page */
body {
  animation: fadeInFromWhite 1s ease-out forwards;
  opacity: 0; /* Start transparent */
}

/* Keyframes for fading in */
@keyframes fadeInFromWhite {
  0% {
    opacity: 0;
    background-color: rgb(0, 0, 0);
  }
  100% {
    opacity: 1;
  background-color: var(--bg-dark);
  }
}
.modal-dialog .modal-content,
.modal.modal-content {
  color: var(--text-light);
  background-color: var(--bg-dark);

}

.modal-body,
.modal-content {
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  background-color: rgba(33, 37, 41, 0.95); /* Slightly transparent dark */
  color: white;
}
.modal-header {
    background: var(--bg-light);

    /*color: var(--text-light);*/
  
}
#main {
    color: #636376;

}
a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  text-decoration: underline;
}

input, textarea, select, button {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-light);
  padding: 10px;
  width: 100%;
  transition: var(--transition);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

button {
  background: var(--accent);
  color: #000;
  font-weight: 600;
  cursor: pointer;
  border: none;
}
button:hover {
  filter: brightness(1.1);
}
button.outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}
button.outline:hover {
  background: var(--accent);
  color: #000;
}

/* ✅ Utility */
.text-muted { color: var(--text-muted); }
.shadow { box-shadow: var(--shadow); }
.rounded { border-radius: var(--radius); }
.flex { display: flex; align-items: center; gap: 1rem; }

/* ==============================
   🔗 PROFILE PAGE
============================== */
.profile-header {
  text-align: center;
  margin-top: 2rem;
}
.avatar {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--accent);
}
.badge {
  background-color: var(--accent);
  color: #000;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
}
#socialLinks a {
  margin-right: 0.5rem;
  font-size: 1.2rem;
}

/* Tabbed content */
.nav-tabs .nav-link {
  background: transparent;
  color: var(--text-muted);
  border: none;
}
.nav-tabs .nav-link.active {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

/* ==============================
   📝 POST PAGE
============================== */
.media-preview {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
#viewTags .tag {
  background: var(--bg-light);
  color: var(--accent);
  padding: 4px 8px;
  border-radius: 20px;
  margin-right: 5px;
}
.comment {
  background: var(--bg-light);
  padding: 8px;
  border-radius: var(--radius);
  margin-bottom: 6px;
}
#commentInput {
  flex-grow: 1;
}
#viewSection button {
  margin-right: 8px;
}

/* ==============================
   🔍 EXPLORE PAGE
============================== */
#postGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}
#postGrid .card {
  background: var(--bg-light);
  border: none;
  color: var(--text-light);
  border-radius: var(--radius);
  overflow: hidden;
}
#postGrid .card img,
#postGrid .card video {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.creator-suggest {
  display: flex;
  align-items: center;
  background: var(--bg-light);
  padding: 10px;
  border-radius: var(--radius);
  margin-bottom: 10px;
}
.creator-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

/* ==============================
   🛠️ ADMIN PAGE
============================== */
.admin-header {
  text-align: center;
  margin-bottom: 2rem;
}
.admin-card {
  background: var(--bg-light);
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.admin-card h5 {
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}
.table-dark {
  --bs-table-bg: var(--bg-light);
  --bs-table-border-color: var(--border);
  --bs-table-color: var(--text-light);
}
.table-dark th {
  color: var(--accent);
}
.btn-danger {
  background: var(--danger);
  border: none;
}
.btn-warning {
  background: var(--warning);
  color: #000;
}
.btn-info {
  background: var(--info);
  color: #000;
}

/* ==============================
   📱 RESPONSIVE
============================== */
@media screen and (max-width: 768px) {
  .flex { flex-direction: column; align-items: flex-start; }
  .media-preview { max-height: 200px; }
  .avatar { width: 90px; height: 90px; }
}




 .PostCard .btn.active {
    background-color: #ffc107 !important;
    color: #000 !important;
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5);
  }

