/* ======================================================================
   Global Reset and Base Styles
========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: #f2f2f2; /* Light mode default */
  color: #333; /* Light mode default */
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: 50px; /* Global space for fixed bottom nav */
}

/* Base link style */
a {
  color: #2575fc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Base button style (if needed globally, can be overridden) */
button {
  background: #9045e0;
  color: white;
  padding: 8px 15px; /* Example padding */
  border: none;
  border-radius: 4px; /* Example radius */
  cursor: pointer;
  transition: opacity 0.2s ease;
}

button:hover {
  opacity: 0.9;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


/* ======================================================================
   Global Variables (Consider consolidating all :root variables here)
   ====================================================================== */
:root {
  --primary: #2575fc;
  --primary-dark: #1a5dcc; /* Added example */
  --secondary: #6a11cb;
  --background: #f2f2f2; /* Light mode bg */
  --text-dark: #333;    /* Light mode text */
  --text-muted: #555;
  --border-color: #ddd; /* Light mode border */
  --card-bg: #fff;     /* Light mode card bg */
  --border-radius: 8px;
  --transition: 0.3s ease;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  --box-shadow-heavy: 0 8px 24px rgba(0, 0, 0, 0.1);
  --font-sans: 'Arial', sans-serif;
  /* Add other commonly used variables */
}


/* ======================================================================
   Utility Classes
========================================================================== */
.text-center { text-align: center; }
.hide { display: none !important; } /* Use important if needed to override */
.show { display: block; } /* Or flex, inline-block etc. as needed */
.flex { display: flex; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.p-10 { padding: 10px; }
.p-15 { padding: 15px; }


/* ======================================================================
   Base Header Styling (Shared structure)
========================================================================== */
/* Applies to all headers unless overridden by page-specific styles */
header.header, header.home-header, header.view-header {
  background: linear-gradient(to right, #6a11cb, #2575fc);
  color: #fff;
  padding: 0 15px; /* Use padding instead of fixed height for flexibility */
  min-height: 60px; /* Ensure minimum height */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000; /* Consistent z-index */
  display: flex;
  align-items: center;
  box-shadow: var(--box-shadow);
}

header .logo {
  height: 50px; /* Adjust logo size for header height */
  width: auto;
  flex-shrink: 0; /* Prevent logo from shrinking */
}

/* Shared styles for potential header buttons (like back/logout) */
header .btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 5px; /* Clickable area */
}


/* ======================================================================
   Bottom Navigation Bar
========================================================================== */
nav.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to right, #2575fc, #6a11cb);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 1px 0;
  height: 50px;
  z-index: 1100;
  border-radius: 10px 10px 0 0;
  border-top: 1px solid black;
}

nav.bottom-nav a i {
  color: #fff;
  text-decoration: none;
  font-size: 1.6rem;
}

nav.bottom-nav a i:hover {
  color: #e0e0e0;
}

nav.bottom-nav a i1 {
  background: white;
  color: #36228f;
  border: 5px solid white;
  border-top: none;
  border-radius: 50px;
  text-decoration: none;
  font-size: 4rem;
  margin-bottom: 25px;
  
}

nav.bottom-nav a1:hover {
  color: #e0e0e0;
}

.bottom-profile-pic {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  object-fit: cover;
  margin-top: 10px;
}
/* ======================================================================
   Skeleton Loader Styles
========================================================================== */
.article-card.skeleton {
  border: 2px solid #6a11cb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.skeleton-img {
  background: #ddd;
  width: 100%;
  height: 180px;
  animation: pulse 1.5s infinite ease-in-out;
}

.skeleton-text {
  background: #ccc;
  height: 20px;
  margin: 10px;
  width: 80%;
  animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

/* ======================================================================
   Scrollbar styles (Global)
========================================================================== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-track {
  background: var(--background); /* Match body background */
}

/* ======================================================================
   App Notification / Alert (Global)
========================================================================== */
.app-notification {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  padding: 12px 45px 12px 20px; /* Right padding for close btn */
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 2000; /* High z-index */
  display: flex;
  align-items: center;
  min-width: 250px;
  max-width: 90%;
  opacity: 1;
  transition: opacity 0.4s ease, bottom 0.4s ease;
}

.app-notification.hide {
  opacity: 0;
  bottom: -100px;
  pointer-events: none;
}

/* Notification Types */
.app-notification.success { background-color: #4CAF50; }
.app-notification.error   { background-color: #f44336; }
.app-notification.info    { background-color: #2196F3; }
.app-notification.warning { background-color: #ff9800; }

#notification-message {
  flex-grow: 1;
  font-size: 0.95em;
  margin-right: 10px; /* Space before close button */
}

.notification-close-btn {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: inherit;
  font-size: 1.5em;
  line-height: 1;
  cursor: pointer;
  padding: 0 5px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
.notification-close-btn:hover { opacity: 1; }