:root {
  --bg: #f0f4ff;
  --text: #1a1a1a;
  --card: rgba(255, 255, 255, 0.25);
  --glass: blur(12px);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  --accent: #4a6ee0;
}

[data-theme="dark"] {
  --bg: #0c111f;
  --text: #f3f4f6;
  --card: rgba(30, 41, 59, 0.25);
  --glass: blur(12px);
  --shadow: 0 8px 32px rgba(255, 255, 255, 0.1);
  --accent: #3a86ff;
}
    .ad-box {
      max-width: 600px;
      margin: 20px auto;
      background: var(--card);
      border-radius: 10px;
      padding: 10px;
      text-align: center;
      box-shadow: var(--shadow);
    }
    .ad-box h4 {
      margin-bottom: 10px;
      font-size: 0.9rem;
      color: gray;
    }
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  transition: 0.4s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card);
  backdrop-filter: var(--glass);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 99;
}

header h1 {
  font-size: 1.4rem;
}

.nav a, .nav button {
  background: transparent;
  color: var(--text);
  font-size: 1.4rem;
  margin-left: 10px;
  border: none;
  cursor: pointer;
}

.feed {
  flex: 1;
  padding: 1rem;
  display: grid;
  gap: 1rem;
}

.post {
  background: var(--card);
  backdrop-filter: var(--glass);
  box-shadow: var(--shadow);
  padding: 1rem;
  border-radius: 15px;
  transition: transform 0.2s ease;
}

.post:hover {
  transform: scale(1.01);
}

.post .actions {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.post button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: 0.3s;
}

.post button:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  background: var(--card);
  backdrop-filter: var(--glass);
  margin-top: auto;
}

textarea, input {
  width: 100%;
  padding: 1rem;
  border-radius: 12px;
  border: none;
  margin-bottom: 10px;
  font-size: 1rem;
  background: var(--card);
  color: var(--text);
  backdrop-filter: var(--glass);
  box-shadow: var(--shadow);
}

textarea::placeholder, input::placeholder {
  color: #aaa;
}

.form-area {
  padding: 1rem;
  max-width: 600px;
  margin: auto;
}

.sorter {
  padding: 0 1rem;
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.sorter button {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  background: var(--accent);
  color: white;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
}

.loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  z-index: 9999;
  transition: 0.6s;
}

comment-box textarea {
  margin-top: 5px;
  padding: 0.6rem;
  font-size: 0.9rem;
}

.comment-box button {
  margin-top: 10px;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: white;
  border: none;
 
 border-radius: 8px;
  cursor: pointer;
}

.comments small {
  display: block;
  margin-top: 5px;
  font-size: 0.85rem;
}

#followBtn {
  margin-top: 1rem;
  padding: 8px 20px;
  border-radius: 30px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #4a6ee0;
  color: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#followBtn:hover {
  transform: scale(1.05);
}

#followBtn.following {
  background: #f33;
  color: white;
}

.post-img {
  max-width: 100%;
  max-height: 300px; /* optional: limit height */
  height: auto;
  display: block;
  margin: 10px auto;
  border-radius: 8px;
  object-fit: contain; /* ratio maintain karega */
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}