/* Modern CSS Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Root Variables */
:root {
  --primary-color: #2563eb;
  --secondary-color: #64748b;
  --accent-color: #f59e0b;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --transition-fast: 0.15s ease-out;
  --transition-base: 0.3s ease-out;
}

/* Typography */
body {
  font-family: 'Noto Sans Bengali', 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  font-size: 16px;
}

/* Loading Spinner */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
  opacity: 1;
  transition: opacity var(--transition-base);
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Layout */
.container-fluid {
  max-width: 1400px;
  margin: 0 auto;
}

.main-content-area {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.sidebar-sticky {
  position: sticky;
  top: 2rem;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

/* Cards */
.card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-img-top {
  transition: transform var(--transition-base);
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

/* Buttons */
.btn {
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  border: none;
  padding: 0.75rem 1.5rem;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Scroll to Top */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: none;
  background: var(--primary-color);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
  cursor: pointer;
}

.scroll-top:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.scroll-top.show {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInUp 0.3s ease-out;
}

/* Scroll Progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  z-index: 9999;
  transition: width var(--transition-fast);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .main-content-area,
  .sidebar-sticky {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .scroll-top {
    bottom: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
  }
  
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --bg-primary: #1e293b;
    --bg-secondary: #0f172a;
    --border-color: #334155;
  }
}

/* Performance optimizations */
.card-img-top {
  will-change: transform;
}

.scroll-top {
  will-change: transform;
}

/* Focus styles for accessibility */
.btn:focus,
.scroll-top:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Grid improvements */
.row {
  margin-left: -0.75rem;
  margin-right: -0.75rem;
}

.col-lg-8,
.col-lg-4 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

