body{
font-family: "Saira", system-ui, Arial, sans-serif;
margin:0;
background:transparent !important;
}

/* top bar */

.topnav{
height:55px;
background:#1f2937;
display:flex;
align-items:center;
padding:0 25px;
gap:25px;
color:white;
position: relative;
}

.topnav button{
background:none;
border:none;
color:#02153e;
font-size:16px;
cursor:pointer;
font-weight: bold;
}

.topnav button:hover{
color:#60a5fa;
}

.bg-image {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100dvh;

	background-image: url("/static/background.png");
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;

	z-index: -1; /* 👈 change from -1 */
}

/* layout */

.layout{
display:flex;
height:calc(100vh - 55px);
overflow-x: hidden;
background: #f2eadf;
z-index: 1000;
}

/* sidebar */

.sidebar{
width:240px;
border-right:1px solid #e5e7eb;
padding:20px;
color: white;
font-style:italic;
}

.sidebar h3{
margin-top:0;
}

.sidebar ul{
list-style:none;
padding:0;
margin:10px 0;
}

.sidebar li{
padding:10px;
border-radius:6px;
cursor:pointer;
}

.sidebar li:hover{
background:#f1f5f9;
}

/* main area */

.main{
flex:1;
padding:35px;
overflow:auto;
background: transparent !important;
z-index: 1;
}

/* buttons */

.content-buttons button{
background:#3b82f6;
color:white;
border:none;
padding:10px 18px;
border-radius:6px;
margin-right:10px;
cursor:pointer;
}

.content-buttons button:hover{
background:#2563eb;
}

.generator{
margin-top:20px;
margin-bottom: 20px;
text-align: center;
}

.generator button{
background:#02153e;
color:white;
font-weight: bold;
border:none;
padding:10px 18px;
border-radius:6px;
margin-right:10px;
cursor:pointer;
margin-top: 10px;
}

.generator button:hover{
background:#02153e;
}

/* forms */

input, textarea{
padding:10px;
border-radius:6px;
border:1px solid #d1d5db;
margin-top:10px;
width:100%;
max-width:100%;
box-sizing: border-box;
}

textarea{
height:120px;
}

/* result grid */

#result{
margin-top:30px;
display:grid;
grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
gap:20px;
}

/* cards */

.card{
background:white;
border-radius:10px;
padding:20px;
box-shadow:0 4px 12px rgba(0,0,0,0.06);
transition:transform .15s;
}

.card:hover{
transform:translateY(-3px);
}

.card img{
width:100%;
border-radius:8px;
}

.card video{
width:100%;
border-radius:8px;
}

.folder-item{
display:flex;
justify-content:space-between;
align-items:center;
padding:8px;
border-radius:6px;
cursor:pointer;
}

.folder-item:hover{
background:#f1f5f9;
}

.folder-actions{
display:none;
gap:5px;
}

.folder-item:hover .folder-actions{
display:inline-flex;
}

.folder-actions button{
border:none;
background:none;
cursor:pointer;
}

.generated-table{
border-collapse:collapse;
margin-top:15px;
}

.generated-table td{
border:1px solid #d1d5db;
min-width:120px;
height:40px;
padding:6px;
background:white;
}

.card table{
border-collapse:collapse;
width:100%;
}

.card td{
border:1px solid #e5e7eb;
padding:8px;
}

.timestamp{
font-size:12px;
color:#6b7280;
margin-bottom:8px;
}

.feed{
flex:1;
display:flex;
flex-direction:column;
align-items:center;
padding:20px;
}

#posts{
width:100%;
max-width:500px;
display:flex;
flex-direction:column;
gap:25px;
}

.post{
background:white;
border-radius:12px;
overflow:hidden;
box-shadow:0 4px 12px rgba(0,0,0,0.06);
display:flex;
flex-direction:column;
transition:transform .15s ease;
padding: 10px;
position: relative;
}

.post img{
width:100%;
border-radius:8px;
}

.post video{
width:100%;
border-radius:8px;
}

@media (max-width:768px){

.container{
flex-direction:column;
}

.sidebar{
width:100%;
border-right:none;
border-bottom:1px solid #e5e7eb;
z-index: 2;
}

#posts{
max-width:100%;
}

.topnav{
justify-content:space-around;
z-index: 1000;
}

}

.feed-table{
width:100%;
border-collapse:collapse;
margin-top:10px;
}

.feed-table td{
border:1px solid #d1d5db;
padding:8px;
min-width:80px;
}

.post table{
width:100%;
border-collapse:collapse;
margin:10px 0;
}

.post td{
border:1px solid #e5e7eb;
padding:8px;
}


.feed{
flex:1;
display:flex;
flex-direction:column;
align-items:center;
padding:20px;
background:#f3f5f7;
}

#posts{
width:100%;
max-width:520px;
display:flex;
flex-direction:column;
gap:30px;
}

.post img{
width:100%;
display:block;
}

.post video{
width:100%;
display:block;
}

.caption{
padding:12px 16px;
font-size:14px;
line-height:1.4;
}

@media (max-width:768px){

.container{
flex-direction:column;
}

.sidebar{
width:100%;
border-right:none;
border-bottom:1px solid #e5e7eb;
}

.feed{
padding:10px;
}

#posts{
max-width:100%;
gap:20px;
margin-bottom: 20px;
}

.topnav{
justify-content:space-around;
}

}

.post:hover{
transform:translateY(-3px);
}

.post-actions{
display:flex;
gap:10px;
padding:10px 16px;
}

.post-actions button{
border:none;
background:none;
cursor:pointer;
font-size:16px;
}

.pagination{
display:flex;
gap:6px;
justify-content:center;
margin-top:20px;
flex-wrap:wrap;
}

.pagination button{
padding:6px 10px;
border:none;
background:#eee;
cursor:pointer;
}

.pagination button.active{
background:#02153d;
color:white;
}

.admin-login{
display:none;
position:fixed;
top:50%;
left:50%;
transform:translate(-50%,-50%);
background:white;
padding:20px;
box-shadow:0 0 10px rgba(0,0,0,0.3);
z-index:9999;
}

#folders{
  display:block;              /* 🔥 key fix */
  padding:0;
  margin:0;
  list-style:none;
  text-align:left;
}

#folders li{
background:#f1f1f1;
padding:8px 12px;
border-radius:20px;
cursor:pointer;
white-space:nowrap;
font-size:14px;
margin-bottom: 6px;
text-align: left;
}

#folders li:hover{
background:#ddd;
}

/*.layout{
display:flex;
gap:20px;
padding:20px;
}*/

.main{
flex:1;
}

.sidebar{
width:220px;
background:#02153e;
padding:15px;
}

.topnav{
display:flex;
gap:10px;
padding:10px;
background:#fafafa;
border-bottom:1px solid #ddd;
}

.menu-btn{
/*display:none;*/
font-size:20px;
}

@media (max-width:600px){

.layout{
  flex-direction: column;
}

.sidebar{
  position: fixed;
  transform: translateX(-100%);
  top:0;
  height:100%;
  width:240px;
  background:#02153e;
  z-index:1000;
  transition:0.3s;
  box-shadow:2px 0 10px rgba(0,0,0,0.1); /* optional */
}

.sidebar.open{
  left:0;
}

.main{
  padding:20px;
}

}

.close-btn{
position:absolute;
top:10px;
right:10px;
color:white;
font-style:italic;
border:none;
font-size:22px;
cursor:pointer;
background: #02153e;
}

#searchResults .post{
margin-bottom:20px;
}

#folder-form {
  display:flex;
  gap:8px;
  margin-bottom:10px;
}

#folder-form input{
  flex:1;
}

#folder-form button{
  width:40px;
}

.sidebar{
  transform: translateX(-100%);
}

.sidebar.open{
  transform: translateX(0);
}

#folder-form {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
}

#folder-form input {
  flex: 1;
}

#folder-form select {
  flex: 1;
}

#folder-form button {
  width: 40px;
}

#folders ul {
  padding-left: 15px;
}

.folder-item {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: #02153e;
  text-align: left;
}

.folder-item:hover {
  background-color: #e6f0ff;
  text-align:left;
}

.folder-item::before {
  content: "▶";
  margin-right: 6px;
  font-size: 10px;
  text-align:left;
}

.modal{
	display:none;
	position:fixed;
	top:0;
	left:0;
	width:100%;
	height:100%;
	background:rgba(0,0,0,0.4);
	justify-content:center;
	align-items:center;
	z-index:9999;
}

.modal-content{
	background:white;
	padding:20px;
	border-radius:10px;
	width:90%;
	max-width:320px;   /* 🔥 prevents overflow */
	box-shadow:0 10px 30px rgba(0,0,0,0.2);
	display:flex;
	flex-direction:column;
	gap:12px;
}

.modal-content select{
	width:100%;
	max-width:100%;
	padding:8px;
	border-radius:6px;
	border:1px solid #ccc;
}

.modal-actions{
	display:flex;
	justify-content:flex-end;
	gap:10px;
}

.modal-actions button{
	padding:8px 12px;
	border:none;
	border-radius:6px;
	cursor:pointer;
}

.modal-actions button:first-child{
	background:#3b82f6;
	color:white;
}

.modal-actions button:last-child{
	background:#e5e7eb;
}

mark{
	background: #fde047;
}

.progress-container {
  width: 100%;
  height: 8px;              /* 👈 gives visible thickness */
  background: #eee;         /* light background */
  border-radius: 5px;
  overflow: hidden;
  margin: 10px 0;
}

#progressText {
	color: white;
	text-align: center;
}

#progressBar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4caf50, #81c784);      /* green progress */
  transition: width 0.3s ease;
}

.carousel {
  width: 100%;
  height: 180px; /* adjust as needed */
  position: relative;
  overflow: visible;
  background: transparent !important;
}

.slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;

  width: calc(100% - 20px);
  height: calc(100% - 20px);

  top: 10px;
  left: 10px;

  object-fit: fill;          /* ✅ show full image */
  object-position: center;

  background: #fff;             /* ✅ fills empty space cleanly */

  opacity: 0;
  transition: opacity 0.5s ease, transform 0.3s ease;

  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}

.slide.active {
  opacity: 1;
}

/* dots */
.dots {
  width: 100%;
  right: 9px;
  text-align: center;
  margin-top: 10px;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 4px;
  background: white;
  border-radius: 50%;
  opacity: 0.5;
  cursor: pointer;
}

.dot.active {
  opacity: 1;
}

.carousel {
  touch-action: pan-y; /* allows vertical scroll, blocks horizontal conflicts */
}

.folder-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  text-align: center;
}

.folder-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  background: #ffffff;        /* light grey pill */
  color: #02153e;             /* dark blue text */

  padding: 10px 18px;
  border-radius: 25px;

  font-size: 16px;
  font-weight: 500;

  margin: 10px auto;
  justify-content: center;
  
  display: flex;
  width: fit-content;
}

.folder-icon {
  font-size: 16px;
}

.folder-text {
  font-style: italic;
}

.folder-item {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.folder-count {
  font-size: 12px;
  color: #555;
  background: #eee;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: auto; 
}

.folder-name {
  display: inline-block;
  font-weight: bold;
}



.text-editor {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 120px;

  background: #fff;              /* 👈 key fix */
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);

  font-size: 15px;
  line-height: 1.5;

  outline: none;
}

/* focus effect like real input */
.text-editor:focus {
  border-color: #4a90e2;
  box-shadow: 0 0 0 2px rgba(74,144,226,0.2);
}

.post-number{
  position: absolute;
  top: 10px;
  left: 10px;

  background: #02153d;
  color: white;

  font-size: 12px;
  padding: 4px 8px;
  border-radius: 10px;
}

.pinned-badge{
  display: inline-flex;
  align-items: center;

  background: #fff3cd;
  color: #856404;

  padding: 4px 10px;
  border-radius: 20px;

  font-size: 12px;
  font-weight: 600;

  margin-left: 40px;   /* 👈 pushes away from number */
  margin-top: 5px;
}