:root {
  --font-primary: "Inter", sans-serif;

  /* Light Theme Palette */
  --color-background: #f8f9fa; /* A very light grey, almost white */
  --color-surface: #ffffff; /* Pure white for cards, headers */
  --color-border: #dee2e6; /* A soft grey for borders */
  --color-text-primary: #212529; /* A dark, near-black for main text */
  --color-text-secondary: #6c757d; /* A muted grey for sub-text */
  --color-accent: #a77424; /* A vibrant accent color */
  --color-accent-hover: #a77424; /* A lighter accent for hover states */
}

/*
 * The dark theme is activated by adding a data-theme="dark" attribute to the <html> tag.
 * We just need to override the variables we defined in :root.
 */
[data-theme="dark"] {
  /* Dark Theme Palette */
  --color-background: #121212; /* A very dark, near-black background */
  --color-surface: #1e1e1e; /* A slightly lighter dark for surfaces */
  --color-border: #343a40; /* A dark grey for borders */
  --color-text-primary: #e9ecef; /* A very light grey for main text */
  --color-text-secondary: #adb5bd; /* A muted light grey for sub-text */
  --color-accent: #a77424; /* A slightly brighter accent for dark mode */
  --color-accent-hover: #a77424; /* A lighter accent for hover states */
}

/* --- 2. GLOBAL & RESET STYLES --- */

/* A simple reset for consistency across browsers */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* --- 3. THEMED LAYOUT STYLES --- */

body {
  font-family: var(--font-primary), -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-background);
  margin: 0;
  padding: 6px;
}

.details-view-container {
  width: calc(100% + 12px);
  margin: -6px;
  padding: 0;
  border-radius: 0;
  border: none;
}

h1 {
  color: var(--color-text-primary);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.description {
  margin-bottom: 1rem;
}

.details-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.9fr;
  gap: 40px;
}

.metadata {
  border-right: 1px solid var(--color-border);
  padding-right: 30px;
}

.metadata h2 {
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 10px;
  margin-top: 0;
  font-size: 1.2rem;
}

.metadata p {
  margin: 10px 0;
}

.metadata strong {
  /* Using secondary text for labels to distinguish from values */
  color: var(--color-text-secondary);
  display: inline-block;
  width: 120px;
}

.preview-box h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

.preview-embed {
  width: 100%;
  height: 50vh;
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

.download-button {
  display: inline-block;
  background-color: var(--color-accent);
  color: #fff;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 20px;
  text-align: center;
  transition: background-color 0.2s ease-in-out;
}

.download-button:hover {
  background-color: var(--color-accent-hover);
  color: #fff;
}

.error-message {
  text-align: center;
  /* Note: No error color variable was defined.
     For a full theme, you would add --color-error to your palettes. */
  color: #c0392b;
  font-size: 1.2em;
}

@media (max-width: 992px) {
  .details-grid {
    grid-template-columns: 1fr;
  }
  .metadata {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    padding-right: 0;
    padding-bottom: 20px;
    margin-bottom: 30px;
  }
}

/* --- Payment Modal Styles --- */
.payment-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.payment-modal-content {
  background: var(--color-background);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  align-items: center;
  width: 95%;
  max-width: 600px;
  position: relative;
}
.payment-modal-content h3 {
  text-align: center;
  margin-bottom: 1rem;
  color: var(--color-text-primary);
}

.payment-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--color-text-secondary);
}
#payment-form input {
  width: 100%;
  padding: 12px;
  margin: 0.5rem 0 1rem 0;
  border-radius: 4px;
  border: 1px solid var(--color-border);
}
#payment-form .download-button {
  width: 100%;
}
#payment-status {
  text-align: center;
  padding: 1rem;
}
.payment-modal-content p {
  text-align: center; 
  line-height: 1.6; 
  word-break: break-word;
}

#modal-price {
  text-transform: capitalize;
  font-weight: 700;
  display: inline-block;
  margin-top: 5px;
}

#modal-doc-title {
  text-transform: capitalize;
  font-weight: 700;
  display: inline-block;
  margin-top: 5px;
}

/* =================================================================== */
/* CSS FOR THE LOGIN POPUP (THEME-AWARE)                               */
/* =================================================================== */
.login-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-overlay-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.login-popup-content {
  background-color: var(--bg-secondary);
  color: var(--text-heading);
  padding: 30px 40px;
  border-radius: 20px;
  text-align: center;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 8px 30px var(--shadow-strong-color);
  border: 1px solid var(--border-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  transform: scale(0.95);
  opacity: 0;
  animation: fadeInScale 0.3s forwards ease-out;
}

@keyframes fadeInScale {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.login-popup-content .icon {
  font-size: 48px;
  margin-bottom: 15px;
  color: var(--accent-primary);
}

.login-popup-content h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-heading);
}

.login-popup-content p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 25px;
}

.login-popup-button {
  display: inline-block;
  background-color: var(--accent-primary);
  color: var(--bg-primary); /* Use a contrasting background color for text */
  padding: 14px 40px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  border: none;
  cursor: pointer;
  transition: background-color var(--transition-speed) ease, transform 0.2s ease;
}

.login-popup-button:hover {
  background-color: var(--accent-primary-hover);
  color: var(--bg-primary);
  transform: translateY(-2px);
}

/* ==========================================================================
   2. DETAILS PAGE LAYOUT & SIDEBAR
   ========================================================================== */

/* 2.1 Two-Column Page Layout */
.page-layout {
  display: flex;
  flex-wrap: wrap; /* Allows stacking on smaller screens */
  gap: 30px; /* Space between main content and sidebar */
}

.main-content-column {
  flex: 1; /* Takes up remaining space */
  min-width: 300px; /* Prevents it from getting too squished */
  flex-basis: 65%; /* Tries to be 65% of the width initially */
  background: var(--color-surface);
  padding: 16px;
  border-radius: 8px;
  /* Note: A static shadow works okay, but for more advanced themes, you might
     create a shadow variable or use a semi-transparent color. */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--color-border);
}

.sidebar-column {
  flex-basis: 30%; /* Tries to be 30% of the width */
  min-width: 280px;
  flex-grow: 1; /* Allows it to grow if space is available */
  background: var(--color-surface);
  padding: 16px;
  border-radius: 8px;
  /* Note: A static shadow works okay, but for more advanced themes, you might
     create a shadow variable or use a semi-transparent color. */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--color-border);
}

/* 2.2 Sidebar Widgets */
.sidebar-widget {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 2px 5px var(--shadow-color);
}

.sidebar-widget h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.2em;
  color: var(--text-heading);
  border-bottom: 2px solid var(--border-secondary);
  padding-bottom: 10px;
}

/* 2.4 Related Documents List */
.related-docs-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-docs-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  text-decoration: none;
  color: var(--text-primary);
  border-radius: 6px;
  transition: background-color var(--transition-speed);
}

.related-docs-list li a:hover {
  background-color: var(--element-bg-hover);
  color: var(--accent-primary);
}

.related-docs-list .file-icon {
  font-size: 1.2em;
}

/* 2.5 Responsive Stacking */
@media (max-width: 992px) {
  .page-layout {
    flex-direction: column; /* Stack main content on top of sidebar */
  }

  .main-content-column,
  .sidebar-column {
    flex-basis: 100%; /* Make both full width */
  }
}

/* In your main CSS file, replace the old .file-icon style */
.related-docs-list .material-symbols-outlined {
  font-size: 2em; /* Make the icon slightly bigger than text */
  vertical-align: middle; /* Align icon nicely with the text */
  /* You can also set a specific color if you want */
  /* color: var(--accent-primary); */
}

.social-share-section {
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  background-color: var(--color-background);
  color: var(--color-text-primary);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.social-share-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Center icon */
  width: 40px;
  /* Square shape */
  height: 40px;
  /* Square shape */
  border-radius: 5px;
  text-decoration: none;
  color: #fff;
  font-size: 1.1rem;
  /* Icon size */
  transition: opacity 0.2s;
}

.share-btn:hover {
  opacity: 0.85;
}

.share-btn-facebook {
  background-color: #1877f2;
}

.share-btn-twitter {
  background-color: #1da1f2;
}

.share-btn-whatsapp {
  background-color: #25d366;
}

.share-btn-linkedin {
  background-color: #0a66c2;
}

.share-btn-telegram {
  background-color: #24a1de;
}

.share-btn-reddit {
  background-color: #ff4500;
}

.share-btn-email {
  background-color: #777;
}

.share-count {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-left: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   STUDOKE DETAILS PAGE - MODERN UI IMPROVEMENTS
   ========================================================================== */

/* Additional CSS improvements to enhance the existing details.css */

/* 1. ENHANCED ANIMATIONS & TRANSITIONS */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* 2. ENHANCED DOCUMENT HEADER */
.document-header {
  background: linear-gradient(
    135deg,
    var(--color-surface) 0%,
    rgba(167, 116, 36, 0.05) 100%
  );
  padding: 2rem;
  border-radius: 12px;
  animation: fadeInUp 0.6s ease-out;
  border: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.document-header::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  background: radial-gradient(
    circle,
    rgba(167, 116, 36, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
}

.document-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 1rem;
  line-height: 1.3;
  position: relative;
  z-index: 1;
}

/* 3. IMPROVED METADATA SECTION */
.document-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--color-surface);
  border-radius: 10px;
  border: 1px solid var(--color-border);
  animation: slideIn 0.5s ease-out 0.2s both;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--color-background);
  border-radius: 20px;
  transition: all 0.3s ease;
}

.meta-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(167, 116, 36, 0.15);
}

.meta-label {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.meta-value {
  font-size: 0.95rem;
  color: var(--color-text-primary);
  font-weight: 600;
}

/* 4. ENHANCED ACTION BUTTONS */
.action-buttons {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
}

.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, #a77424 0%, #c08930 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(167, 116, 36, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(167, 116, 36, 0.4);
}

.btn-icon {
  font-size: 1.2rem;
}

/* 5. IMPROVED PREVIEW BOX */
.preview-box {
  background: var(--color-surface);
  padding: 2rem;
  border-radius: 12px;
  margin: 2rem 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--color-border);
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

.preview-box h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  color: var(--color-text-primary);
  margin-bottom: 1rem;
}

.section-icon {
  font-size: 1.3rem;
}

.preview-info {
  color: var(--color-text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.preview-container {
  position: relative; /* Ensure relative positioning for absolute child */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    transparent 70%,
    rgba(255, 255, 255, 0.95) 100%
  );
  z-index: 9999; /* Aggressive z-index */
  /* pointer-events: auto; (Default) - This element MUST capture clicks */
  cursor: not-allowed; /* Visual feedback */
}

/* 6. ENHANCED SOCIAL SHARE SECTION */
.social-share-section {
  background: linear-gradient(
    135deg,
    var(--color-surface) 0%,
    rgba(167, 116, 36, 0.03) 100%
  );
  padding: 2rem;
  border-radius: 12px;
  margin: 2rem 0;
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

.social-share-section h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--color-text-primary);
}

.social-share-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.share-btn {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.share-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.share-btn:hover::after {
  width: 100%;
  height: 100%;
}

.share-btn:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.share-btn-facebook {
  background: #1877f2;
  color: white;
}

.share-btn-twitter {
  background: #1da1f2;
  color: white;
}

.share-btn-whatsapp {
  background: #25d366;
  color: white;
}

.share-btn-linkedin {
  background: #0077b5;
  color: white;
}

.share-btn-telegram {
  background: #0088cc;
  color: white;
}

.share-btn-reddit {
  background: #ff4500;
  color: white;
}

.share-btn-email {
  background: #6c757d;
  color: white;
}

.share-count {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--color-background);
  border-radius: 20px;
  font-weight: 600;
  color: var(--color-text-primary);
}

/* 7. IMPROVED SIDEBAR WIDGETS */
.sidebar-widget {
  background: var(--color-surface);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--color-border);
  animation: fadeInUp 0.6s ease-out 0.5s both;
  transition: transform 0.3s ease;
}

.sidebar-widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

.sidebar-widget h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-accent);
  color: var(--color-text-primary);
}

.widget-icon {
  font-size: 1.3rem;
}

/* 8. ENHANCED RELATED DOCUMENTS GRID */
.related-docs-grid {
  display: grid;
  gap: 1rem;
}

.related-doc-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--color-background);
  border-radius: 8px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.related-doc-card:hover {
  transform: translateX(5px);
  background: var(--color-surface);
  border-color: var(--color-accent);
  box-shadow: 0 3px 10px rgba(167, 116, 36, 0.15);
}

.related-doc-card h4 {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

.doc-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: linear-gradient(
    135deg,
    rgba(167, 116, 36, 0.1) 0%,
    rgba(167, 116, 36, 0.2) 100%
  );
  border-radius: 8px;
  flex-shrink: 0;
}

.doc-icon .material-symbols-outlined {
  font-size: 1.5rem;
  color: var(--color-accent);
}

.doc-info {
  flex: 1;
  min-width: 0;
}

.doc-info h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.doc-info h4 a {
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.doc-info h4 a:hover {
  color: var(--color-accent);
}

.doc-description {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
}

.doc-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.doc-type {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: var(--color-background);
  border-radius: 4px;
  color: var(--color-text-secondary);
  font-weight: 600;
}

.doc-price {
  font-size: 0.85rem;
  color: var(--color-accent);
  font-weight: 600;
}

.doc-free {
  font-size: 0.85rem;
  color: #27ae60;
  font-weight: 600;
}

/* 9. STATISTICS WIDGET */
.stats-widget {
  background: linear-gradient(
    135deg,
    var(--color-surface) 0%,
    rgba(167, 116, 36, 0.05) 100%
  );
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.stat-item {
  text-align: center;
  padding: 1rem;
  background: var(--color-background);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(167, 116, 36, 0.15);
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 10. NO RELATED DOCS STATE */
.no-related {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-secondary);
}

.no-related-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* 11. ENHANCED PAYMENT MODAL - MODERN PROFESSIONAL DESIGN */
.payment-modal-overlay {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
  background: rgba(0, 0, 0, 0.7);
}

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

@keyframes slideUp {
  from {
    transform: translateY(30px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.payment-modal-content {
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  background: linear-gradient(
    145deg,
    var(--color-surface) 0%,
    var(--color-background) 100%
  );
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 600px;
  width: 95%;
  position: relative;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.payment-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  cursor: pointer;
  color: var(--color-text-secondary);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.payment-modal-close:hover {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
  transform: rotate(90deg);
}

/* Modal Header */
.payment-modal-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.payment-icon-wrapper {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(67, 160, 71, 0.3);
  position: relative;
}

.payment-icon-wrapper::before {
  content: "";
  position: absolute;
  inset: -3px;
  background: linear-gradient(135deg, rgba(67, 160, 71, 0.5), transparent);
  border-radius: 22px;
  z-index: -1;
  animation: pulse-ring 2s infinite;
}

.mpesa-logo {
  width: 60px;
  height: auto;
  filter: brightness(0) invert(1);
}

.payment-modal-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 0.5rem;
}

.payment-subtitle {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin: 0;
}

/* Order Summary */
.payment-order-summary {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.5rem 0;
}

.order-label {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.order-value {
  font-size: 0.9rem;
  color: var(--color-text-primary);
  font-weight: 500;
  text-align: right;
  max-width: 60%;
  word-break: break-word;
}

.order-divider {
  height: 1px;
  background: var(--color-border);
  margin: 0.5rem 0;
}

.order-total {
  padding-top: 0.75rem;
}

.order-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: #43a047;
}

/* Payment Input */
.payment-input-group {
  margin-bottom: 1.25rem;
}

.payment-input-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
}

.payment-input-group label i {
  color: #43a047;
}

.phone-input-wrapper {
  display: flex;
  align-items: stretch;
  border: 2px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.2s ease;
  background: var(--color-background);
}

.phone-input-wrapper:focus-within {
  border-color: #43a047;
  box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.15);
}

.phone-prefix {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  font-weight: 600;
  color: var(--color-text-secondary);
  font-size: 1rem;
}

.phone-input-wrapper input {
  flex: 1;
  border: none;
  padding: 0.875rem 1rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text-primary);
  background: transparent;
  letter-spacing: 0.5px;
}

.phone-input-wrapper input:focus {
  outline: none;
}

.phone-input-wrapper input::placeholder {
  color: var(--color-text-secondary);
  opacity: 0.6;
}

.input-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  margin-top: 0.5rem;
}

/* Submit Button */
.payment-submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.payment-submit-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.payment-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(67, 160, 71, 0.4);
}

.payment-submit-btn:hover::before {
  left: 100%;
}

.payment-submit-btn:active {
  transform: translateY(0);
}

/* Trust Badges */
.trust-badges {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0 1rem;
  flex-wrap: wrap;
}

.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.trust-badge i {
  font-size: 1.25rem;
  color: #43a047;
  opacity: 0.9;
}

/* Security Notice */
.security-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  text-align: center;
  margin: 0;
  padding-top: 0.5rem;
}

.security-notice i {
  color: #43a047;
  font-size: 0.9rem;
}

/* Payment Status States */
#payment-status {
  text-align: center;
  padding: 2rem 1.5rem;
  animation: fadeIn 0.3s ease;
}

.status-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.status-icon.processing {
  background: linear-gradient(
    135deg,
    rgba(67, 160, 71, 0.1),
    rgba(67, 160, 71, 0.2)
  );
  border: 3px solid transparent;
  border-top-color: #43a047;
  animation: spin 1s linear infinite;
}

.status-icon.success {
  background: linear-gradient(135deg, #43a047, #2e7d32);
  color: white;
}

.status-icon.error {
  background: linear-gradient(135deg, #ef5350, #d32f2f);
  color: white;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.status-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
}

.status-message {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .payment-modal-content {
    padding: 1.5rem 1rem;
    border-radius: 16px;
    margin: 0.5rem;
    width: calc(100% - 1rem);
    max-width: none;
  }

  .payment-modal-header h3 {
    font-size: 1.3rem;
  }

  .payment-subtitle {
    font-size: 0.85rem;
  }

  .payment-icon-wrapper {
    width: 64px;
    height: 64px;
  }

  .mpesa-logo {
    width: 48px;
  }

  .payment-order-summary {
    padding: 0.875rem 1rem;
  }

  .order-value {
    max-width: 55%;
  }

  .trust-badges {
    gap: 0.75rem;
    justify-content: space-around;
  }

  .trust-badge {
    font-size: 0.6rem;
  }

  .trust-badge i {
    font-size: 1.1rem;
  }

  .security-notice {
    font-size: 0.75rem;
  }

  .payment-submit-btn {
    padding: 0.875rem 1rem;
    font-size: 1rem;
  }
}

/* 12. LOADING STATES */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  to {
    left: 100%;
  }
}

/* 13. ENHANCED RESPONSIVE DESIGN */
@media (max-width: 768px) {
  .document-header h1 {
    font-size: 1.5rem;
  }

  .document-meta {
    gap: 0.75rem;
  }

  .meta-item {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 140px;
  }

  .action-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .social-share-buttons {
    justify-content: center;
  }
}

/* 14. SMOOTH SCROLLING */
html {
  scroll-behavior: smooth;
}

/* 15. FOCUS STYLES FOR ACCESSIBILITY */
*:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* 16. PRINT STYLES */
@media print {
  .sidebar-column,
  .social-share-section,
  .action-buttons,
  .preview-overlay {
    display: none;
  }

  .main-content-column {
    max-width: 100%;
  }
}
/* ==========================================================================
   STUDOKE DETAILS PAGE - CLEANER, MINIMAL UI
   ========================================================================== */

/* Override excessive containers and borders */

/* 1. REMOVE EXCESSIVE BORDERS AND SHADOWS */
.container {
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
}

.main-content-column {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
}

.sidebar-column {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 0 0 2rem !important;
}

/* 2. SIMPLIFY DOCUMENT HEADER */
.document-header {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin-bottom: 0.3rem !important;
}

.document-header::before {
  display: none !important;
}

/* 3. CLEANER METADATA SECTION */
.document-meta {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 1.5rem 0 !important;
}

.meta-item {
  background: var(--color-surface) !important;
  border: 1px solid var(--color-border) !important;
  padding: 0.75rem 1rem !important;
}

.meta-item:hover {
  box-shadow: 0 2px 8px rgba(167, 116, 36, 0.1) !important;
}

/* 4. SIMPLIFIED PREVIEW BOX */
.preview-box {
  background: transparent !important;
  padding: 0 !important;
  margin: 2rem 0 !important;
  box-shadow: none !important;
  border: none !important;
}

.preview-box h2 {
  margin-bottom: 1rem !important;
  padding-bottom: 0.5rem !important;
  border-bottom: 1px solid var(--color-border) !important;
}

.preview-container {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  border: 1px solid var(--color-border) !important;
}

/* 5. CLEANER SIDEBAR WIDGETS */
.sidebar-widget {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-bottom: 2.5rem !important;
}

.sidebar-widget:hover {
  transform: none !important;
  box-shadow: none !important;
}

.sidebar-widget h3 {
  font-size: 1.1rem !important;
  margin-bottom: 1rem !important;
  padding-bottom: 0.5rem !important;
  border-bottom: 1px solid var(--color-border) !important;
}

/* 6. SIMPLIFIED RELATED DOCS */
.related-docs-grid {
  gap: 0.75rem !important;
}

.related-doc-card {
  background: var(--color-surface) !important;
  border: 1px solid var(--color-border) !important;
  padding: 1rem !important;
}

.related-doc-card:hover {
  border-color: var(--color-accent) !important;
  box-shadow: 0 2px 8px rgba(167, 116, 36, 0.1) !important;
}

/* 7. CLEANER SOCIAL SHARE SECTION */
.social-share-section {
  background: transparent !important;
  border-top: 1px solid var(--color-border) !important;
  border-radius: 0 !important;
  padding: 1.5rem 0 !important;
  margin: 2rem 0 0 0 !important;
  box-shadow: none !important;
}

/* 8. SIMPLIFIED STATS WIDGET */
.stats-widget {
  background: transparent !important;
}

.stats-grid {
  gap: 0.75rem !important;
}

.stat-item {
  background: var(--color-surface) !important;
  border: 1px solid var(--color-border) !important;
  padding: 1rem !important;
}

.stat-item:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 2px 8px rgba(167, 116, 36, 0.1) !important;
}

/* 9. CLEANER BUTTONS */
.btn {
  box-shadow: none !important;
  border: 2px solid transparent !important;
}

.btn-primary {
  background: var(--color-accent) !important;
  border-color: var(--color-accent) !important;
}

.btn-primary:hover {
  background: #c08930 !important;
  border-color: #c08930 !important;
  box-shadow: 0 2px 8px rgba(167, 116, 36, 0.2) !important;
}

/* 10. REDUCE VISUAL NOISE */
.page-layout {
  gap: 2rem !important;
}

/* Remove unnecessary icons if too cluttered */
.widget-icon,
.section-icon {
  display: none !important;
}

/* 11. CLEANER TYPOGRAPHY */
h1,
h2,
h3 {
  font-weight: 600 !important;
}

/* 12. MINIMALIST DOCUMENT INFO */
.document-description {
  color: var(--color-text-secondary) !important;
  font-size: 1rem !important;
  line-height: 1.6 !important;
  margin: 0 !important;
}

/* 13. SIMPLIFIED ACTION BUTTONS AREA */
.action-buttons {
  margin: 1.5rem 0 !important;
  padding: 1.5rem 0 !important;
  border-top: 1px solid var(--color-border) !important;
  border-bottom: 1px solid var(--color-border) !important;
}

/* 14. CLEANER SHARE BUTTONS */
.share-btn {
  box-shadow: none !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.share-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

/* 15. REDUCE ANIMATION INTENSITY */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-5px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 16. FOCUS ON CONTENT */
.main-content-column h1 {
  font-size: 1.75rem !important;
  margin-bottom: 0.75rem !important;
}

/* 17. MOBILE RESPONSIVENESS - EVEN CLEANER */
@media (max-width: 768px) {
  .sidebar-column {
    padding: 1.5rem 0 0 0 !important;
    border-top: 1px solid var(--color-border) !important;
  }

  .page-layout {
    gap: 0 !important;
  }

  .meta-item {
    flex: 1 1 100% !important;
  }
}

/* 18. REMOVE GRADIENT BACKGROUNDS */
.document-header,
.social-share-section,
.stats-widget {
  background: transparent !important;
}

/* 19. CONSISTENT SPACING */
.preview-box,
.sidebar-widget,
.social-share-section {
  margin-bottom: 2rem !important;
}

/* 20. FOCUS STATES - SUBTLE */
*:focus-visible {
  outline: 1px solid var(--color-accent) !important;
  outline-offset: 2px !important;
}
/* ==========================================================================
   STUDOKE DETAILS PAGE - SPACING & LAYOUT FIXES
   ========================================================================== */

/* Fix metadata spacing in sidebar */
.metadata {
  padding: 0 !important;
  border: none !important;
}

.metadata h2 {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  margin-bottom: 1.5rem !important;
  padding-bottom: 0.75rem !important;
  border-bottom: 2px solid var(--color-accent) !important;
  color: var(--color-text-primary) !important;
}

.metadata p {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin: 0 !important;
  padding: 0.875rem 1rem !important;
  background: var(--color-surface) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 8px !important;
  margin-bottom: 0.75rem !important;
  transition: all 0.2s ease !important;
}

.metadata p:hover {
  transform: translateX(4px) !important;
  border-color: var(--color-accent) !important;
  box-shadow: 0 2px 8px rgba(167, 116, 36, 0.1) !important;
}

.metadata p:last-child {
  margin-bottom: 0 !important;
}

.metadata strong {
  color: var(--color-text-secondary) !important;
  font-weight: 500 !important;
  font-size: 0.9rem !important;
  display: inline-block !important;
  width: auto !important;
  margin-right: 1rem !important;
}

.metadata p span:not(strong) {
  color: var(--color-text-primary) !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  text-align: right !important;
}

/* Improve the download button */
.download-button {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  padding: 1rem 1.5rem !important;
  margin-top: 1.5rem !important;
  background: linear-gradient(135deg, #a77424 0%, #c08930 100%) !important;
  color: white !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  border: none !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
}

.download-button:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(167, 116, 36, 0.3) !important;
  background: linear-gradient(135deg, #c08930 0%, #a77424 100%) !important;
}

/* Add icon to download button if missing */
.download-button::before {
  content: "💳" !important;
  font-size: 1.2rem !important;
}

/* Fix spacing for details grid if it exists */
.details-grid {
  gap: 2rem !important;
}

/* Ensure proper spacing between sections */
.metadata + .preview-box {
  margin-top: 2rem !important;
}

/* For dark mode compatibility */
[data-theme="dark"] .metadata p {
  background: var(--color-surface) !important;
  border-color: var(--color-border) !important;
}

[data-theme="dark"] .metadata p:hover {
  border-color: var(--color-accent) !important;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .metadata p {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 0.75rem !important;
  }

  .metadata strong {
    margin-bottom: 0.25rem !important;
    margin-right: 0 !important;
    font-size: 0.85rem !important;
  }

  .metadata p span:not(strong) {
    text-align: left !important;
    font-size: 1rem !important;
  }
}

/* Alternative card-based layout for metadata */
.metadata-card {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
  gap: 1rem !important;
  margin: 1.5rem 0 !important;
}

.metadata-item {
  background: var(--color-surface) !important;
  padding: 1rem !important;
  border-radius: 8px !important;
  border: 1px solid var(--color-border) !important;
  text-align: center !important;
  transition: all 0.2s ease !important;
}

.metadata-item:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
  border-color: var(--color-accent) !important;
}

.metadata-item .meta-label {
  display: block !important;
  font-size: 0.85rem !important;
  color: var(--color-text-secondary) !important;
  margin-bottom: 0.25rem !important;
  font-weight: 500 !important;
}

.metadata-item .meta-value {
  display: block !important;
  font-size: 1.1rem !important;
  color: var(--color-text-primary) !important;
  font-weight: 600 !important;
}

/* Special styling for file type */
.metadata p:has(strong:contains("Type")),
.metadata p:has(strong:contains("File Type")) {
  background: linear-gradient(
    135deg,
    var(--color-surface) 0%,
    rgba(167, 116, 36, 0.05) 100%
  ) !important;
}

/* Special styling for downloads count */
.metadata p:has(strong:contains("Downloads")) {
  position: relative !important;
  overflow: hidden !important;
}

.metadata p:has(strong:contains("Downloads"))::after {
  content: "📥" !important;
  position: absolute !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  opacity: 0.2 !important;
  font-size: 1.5rem !important;
}
/* RESET AND FIX METADATA SPACING PROPERLY */

/* Reset all the previous bad changes */
.metadata p {
  all: revert !important;
  display: block !important;
  margin: 0 0 1rem 0 !important; /* Add proper spacing between items */
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  transform: none !important;
  position: static !important;
  overflow: visible !important;
}

.metadata p:hover {
  transform: none !important;
  border: none !important;
  box-shadow: none !important;
}

.metadata p::after {
  display: none !important;
}

/* Simple, clean metadata styling */
.metadata {
  padding-right: 20px !important;
}

.metadata h2 {
  font-size: 1.2rem !important;
  margin-bottom: 1.5rem !important;
  padding-bottom: 0.5rem !important;
  border-bottom: 2px solid var(--color-accent) !important;
}

.metadata strong {
  color: var(--color-text-secondary) !important;
  font-weight: 500 !important;
  display: inline-block !important;
  width: 110px !important;
  font-size: 0.9rem !important;
}

.metadata p span:not(strong) {
  color: var(--color-text-primary) !important;
  font-weight: 600 !important;
}

/* Make the button look better without the weird icon */
.download-button {
  background: #a77424 !important;
  color: white !important;
  padding: 12px 24px !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  display: inline-block !important;
  margin-top: 1.5rem !important;
  font-weight: 600 !important;
  transition: background 0.2s ease !important;
  width: 100% !important;
  text-align: center !important;
}

.download-button::before {
  display: none !important; /* Remove the weird emoji */
}

.download-button:hover {
  background: #c08930 !important;
  transform: translateY(-1px) !important;
}

/* Fix button if it has an ID */
#pay-button {
  background: #a77424 !important;
  color: white !important;
  padding: 12px 24px !important;
  border-radius: 6px !important;
  border: none !important;
  cursor: pointer !important;
  width: 100% !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}

#pay-button:hover {
  background: #c08930 !important;
}

/* Clean spacing between all metadata items */
.metadata p:last-child {
  margin-bottom: 0 !important;
}

/* For better visual hierarchy - optional card style */
.metadata.card-style p {
  background: var(--color-surface) !important;
  padding: 12px 16px !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 6px !important;
  margin-bottom: 12px !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .metadata strong {
    display: block !important;
    margin-bottom: 4px !important;
  }
}
/* FIX FOR THE ACTUAL METADATA-GRID STRUCTURE */

.metadata-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0.75rem !important; /* Space between each meta-item */
  margin-top: 1rem !important;
}

.meta-item {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 0.75rem 1rem !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 6px !important;
  transition: all 0.2s ease !important;
}

.meta-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--color-accent) !important;
}

.meta-label {
  font-size: 0.9rem !important;
  color: #888 !important;
  font-weight: 400 !important;
}

.meta-value {
  font-size: 0.95rem !important;
  color: #fff !important;
  font-weight: 600 !important;
  text-align: right !important;
}

/* Special styling for file type */
.meta-value.file-type {
  background: var(--color-accent) !important;
  padding: 0.2rem 0.6rem !important;
  border-radius: 4px !important;
  font-size: 0.8rem !important;
}

/* For dark theme */
[data-theme="dark"] .meta-item {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .metadata-grid {
    gap: 0.5rem !important;
  }

  .meta-item {
    padding: 0.6rem 0.8rem !important;
    font-size: 0.9rem !important;
  }
}

/* Add this to your existing CSS file */
.view-full-doc-btn {
  display: inline-block;
  margin-left: 15px;
  padding: 5px 10px;
  background-color: #007bff;
  color: #ffffff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: bold;
}

.view-full-doc-btn:hover {
  background-color: #0056b3;
}

@media (max-width: 768px) {
  .page-layout {
    flex-direction: column;
  }

  .main-content-column {
    order: 1;
  }

  .sidebar-column {
    order: 2;
  }
}
