/* Background setup */
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=1600&q=80') 
              no-repeat center center/cover;
  color: #fff;
  min-height: 100vh;
  position: relative;
}

/* Blue overlay for readability */
.overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 60, 120, 0.7);
  z-index: 0;
}

/* Header */
.header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 60px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.logo {
  font-size: 1.8em;
  font-weight: bold;
  color: #fff;
}

.nav a {
  margin-left: 25px;
  text-decoration: none;
  color: #e0f0ff;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav a:hover {
  color: #00aaff;
}

/* Post container */
.post-container {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
}

/* Glassmorphism style post box */
.post-box {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  padding: 40px;
  width: 100%;
  max-width: 550px;
  box-shadow: 0 8px 35px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.2);
}

/* Titles and text */
h1 {
  text-align: center;
  color: #fff;
  margin-bottom: 15px;
  font-size: 2em;
}

p {
  text-align: center;
  color: #d0e8ff;
  margin-bottom: 30px;
  font-size: 1em;
}

/* Form styling */
.post-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #eaf6ff;
}

.post-form input,
.post-form textarea,
.post-form select {
  width: 100%;
  padding: 14px;
  margin-bottom: 20px;
  border: none;
  border-radius: 10px;
  font-size: 1em;
  box-sizing: border-box;
}

.post-form textarea { resize: none; }

.post-form input[type="file"] {
  background-color: #fff;
  color: #333;
  padding: 10px;
  border-radius: 8px;
}

/* Modern button */
.post-form button {
  width: 100%;
  padding: 16px;
  background: linear-gradient(90deg, #0078d7, #00aaff);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.2em;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  font-weight: bold;
}

.post-form button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 170, 255, 0.5);
}

/* Success Modal */
#successModal {
  display: none;
  z-index: 10; /* must be above overlay */
  position: fixed;
  top:0; left:0; right:0; bottom:0;
  display:flex;
  justify-content:center;
  align-items:center;
  background: rgba(0,0,0,0.6);
}


#successModal .modal-content {
  background: rgba(255,255,255,0.95);
  padding: 30px;
  border-radius: 16px;
  text-align: center;
  max-width: 400px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  animation: fadeIn 0.4s ease-in-out;
}

#successModal .modal-content h2 {
  margin-bottom: 20px;
  color: #007BFF;
}

#successModal .modal-content button {
  background: linear-gradient(90deg, #007BFF, #00A9FF);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  margin: 5px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#successModal .modal-content button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,170,255,0.5);
}

@keyframes fadeIn {
  from {opacity: 0; transform: translateY(-20px);}
  to {opacity: 1; transform: translateY(0);}
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .post-box {
    padding: 30px 20px;
  }
  h1 {
    font-size: 1.6em;
  }
}


.image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.image-preview img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #00aaff;
  transition: transform 0.3s ease;
}

.image-preview img:hover {
  transform: scale(1.1);
}



