* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden; /* STOP PAGE FROM SCROLLING */
}

body{
  font-size: 15pt;
  background-size: cover;
  background-attachment: fixed;
  background-image: url("https://images.unsplash.com/photo-1506744038136-46273834b3fb?q=80&w=1974&auto=format&fit=crop");
  background-repeat: no-repeat;
  font-family: Arial, sans-serif;
}

/* 1. LOADER STYLES */
#loader{
  position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
  background: linear-gradient(135deg, hsla(140, 69%, 35%, 1), hsla(230, 60%, 73%, 1));
  z-index: 9999; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: white;
  animation: fadeOut 0.5s ease 2.8s forwards;
}
.loader-logo svg{ width: 120px; height: 120px; animation: pulse 1s infinite; }
#loader h1{ font-size: 38px; margin: 15px 0 5px; font-weight: 900; letter-spacing: 1px; }
#loader p{ font-size: 16px; opacity: 0.9; }
.loader-bar{ width: 220px; height: 5px; background: rgba(255,255,255,0.3); border-radius: 10px; margin-top: 25px; overflow: hidden; }
.loader-progress{ width: 0%; height: 100%; background: white; animation: load 3s linear; }
@keyframes load{ to{ width: 100%; } }
@keyframes pulse{ 0%,100%{ transform: scale(1); } 50%{ transform: scale(1.1); } }
@keyframes fadeOut{ to{ opacity: 0; visibility: hidden; } }

/* 2. FIXED HEADER - THIS WILL NEVER MOVE */
.header-fixed {
  position: fixed; /* GLUE TO TOP */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: rgba(0,0,0,0.2); /* slight bg so text is readable */
  backdrop-filter: blur(5px);
  padding: 8px 0;
}

/* 3. AD BOX */
.adsbox{
  width: 90%; 
  max-width: 728px; 
  margin: 0 auto 5px auto;
  text-align: center; 
  min-height: 90px;
  background: rgba(255,255,255,0.1); 
  border-radius: 10px;
  overflow: hidden; 
}

/* 4. LIKE COUNTER */
.info{ 
  text-align: center; 
  padding: 6px; 
  border-radius: 10px; 
  border: 1px solid green; 
  width: 70%; 
  max-width: 300px;
  margin: 5px auto;
  color: white; 
  font-weight: 700; 
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(5px);
  font-size: 14px;
}

#cat{ 
  width: 100%; 
  text-align: center; 
  margin: 5px 0;
}
#cat button{ 
  width: 22%; max-width: 130px; margin: 3px; 
  border-radius: 8px; border: 2px solid blue; 
  font-size: 10px; color: black; height: 30px; 
  cursor: pointer; font-weight: 900; background: white; 
}
#cat button.active{ background: blue; color: white; }

/* 5. SCROLLABLE CONTENT ONLY */
.content-wrapper{ padding-top: 0px; /* SPACE FOR FIXED HEADER */
  padding-bottom: 0px; /* SPACE FOR FIXED FOOTER */
  overflow-y: auto; /* ONLY THIS SCROLLS */
}

.content{ 
  width: 100%; 
}

#reactions{ 
  width: 100%; 
  height: 9vh; 
  position: fixed; /* GLUE TO BOTTOM */
  bottom: 10px; 
  left: 0;
  display: flex; 
  justify-content: center; 
  z-index: 999; 
}
#like,#share,#group{
  width: 54px; height: 54px; border-radius: 50px; margin: 0 10px; border: 2px solid hsla(235, 52%, 52%, 1);
  font-size: 22px; color: green; background: white; cursor: pointer;
}

.article-card{
  width: 90%; max-width: 600px; background-color: white; border-radius: 15px; border: 2px solid blue;
  margin: 20px auto; padding: 0 0 15px 0; position: relative;
}
.article-card img,.article-card video{
  width: 99%;padding: 7px; border-radius: 15px 15px 9px 9px; max-height: 400px; object-fit: cover;
}
.article-card h2{ text-align: center; color: red; padding: 10px; font-size: 20px; }
.article-card p{ padding: 0 15px 15px; font-weight: 600; color: blue; font-size: 14px; line-height: 1.6; }
.download-btn{
  position: absolute; top: 10px; right: 10px; background: #007bff; color: white; border: none;
  padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; z-index: 10;
}
.download-btn:hover{ background: #0056b3; }
.loveshow{ 
  position: fixed; 
  font-size: 0px; color: red; top: 50%; left: 50%; 
  transform: translate(-50%, -50%); animation: show 2s linear; pointer-events: none; z-index: 200;
}
@keyframes show{ 0%{font-size: 0px; opacity: 100%;} 100%{font-size: 200px; opacity: 0%;} }
.non-active{ display: none; }
.article-actions{
  padding: 0 15px 10px;
  text-align: center;
}
.share-article-btn{
  background: #25D366; 
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 600;
}
.share-article-btn:hover{
  background: #1ebe5c;
  }
.content{
  overflow: auto;
}
html, body {
  height: 100%;
  overflow: hidden; /* KEEP THIS */
}

body{
  font-size: 15pt;
  background-size: cover;
  background-attachment: fixed;
  background-image: url("https://images.unsplash.com/photo-1506744038136-46273834b3fb?q=80&w=1974&auto=format&fit=crop");
  background-repeat: no-repeat;
  font-family: Arial, sans-serif;
}

/* 3. AD BOX - make it fixed with header */
.adsbox{
  width: 90%; 
  max-width: 728px; 
  margin: 0 auto 5px auto;
  text-align: center; 
  min-height: 90px;
  background: rgba(255,255,255,0.1); 
  border-radius: 10px;
  overflow: hidden; 
}

/* ADD THIS: wrap header things so we can calculate height */
.header-fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: rgba(0,0,0,0.2);
  backdrop-filter: blur(5px);
  padding: 8px 0;
}

/* 5. SCROLLABLE CONTENT ONLY */
.content-wrapper {
  /* INCREASED: space for ad + cat + like */
  padding-bottom: 0px; /* space for fixed footer buttons */
  height: 64vh;
  overflow-y: auto; /* ONLY THIS SCROLLS */
  -webkit-overflow-scrolling: touch; /* smooth scroll on mobile */
}

.content{ 
  width: 100%; 
  padding-bottom: 0px; /* extra space so last card no hide under buttons */
}

#reactions{ 
  width: 100%; 
  height: 9vh; 
  position: fixed; /* GLUE TO BOTTOM */
  bottom: 0; /* CHANGE: was 10px, make it 0 */
  left: 0;
  display: flex; 
  justify-content: center; 
  align-items: center;
  z-index: 999; 
}

.article-card{
  width: 90%; max-width: 600px; background-color: white; border-radius: 15px; border: 2px solid blue;
  padding: 0 15px 0; position: relative;
  margin-bottom: 20px;
}
