/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

html, body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  user-select: none;
  background-color: #fff;
  color: #333;
  line-height: 1.4;
  padding-bottom: 10px !important; /* Space for bottom nav */
}

/* ===== HEADER & NAVIGATION ===== */
header {
  position: sticky !important;
  top: 0 !important;
  left: 0;
  right: 0;
  width: 100%;
  background: linear-gradient(-45deg, #007aff, #0056d6);
  color: #fff;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-bottom-left-radius: 23px;
  border-bottom-right-radius: 23px;
  padding: 15px 0 15px;
}


/* Menu Button - FIXED POSITION */
.menu-btn {
  position: absolute;
  left: 20px !important;
  top: 75% !important;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #fff;
  font-size: 35px;
  width: 50px;
  height: 50px;
  cursor: pointer;
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.logo {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin: 0;
}

#clock {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 6px 12px;
  border-radius: 16px;
  font-weight: 500;
  font-size: 12px;
  backdrop-filter: blur(10px);
}

.hr-home {
  width: 100%;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 10px;
  opacity: 0.5;
}

/* ===== POSTING DIV ===== */
.postingDiv {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 15px;
  padding: 12px 15px;
  background-color: #f2f2f7;
  border-radius: 12px;
  touch-action: manipulation;
}

.postImage {
  width: 50px;
  height: 50px;
  border-radius: 25px;
  object-fit: cover;
  margin-left: 10px;
}

.textarea-Shape {
  flex: 1;
  padding: 12px 0;
  border: none;
  background-color: transparent;
  color: #666;
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
}

#fa-paper-plane {
  color: #1da1f2;
  font-size: 20px;
  margin-right: 20px;
}

/* ===== SEARCH ===== */
.search-container {
  position: relative;
  max-width: 600px;
  margin: 15px auto;
  padding: 0 15px;
}

#quoteSearch {
  width: 100%;
  padding: 14px 15px 14px 45px;
  background-color: #f2f2f7 !important;
  border: none;
  border-radius: 20px;
  font-size: 16px;
  outline: none;
  color: #333;
  font-weight: 500;
  -webkit-appearance: none;
}

#quoteSearch::placeholder {
  color: #888;
  font-weight: 500;
}

.search-icon {
  position: absolute;
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  font-size: 16px;
}

/* ===== SIDEBAR NAVIGATION ===== */
.navbar {
  position: fixed;
  top: 0;
  left: -240px;
  width: 240px;
  height: 100vh;
  background-color: #f0f0f0;
  z-index: 1000;
  padding: 20px 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: left 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  border-radius: 0 10px 10px 0;
}

.navbar.open {
  left: 0;
}

.navbar ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.navbar li {
  padding: 12px 24px;
  transition: background-color 0.2s;
  border-radius: 0 24px 24px 0;
  margin: 4px 8px;
}

.navbar li:active {
  background: rgba(26, 115, 232, 0.12);
}

.navbar a, .navbar p {
  text-decoration: none;
  color: #333;
  font-size: 16px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.navbar .fas {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.navbar p[id="label"],
.navbar p[id="Features"] {
  font-weight: bold;
  margin-bottom: 5px;
  color: #333;
}

.navbar p[id="label"] u,
.navbar p[id="Features"] u {
  text-decoration: none;
  border-bottom: 1px solid #999;
}

.version {
  margin-top: 20px;
  margin-left: 25px;
  color: #aaaaaa;
  font-size: 13px;
}

/* ===== MAIN CONTENT AREA ===== */
main {
  padding: 0 0 80px 0;
  min-height: calc(100vh - 200px);
}

.section-title {
  text-align: center;
  margin: 20px 15px 10px;
  font-weight: bold;
  text-decoration: none;
  background-color: #007aff !important;
  color: #fff !important;
  padding: 10px;
  border-radius: 12px;
  font-size: 16px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.button-row {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
  padding: 0 15px;
  gap: 10px;
}

.button-row button {
  flex: 1;
  max-width: 48%;
  height: 90px;
  margin: 2px;
  padding: 15px 10px;
  text-align: center;
  border: none;
  border-radius: 12px;
  color: #fff;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  touch-action: manipulation;
  -webkit-appearance: none;
}

.button-row button:active {
  opacity: 0.8;
  transform: scale(0.98);
}

.button-row button i {
  font-size: 22px;
  margin-bottom: 5px;
}

#space-bottom {
  padding: 20px;
  margin: 10px;
  clear: both;
}

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #cccc;
  display: flex;
  border-top-left-radius:20px ;
  border-top-right-radius:20px ;
  justify-content: space-around;
  padding: 10px 0;
  z-index: 999;
  height: 60px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 6px 0;
  color: #8e8e93;
  font-size: 10px;
  font-weight: 500;
  gap: 4px;
  flex: 1;
  touch-action: manipulation;
}

.nav-item:active {
  opacity: 0.7;
}

.nav-item.active {
  color: #007aff;
}

.nav-item i {
  font-size: 22px;
}

/* ===== MESSENGER BUTTON ===== */
.messenger {
  position: fixed;
  bottom: 75px;
  right: 20px;
  width: 56px;
  height: 56px;
  background: linear-gradient(-45deg, #0aa64e, #0a52a6);
  border: 1px solid #f9f9f9;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f9f9f9;
  z-index: 998;
  transition: transform 0.1s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.messenger:active {
  transform: scale(0.9);
}

.fa-comment-dots {
  font-size: 1.5rem;
}

/* ===== TOAST ===== */
#toast-container {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: block;
  font-size: 14px;
  pointer-events: none;
}

.toast {
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  margin-bottom: 10px;
  animation: fadeIn 0.2s, fadeOut 0.2s 1.8s;
  max-width: 280px;
  text-align: center;
  backdrop-filter: blur(10px);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ===== LOADING ===== */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: rgba(0, 0, 0, 0.1);
  z-index: 10000;
  display: none;
}

.loading.show {
  display: block;
}

.loading::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, #007aff, #34c759);
  animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
  0% { left: -30%; }
  100% { left: 100%; }
}

/* ===== BUTTON COLORS (COMPLETE SET FROM ORIGINAL) ===== */
#Inspirational, #moral { background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 50%, #1B5E20 100%); }
#Motivation { background: linear-gradient(135deg, #FF9800 0%, #F57C00 50%, #E65100 100%); }
#Success, #farsi { background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 50%, #4A148C 100%); }
#Love, #shock { background: linear-gradient(135deg, #FF5722 0%, #E64A19 50%, #BF360C 100%); }
#Friendship { background: linear-gradient(135deg, #E91E63 0%, #C2185B 50%, #880E4F 100%); }
#Attitude { background: linear-gradient(135deg, #D32F2F 0%, #B71C1C 50%, #7F0000 100%); }
#Happiness { background: linear-gradient(135deg, #03A9F4 0%, #0288D1 50%, #01579B 100%); }
#Childhood { background: linear-gradient(135deg, #5C6BC0 0%, #3949AB 50%, #283593 100%); }
#Good-morning { background: linear-gradient(135deg, #F9A825 0%, #FBC02D 50%, #F9A825 100%); }
#Good-night, #football { background: linear-gradient(135deg, #0097A7 0%, #006064 50%, #00363A 100%); }
#Thanks { background: linear-gradient(135deg, #66BB6A 0%, #388E3C 50%, #1B5E20 100%); }
#Best-Wishes { background: linear-gradient(135deg, #26C6DA 0%, #00897B 50%, #006064 100%); }
#mix { background: linear-gradient(135deg, #8D6E63 0%, #5D4037 50%, #3E2723 100%); }
#Anniversary { background: linear-gradient(135deg, #9CCC65 0%, #689F38 50%, #33691E 100%); }
#aprilfool { background: linear-gradient(135deg, #CE93D8 0%, #AB47BC 50%, #8E24AA 100%); }
#birthday { background: linear-gradient(135deg, #F06292 0%, #E91E63 50%, #C2185B 100%); }
#breakup { background: linear-gradient(135deg, #FF7043 0%, #F4511E 50%, #BF360C 100%); }
#decent { background: linear-gradient(135deg, #BA68C8 0%, #9C27B0 50%, #7B1FA2 100%); }
#Exam { background: linear-gradient(135deg, #4FC3F7 0%, #0288D1 50%, #01579B 100%); }
#fatherday { background: linear-gradient(135deg, #FFA000 0%, #FF8F00 50%, #FF6F00 100%); }
#funny { background: linear-gradient(135deg, #FF8F00 0%, #FFB300 50%, #FF8F00 100%); }
#goodluck, #random { background: linear-gradient(135deg, #4DB6AC 0%, #00897B 50%, #006064 100%); }
#hindi { background: linear-gradient(135deg, #AD1457 0%, #880E4F 50%, #6A1B9A 100%); }
#hateyou { background: linear-gradient(135deg, #F44336 0%, #D32F2F 50%, #B71C1C 100%); }
#home { background: linear-gradient(135deg, #4DB6AC 0%, #00897B 50%, #00695C 100%); }
#Insult { background: linear-gradient(135deg, #FF7043 0%, #F4511E 50%, #D84315 100%); }
#Jealousy { background: linear-gradient(135deg, #9CCC65 0%, #7CB342 50%, #689F38 100%); }
#Kiss { background: linear-gradient(135deg, #F48FB1 0%, #EC407A 50%, #D81B60 100%); }
#life { background: linear-gradient(135deg, #FFAB00 0%, #FFD600 20%, #FFAB00 100%); }
#lessons { background: linear-gradient(135deg, #00ACC1 0%, #00838F 50%, #006064 100%); }
#moving, #facts { background: linear-gradient(135deg, #81C784 0%, #4CAF50 50%, #2E7D32 100%); }
#missyou { background: linear-gradient(135deg, #BA68C8 0%, #9C27B0 50%, #7B1FA2 100%); }
#naughty { background: linear-gradient(135deg, #FF8A65 0%, #FF7043 50%, #F4511E 100%); }
#parents { background: linear-gradient(135deg, #7CB342 0%, #558B2F 50%, #33691E 100%); }
#quotes { background: linear-gradient(135deg, #4DB6AC 0%, #00897B 50%, #00695C 100%); }
#Raining { background: linear-gradient(135deg, #26A69A 0%, #00897B 50%, #00695C 100%); }
#summer { background: linear-gradient(135deg, #FFB74D 0%, #FF9800 50%, #F57C00 100%); }
#tough { background: linear-gradient(135deg, #5C6BC0 0%, #3949AB 50%, #1A237E 100%); }
#unique { background: linear-gradient(135deg, #AB47BC 0%, #8E24AA 50%, #6A1B9A 100%); }
#weekend { background: linear-gradient(135deg, #26A69A 0%, #00897B 50%, #00695C 100%); }
#xpressions { background: linear-gradient(135deg, #66BB6A 0%, #43A047 50%, #2E7D32 100%); }
#yarns { background: linear-gradient(135deg, #BCAAA4 0%, #8D6E63 50%, #5D4037 100%); }
#zenith { background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 50%, #4A148C 100%); }
#gaming { background: linear-gradient(135deg, #7CB342 0%, #558B2F 50%, #33691E 100%); }
#cricket { background: linear-gradient(135deg, #FFA726 0%, #FB8C00 50%, #E65100 100%); }
#coding { background: linear-gradient(135deg, #78909C 0%, #546E7A 50%, #37474F 100%); }
#Urdu { background: linear-gradient(135deg, #EF5350 0%, #E53935 50%, #C62828 100%); }
#Pashto { background: linear-gradient(135deg, #66BB6A 0%, #43A047 50%, #2E7D32 100%); }

/* ===== NIGHT MODE ===== */
body.night-mode {
  background-color: #121212;
  color: #fff;
}

.night-mode header {
  background: linear-gradient(-45deg, #1a1a1a, #2d2d2d);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.night-mode .logo {
  color: #00d1f6;
}

.night-mode .navbar {
  background-color: #2d2d2d;
}

.night-mode .navbar li:hover {
  background: rgba(26, 155, 232, 0.2);
}

.night-mode .navbar a, .night-mode .navbar p {
  color: #fff;
}

.night-mode #quoteSearch {
  background-color: #2d2d2d !important;
  color: #fff;
}

.night-mode #quoteSearch::placeholder {
  color: #aaa;
}

.night-mode .postingDiv {
  background-color: #2d2d2d;
}

.night-mode .textarea-Shape {
  color: #aaa;
}

.night-mode .section-title {
  background-color: #0a84ff !important;
}

.night-mode .bottom-nav {
  background-color: #1a1a1a;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.night-mode .nav-item {
  color: #aaa;
}

.night-mode .nav-item.active {
  color: #0a84ff;
}

.night-mode .messenger {
  background: linear-gradient(-45deg, #1a1a1a, #2d2d2d);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Icon colors in night mode */
.night-mode .fa-moon { color: #fff; }
.night-mode .fa-shield-alt { color: #ff22cb; }
.night-mode .fa-book { color: #d3bc00; }
.night-mode .fa-heart { color: #ff4757; }
.night-mode .fa-paper-plane { color: #00d1f6; }
.night-mode .fa-lightbulb { color: #ffcc00; }
.night-mode .fa-circle { color: #34c759; }
.night-mode .fa-laugh-squint { color: #ff9500; }

/* Text colors in night mode */
.night-mode #features, 
.night-mode #label, 
.night-mode #night-mode-toggle,
.night-mode #next,
.night-mode #Privacy,
.night-mode #favourite,
.night-mode #facts,
.night-mode #memes,
.night-mode h2,
.night-mode #myquotes,
.night-mode #random,
.night-mode #terms,
.night-mode #tips {
  color: #fff;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 480px) {
  .navbar {
    width: 85%;
    left: -85%;
  }
  
  .navbar.open {
    width: 85%;
  }
  
  .button-row {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .button-row button {
    max-width: 48%;
    height: 85px;
    font-size: 14px;
    padding: 12px 8px;
  }
  
  .button-row button i {
    font-size: 20px;
  }
  
  .section-title {
    margin: 15px 12px 8px;
    padding: 8px;
    font-size: 15px;
  }
  
  .postingDiv {
    margin: 12px;
    padding: 10px 12px;
  }
  
  .postImage {
    width: 44px;
    height: 44px;
  }
  
  .messenger {
    bottom: 70px;
    right: 15px;
    width: 52px;
    height: 52px;
  }
  
  .bottom-nav {
    height: 56px;
    padding: 8px 0;
  }
  
  .nav-item i {
    font-size: 20px;
  }
}

@media (max-width: 360px) {
  .button-row button {
    height: 80px;
    font-size: 13px;
  }
  
  .menu-btn {
    left: 15px;
    font-size: 24px;
  }
  
  #clock {
    right: 15px;
    font-size: 11px;
    padding: 5px 10px;
  }
  
  .logo {
    font-size: 20px;
  }
}

/* ===== ACCESSIBILITY & SAFE AREAS ===== */


/* ===== UTILITY CLASSES ===== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.flex-center { 
  display: flex;
  align-items: center;
  justify-content: center;
}
.flex-column {
  display: flex;
  flex-direction: column;
}

/* ===== SCROLLBAR STYLING ===== */
.navbar::-webkit-scrollbar {
  width: 4px;
}

.navbar::-webkit-scrollbar-track {
  background: transparent;
}

.navbar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

.night-mode .navbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

/* ===== PRINT STYLES ===== */
@media print {
  .navbar,
  .bottom-nav,
  .messenger,
  .postingDiv,
  .menu-btn,
  #clock {
    display: none !important;
  }
  
  body {
    padding: 0;
    background: white;
    color: black;
  }
}
nav .version{margin-top:20px;margin-left:25px;color:#aaaaaa;}