    body {
      font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
      background: #f0f2f5;
      margin: 0;
      padding: 0;
      background-image: url("../img/Bg.png");
      overflow-x: hidden;
      min-height: 100vh;
    }

    .header {
      background: #1a1a1a;
      color: white;
      padding: 10px 20px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }

    .header h2 {
      margin: 0;
      font-size: 18px;
    }

    .buttons button {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      border: none;
      color: white;
      padding: 8px 16px;
      margin-left: 10px;
      font-size: 14px;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.3s ease;
      box-shadow: 0 2px 8px rgba(0,0,0,0.2);
      font-weight: 500;
    }

    .buttons button:hover {
      background: linear-gradient(135deg, #5a67d8 0%, #6c5ce7 100%);
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }

    .buttons button:active {
      transform: translateY(0);
      box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }

    .buttons button i {
      margin-right: 6px;
    }

       #flipbook {
      flex: 1;
      max-width: 820px;
      width: 100%;
      height: 800px;
      margin: 10px auto 20px auto;
      position: relative;
      border-radius: 10px;
      overflow: visible;
    }

    img {
      width: 100%;
    }

    @media (max-width: 850px) {
      #flipbook {
        width: 95%;
      }
    }
.stf__item{
box-shadow: 6px 55px 17px #5d5d5d;
}
    .download-btn {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      border: none;
      color: white;
      padding: 8px 16px;
      margin-left: 10px;
      font-size: 14px;
      border-radius: 8px;
      text-decoration: none;
      transition: all 0.3s ease;
      box-shadow: 0 2px 8px rgba(0,0,0,0.2);
      font-weight: 500;
      display: inline-flex;
      align-items: center;
    }
    .download-btn:hover {
      background: linear-gradient(135deg, #5a67d8 0%, #6c5ce7 100%);
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0,0,0,0.3);
      color: white;
      text-decoration: none;
    }
.login-container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}
/* Centering wrapper */
.login-wrapper {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0px 4px 12px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 400px;
  text-align: center;
}

/* Logo */
.login-wrapper .logo {
  max-width: 180px;
  margin-bottom: 20px;
}

/* Form inputs */
.login-wrapper input {
  width: 96%;
  padding: 10px 8px 10px;
  margin: 10px 0px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
}

/* Submit button */
.login-wrapper button {
  width: 100%;
  padding: 12px 15px;
  background-color: #007bff;
  color: white;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
}

.login-wrapper button:hover {
  background-color: #0056b3;
}

/* Register link */
.register-link {
  margin-top: 15px;
  font-size: 14px;
}

.register-link a {
  color: #007bff;
  text-decoration: none;
}

.register-link a:hover {
  text-decoration: underline;
}

/* Error message */
.error {
  color: red;
  margin-bottom: 15px;
  font-size: 14px;
}
    .sidebar {
      min-height: 100vh;
      background-color: #1e2a38;
      padding: 20px;
      color: white;
      position: fixed;
      width: 240px;
      top: 0;
      left: 0;
      z-index: 1000;
    }

    .sidebar h4 {
      margin-bottom: 30px;
      font-size: 22px;
      text-align: center;
    }

    .sidebar a {
      display: block;
      color: #ccc;
      text-decoration: none;
      padding: 10px 15px;
      border-radius: 5px;
      margin-bottom: 10px;
    }

    .sidebar a:hover, .sidebar a.active {
      background-color: #0d6efd;
      color: white;
    }

    .main-content {
      margin-left: 240px;
      padding: 30px;
    }

    .topbar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 30px;
    }

    .card-stats {
      background: white;
      padding: 25px;
      border-radius: 10px;
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    }

    .card-stats h5 {
      color: #777;
      font-size: 16px;
    }

    .card-stats h2 {
      margin: 5px 0;
    }

    .btn-logout {
      margin-left: 10px;
    }

    @media (max-width: 768px) {
      .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 15px;
      }
      .main-content {
        margin-left: 0;
        padding: 15px;
        width: 100%;
      }
      
      /* Ensure full width on mobile */
      .container, .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 100% !important;
      }
      
      /* Make cards stack properly on mobile */
      .col-md-3, .col-md-4, .col-md-6, .col-md-8, .col-lg-4, .col-lg-8 {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 1rem;
      }
      
      /* Full width stat cards on mobile */
      .stat-card, .quick-actions, .recent-activity, .card-theme {
        margin-bottom: 1rem;
        width: 100% !important;
      }
      
      /* Adjust hero section on mobile */
      .hero-section {
        padding: 1.5rem !important;
        text-align: center;
      }
      
      .hero-section .col-md-4 {
        text-align: center !important;
        margin-top: 1rem;
      }
      
      /* Full width buttons and forms on mobile */
      .quick-action {
        padding: 1rem !important;
      }
      
      /* Responsive text sizes */
      .hero-section h1 {
        font-size: 1.5rem;
      }
      
      .page-title {
        font-size: 1.5rem;
      }
      
      /* Navigation improvements */
      .nav-menu {
        padding: 10px 0;
      }
      
      .nav-link {
        padding: 12px 15px;
        font-size: 1rem;
      }
      
      /* Ensure no horizontal scroll */
      body {
        overflow-x: hidden;
      }
      
      /* Fix any remaining spacing issues */
      .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
      }
      
      .row > * {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
      }
    }

/* ===== MODERN DASHBOARD STYLES ===== */
.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-20px, -10px) rotate(5deg); }
}

.stat-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(102, 126, 234, 0.02) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover::after {
  opacity: 1;
}

.quick-actions {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.quick-action {
  background: #fff;
  border: 2px solid rgba(0,0,0,0.05);
  color: inherit;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.quick-action::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transition: left 0.5s ease;
}

.quick-action:hover {
  transform: translateX(5px);
  border-color: rgba(102, 126, 234, 0.2);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
  color: inherit;
  text-decoration: none;
}

.quick-action:hover::before {
  left: 100%;
}

.recent-activity {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.activity-timeline {
  position: relative;
}

.activity-item {
  position: relative;
  transition: all 0.3s ease;
  border-radius: 8px;
  padding: 0.5rem;
  margin: -0.5rem;
}

.activity-item:hover {
  background: rgba(248, 250, 252, 0.8);
  transform: translateX(5px);
}

.activity-icon {
  background: rgba(102, 126, 234, 0.1) !important;
  transition: all 0.3s ease;
}

.activity-item:hover .activity-icon {
  background: rgba(102, 126, 234, 0.2) !important;
  transform: scale(1.1);
}

/* ===== SIDEBAR ENHANCEMENTS ===== */
.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  box-shadow: 4px 0 20px rgba(0,0,0,0.1);
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  z-index: 1000;
  overflow-y: auto;
  padding: 20px;
}

/* Sidebar Header */
.sidebar-header {
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
  max-width: 100px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.sidebar-title {
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Navigation Menu */
.nav-menu {
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-link {
  display: flex !important;
  align-items: center;
  color: #cbd5e1 !important;
  text-decoration: none;
  padding: 10px 15px;
  border-radius: 8px;
  margin: 0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-link i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: #667eea;
  transform: scaleY(0);
  transition: transform 0.3s ease;
  border-radius: 0 2px 2px 0;
}

.nav-link:hover {
  background: rgba(102, 126, 234, 0.1) !important;
  color: #ffffff !important;
  transform: translateX(3px);
}

.nav-link:hover::before {
  transform: scaleY(1);
}

.nav-link.active {
  background: rgba(102, 126, 234, 0.15) !important;
  color: #ffffff !important;
  font-weight: 600;
}

.nav-link.active::before {
  transform: scaleY(1);
}

/* Sidebar Footer */
.sidebar-footer {
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: auto;
}

.theme-toggle-sidebar {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #cbd5e1;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  padding: 10px 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}

.theme-toggle-sidebar:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: white;
  transform: translateY(-1px);
}

.logout-link {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  margin: 0;
}

.logout-link:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #ffffff !important;
  border-color: rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

/* Theme-specific adjustments */
[data-theme="dark"] .sidebar {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

[data-theme="dark"] .theme-toggle-sidebar {
  border-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .theme-toggle-sidebar:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.2);
}

.card-stats {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

/* ===== PAGE HEADER STYLES ===== */
.page-header {
  background: transparent;
  padding: 0;
  margin-bottom: 2rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

.page-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ===== UPLOAD AREA STYLES ===== */
.upload-area {
  background: var(--bg-primary);
  border: 3px dashed var(--border-color);
  color: var(--text-primary);
  transition: all 0.4s ease;
  border-radius: 12px;
}

.upload-area:hover {
  border-color: var(--accent-primary);
  background: var(--bg-tertiary);
}

.upload-area.dragover {
  border-color: var(--accent-success);
  background: rgba(16, 185, 129, 0.1);
}

/* ===== MAGAZINE CARD STYLES ===== */
.magazine-card {
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.magazine-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.magazine-thumbnail {
  height: 180px;
  background: var(--bg-tertiary);
  border-radius: 8px 8px 0 0;
  position: relative;
  overflow: hidden;
}

.thumbnail-placeholder {
  height: 100%;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.magazine-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.magazine-card:hover .magazine-overlay {
  opacity: 1;
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
}

/* ===== FILE INFO STYLES ===== */
.file-info {
  border-radius: 8px;
  overflow: hidden;
}

/* ===== TEMPLATE CARD STYLES ===== */
.template-card {
  transition: all 0.3s ease;
  border-color: var(--border-color) !important;
}

.template-card:hover {
  border-color: var(--accent-primary) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

/* ===== PERFORMANCE ITEM STYLES ===== */
.performance-item {
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.performance-item:hover {
  border-color: var(--border-color);
  transform: translateX(5px);
}

/* ===== USER AVATAR STYLES ===== */
.user-avatar {
  transition: all 0.3s ease;
}

.user-row:hover .user-avatar > div {
  transform: scale(1.1);
}

#flipbook, #flipbook * {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}  


@media only screen and (max-width:767px) {
.login-container {
  min-height: auto;
  margin-top: 40px;
  padding: 15px;
}
    .header {
  display: block;
  padding: 10px 15px;
    }
    .buttons button {
  padding: 6px 5px;
  font-size: 11px;
  margin-top: 10px;
}
    .download-btn{
       padding: 6px 5px;
  font-size: 11px;  
    }
      #flipbook, .stf__block, .stf__parent, .stf__wrapper {
    top: 0 !important;
    margin-top: 0 !important;
    transform: translateY(0) !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .stf__item {
    top: 0px !important;
    transform: none !important;
  }
  
  /* Additional mobile fixes for very small screens */
  .main-content {
    padding: 10px !important;
  }
  
  .card-theme {
    margin-bottom: 0.75rem;
  }
  
  .activity-item {
    padding: 0.75rem 0.5rem;
  }
  
  .stat-card {
    padding: 1rem !important;
  }
  
  .hero-section {
    padding: 1rem !important;
    margin-bottom: 1rem;
  }
  
  /* Magazine viewer mobile improvements */
  .magazine-card {
    margin-bottom: 1rem;
  }
  
  .magazine-thumbnail {
    height: 150px;
  }
  
  /* Form improvements on mobile */
  .form-control, .btn {
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  /* Table responsive on mobile */
  .table-responsive {
    border: none;
    overflow-x: auto;
  }
  
  /* Sidebar improvements for mobile */
  .sidebar {
    padding: 10px 15px;
  }
  
  .sidebar-header {
    text-align: center;
    padding-bottom: 15px;
  }
}

/* Additional mobile and tablet breakpoints */
@media (max-width: 991px) {
  /* Tablet styles */
  .col-md-3 {
    width: 50% !important;
    max-width: 50%;
  }
  
  .col-lg-4, .col-lg-8 {
    width: 100% !important;
    max-width: 100%;
  }
}

@media (max-width: 576px) {
  /* Extra small mobile devices */
  .col-md-3, .col-md-4, .col-md-6, .col-md-8 {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .main-content {
    padding: 8px !important;
  }
  
  .hero-section {
    padding: 0.75rem !important;
  }
  
  .hero-section h1 {
    font-size: 1.25rem;
  }
  
  .stat-card {
    padding: 0.75rem !important;
  }
  
  .quick-action {
    padding: 0.75rem !important;
  }
  
  /* Ensure no content is cut off */
  * {
    box-sizing: border-box;
  }
  
  .container, .container-fluid {
    padding: 0 8px !important;
  }
}

/* Force full width utility class */
.mobile-full-width {
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 15px;
  padding-right: 15px;
}
