/* Mobile Responsive Styles for Mondoshare */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
  gap: 5px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
  background: rgba(148, 163, 184, 0.2);
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #e2e8f0;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Base mobile adjustments */
@media (max-width: 768px) {
  /* Mobile Menu Toggle */
  .mobile-menu-toggle {
    display: flex !important;
  }

  /* User dashboard filters - make them stack on mobile */
  #userFilesBody ~ div .flex.items-center.gap-3.mb-4 {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  #userFilesBody ~ div .flex.items-center.gap-3.mb-4 > .relative {
    width: 100%;
  }

  #userFilesBody ~ div .flex.items-center.gap-3.mb-4 > button {
    width: 100%;
    justify-content: center;
  }

  #desktopFilterOptions {
    flex-direction: column;
    width: 100%;
  }

  #desktopFilterOptions select {
    width: 100%;
  }

  /* Hide Filters text on mobile, keep icon only */
  #desktopFilterToggle span {
    display: none;
  }

  #desktopFilterToggle {
    padding: 10px;
  }

  /* Move Upload button below text on mobile */
  .flex-row.items-center.justify-between.mb-6.gap-4 {
    flex-direction: column;
    align-items: stretch;
  }

  .flex-row.items-center.justify-between.mb-6.gap-4 > .flex-1.min-w-0 {
    width: 100%;
    order: 1;
  }

  .flex-row.items-center.justify-between.mb-6.gap-4 > .flex.items-center.gap-2.sm\:gap-3.flex-shrink-0 {
    width: 100%;
    order: 2;
    justify-content: center;
  }

  /* Stats cards - icon on left, text on right, number below in mobile */
  #statsGridDesktop {
    flex-direction: column !important;
    width: 100% !important;
  }

  #statsGridDesktop > .bg-slate-900\/50.rounded-xl.p-4.border.border-slate-700\/50 {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  #statsGridDesktop > .bg-slate-900\/50.rounded-xl.p-4.border.border-slate-700\/50 > .flex.items-center.gap-2 {
    justify-content: space-between !important;
    width: 100% !important;
  }

  #statsGridDesktop > .bg-slate-900\/50.rounded-xl.p-4.border.border-slate-700\/50 > div:not(.flex) {
    text-align: right !important;
  }

  /* Files badge and delete button - vertical on mobile */
  .flex-col.sm\:flex-row.sm\:items-center.justify-between.mb-4.gap-4 > .flex.items-center.gap-3 {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  #tableFilesBadge {
    text-align: center !important;
  }

  #userDeleteSelectedBtn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Mobile file checkbox - same size as desktop */
  .mobile-file-select .file-checkbox {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
  }

  /* File list item - reduce padding and remove right margin in mobile */
  .file-list-item {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  .file-list-item .flex-1.min-w-0 {
    margin-right: 0 !important;
  }

  /* File name - truncate with ellipsis on mobile */
  .file-list-item .truncate {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 75% !important;
  }

  /* Hide desktop navigation on mobile */
  .nav-links,
  .desktop-nav,
  .site-header nav {
    display: none !important;
  }

  /* Show mobile menu when active */
  .mobile-menu {
    display: none !important;
  }

  .mobile-menu.active {
    display: flex !important;
  }

  /* Adjust header for mobile */
  .site-header {
    justify-content: space-between !important;
  }

  /* Ensure sidebar links work correctly on mobile */
  .bg-slate-800\/50 nav a {
    pointer-events: auto !important;
    cursor: pointer !important;
  }

  .bg-slate-800\/50 nav button {
    pointer-events: auto !important;
    cursor: pointer !important;
  }

  /* Fix sidebar backdrop blocking clicks on mobile */
  .app-sidebar-backdrop {
    display: none !important;
  }

  /* Ensure sidebar itself allows clicks and is above backdrop */
  .app-sidebar {
    pointer-events: auto !important;
    z-index: 1000 !important;
  }

  /* Ensure sidebar nav allows clicks */
  .app-sidebar nav {
    pointer-events: auto !important;
  }

  /* Prevent horizontal scroll */
  html,
  body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Utility classes */
  .p-8 {
    padding: 0.5rem !important;
  }

  .px-4 {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .py-8 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }

  .bg-primary\/20 {
    background-color: rgb(6 182 212 / 0.2) !important;
    margin: 8px auto !important;
  }

  #selectFileBtn {
    margin: 0 8px 8px 0 !important;
    width: 75% !important;
    font-size: 1.5rem !important;
    padding: 0.6rem 1rem !important;
  }

  /* Ensure all containers are 100% width */
  * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Main container */
  main,
  .main-content,
  .app-shell,
  .max-w-7xl,
  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* App content padding on mobile */
  .app-content {
    padding: 0px !important;
    margin-left: 0 !important;
    margin-top: 60px !important;
  }

  /* Main content padding bottom on mobile */
  .main-content {
    padding-bottom: 40px !important;
  }

  /* Reduce padding for upload and recent files sections on mobile */
  #upload-studio,
  [class*="bg-slate-800/50"] {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* File Cards Mobile */
  .file-card {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    padding: 8px !important;
    gap: 4px !important;
  }


  .file-card .file-type-icon {
    width: 25% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }

  /* Guest File Card Specific Classes - Mobile */
  .guest-file-icon {
    border-radius: 6px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
  }

  .guest-file-icon svg {
    width: 38px !important;
    height: 38px !important;
  }

  .guest-file-name {
    width: 54% !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: flex !important;
    align-items: center !important;
  }

  .guest-file-size {
    width: 32% !important;
    font-size: 1.2rem !important;
    color: #94a3b8 !important;
    white-space: nowrap !important;
    text-align: right !important;
    justify-content: flex-end !important;
  }

  /* Override for elements inside file-info-inline */
  .file-info-inline .guest-file-name {
    width: auto !important;
    flex: 1 !important;
    flex-shrink: 1 !important;
  }

  .file-info-inline .guest-file-size {
    width: auto !important;
    flex-shrink: 0 !important;
  }

  .file-card .file-name {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    margin-bottom: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }

  .file-card .file-meta {
    font-size: 0.65rem !important;
    color: #94a3b8 !important;
    white-space: nowrap !important;
  }

  /* Hide file actions by default on mobile */
  .file-card .file-actions,
  .file-card .guest-file-actions {
    display: none !important;
  }

  /* File actions box that appears on click */
  .file-card-actions-box {
    display: none !important;
    width: 100% !important;
    padding: 8px !important;
    background: rgba(30, 41, 59, 0.95) !important;
    border-radius: 8px !important;
    margin-top: 8px !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
  }

  .file-card-actions-box.active {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    justify-content: center !important;
  }

  /* Hide file size when actions box is active */
  .file-card:has(.file-card-actions-box.active) .guest-file-size {
    display: none !important;
  }

  /* Hide file name in card when actions box is active */
  .file-card:has(.file-card-actions-box.active) .guest-file-name {
    display: none !important;
  }

  /* Hide file info from file-card on mobile */
  .file-card .file-info {
    display: none !important;
  }

  /* File-info-inline styles for mobile */
  .file-card .file-info-inline {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px !important;
  }

  /* Override general styles for elements inside file-info-inline */
  .file-info-inline .guest-file-icon {
    width: 42px !important;
    height: 42px !important;
    flex-shrink: 0 !important;
  }

  .file-info-inline .guest-file-name {
    width: auto !important;
    flex: 1 !important;
    flex-shrink: 1 !important;
  }

  .file-info-inline .guest-file-size {
    width: auto !important;
    flex-shrink: 0 !important;
  }

@media (max-width: 768px) {
    .text-center.py-8 {
        padding: 1.5rem 0.5rem !important;
        font-size: 1rem !important;
    }

    .text-2xl {
        font-size: 1.2rem !important;
    }

    .guest-file-size {
        font-size: 1rem !important;
    }
}

/* Hide file-card-actions-box by default on mobile */
  .file-card .file-card-actions-box {
    display: none !important;
  }

  /* When active, hide file-info-inline and show actions box */
  .file-card.file-card-actions-box-active .file-info-inline {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }

  .file-card.file-card-actions-box-active .file-card-actions-box {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* When active, hide all file info elements including icon */
  .file-card.file-card-actions-box-active .guest-file-icon,
  .file-card.file-card-actions-box-active .guest-file-name,
  .file-card.file-card-actions-box-active .guest-file-size {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* When active, hide file-info-inline completely */
  .file-card.file-card-actions-box-active .file-info-inline {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Also hide the desktop file actions when active */
  .file-card.file-card-actions-box-active .file-actions,
  .file-card.file-card-actions-box-active .guest-file-actions {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }

  /* File icon without color on mobile */
  .file-icon-no-color {
    color: #94a3b8 !important;
    width: 34px !important;
    height: 34px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(148, 163, 184, 0.1) !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }

  .file-info-inline .guest-file-icon {
    width: 34px !important;
    height: 34px !important;
    flex-shrink: 0 !important;
  }

  .guest-file-icon svg {
    width: 34px !important;
    height: 34px !important;
  }

  /* File name and size layout on mobile */
  .file-info-inline .guest-file-name {
    flex: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: #ffffff !important;
    font-size: 0.9rem !important;
  }

  .file-info-inline .guest-file-size {
    color: #94a3b8 !important;
    font-size: 1rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  /* File name in actions box */
  .file-card-actions-box .file-name-display {
    width: 100% !important;
    text-align: center !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    padding: 8px 0 !important;
    margin-bottom: 8px !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Buttons row container */
  .file-card-actions-box .buttons-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    justify-content: center !important;
    width: 100% !important;
  }

  .file-card-actions-box .buttons-row button,
  .file-card-actions-box .buttons-row a {
    flex: 0 0 auto !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 8px !important;
    font-size: 0 !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
  }

  .file-card-actions-box .buttons-row button svg,
  .file-card-actions-box .buttons-row a svg {
    width: 24px !important;
    height: 24px !important;
  }

  /* Hide text content in action buttons on mobile */
  .file-card-actions-box .buttons-row button span,
  .file-card-actions-box .buttons-row a span {
    display: none !important;
  }

  /* Grid Cards Mobile - Convert to Rows */
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-5 {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
  }

  .grid-cols-2 > *,
  .grid-cols-3 > *,
  .grid-cols-5 > * {
    width: 100% !important;
  }

  /* Feature Cards Mobile */
  .feature-card-hover {
    padding: 8px !important;
    border-radius: 8px !important;
  }

  .feature-card-hover .text-4xl {
    font-size: 2rem !important;
    margin-bottom: 4px !important;
    height: 24px;
  }

  .feature-card-hover h3 {
    font-size: 1.2rem !important;
    margin-bottom: 8px !important;
    margin-top: 24px;
  }

  .feature-card-hover p {
    font-size: 0.6rem !important;
    line-height: 1.2 !important;
    display: none !important;
  }

  /* Hero Section Mobile */
  .guest-hero {
    padding: 0.75rem !important;
    border-radius: 12px !important;
    margin-bottom: 0.5rem !important;
  }

  .guest-hero h1 {
    font-size: 1.8rem !important;
    line-height: 1.2 !important;
    margin-bottom: 0.5rem !important;
  }

  .guest-hero p {
    font-size: 1.1rem !important;
    line-height: 1.3 !important;
    margin-bottom: 0.75rem !important;
    padding: 0 !important;
  }

  .guest-hero .homepage-btn {
    font-size: 1.2rem !important;
    padding: 0.8rem 3rem !important;
    margin: 14px auto !important;
  }

  .guest-hero .grid {
    gap: 0.5rem !important;
  }

  .guest-hero .grid-cols-1 {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .guest-hero .grid-cols-1 > * {
    width: 100% !important;
  }

  /* Upload Section Mobile */
  #upload-studio {
    padding: 0.75rem !important;
    border-radius: 12px !important;
    margin-bottom: 0.5rem !important;
  }

  #upload-studio h2 {
    font-size: 1rem !important;
    margin-bottom: 0.5rem !important;
  }

  /* Main Container Mobile */
  .max-w-7xl {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  /* Page Title Mobile */
  main {
    padding-top: 0.5rem !important;
  }

  /* Navigation Mobile */
  .nav-link {
    font-size: 0.75rem !important;
    padding: 0.4rem 0.6rem !important;
  }

  /* Button Mobile */
  .btn {
    font-size: 0.75rem !important;
    padding: 0.4rem 0.8rem !important;
  }

  /* Form Elements Mobile */
  input[type="file"] {
    font-size: 0.75rem !important;
  }

  /* File List Mobile */
  .file-list {
    gap: 0.5rem !important;
  }

  /* Empty State Mobile */
  .text-center.py-8 {
    padding: 1.5rem 0.5rem !important;
    font-size: 1rem !important;
  }

  /* Responsive Text Sizes */
  .text-2xl {
    font-size: 1.2rem !important;
  }

  .text-xl {
    font-size: 0.9rem !important;
  }

  .text-lg {
    font-size: 0.85rem !important;
  }

  .text-sm {
    font-size: 0.7rem !important;
  }

  .text-xs {
    font-size: 0.65rem !important;
  }

  /* Responsive Spacing */
  .mb-6 {
    margin-bottom: 0.75rem !important;
  }

  .mb-8 {
    margin-bottom: 0.75rem !important;
  }

  .gap-6 {
    gap: 0.5rem !important;
  }

  .gap-4 {
    gap: 0.4rem !important;
  }

  /* Responsive Border Radius */
  .rounded-3xl {
    border-radius: 0.75rem !important;
  }

  .rounded-2xl {
    border-radius: 0.5rem !important;
  }

  .rounded-xl {
    border-radius: 0.4rem !important;
  }

  /* Stats Cards Mobile */
  .grid-cols-2 > div,
  .grid-cols-3 > div,
  .grid-cols-5 > div {
    padding: 8px 12px !important;
    border-radius: 6px !important;
    direction: ltr !important;
    text-align: left !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 6px !important;
    min-height: 32px !important;
  }

  .grid-cols-2 > div > .flex,
  .grid-cols-3 > div > .flex,
  .grid-cols-5 > div > .flex {
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px !important;
    margin-bottom: 0 !important;
  }

  .grid-cols-2 > div > .flex .w-10,
  .grid-cols-3 > div > .flex .w-10,
  .grid-cols-5 > div > .flex .w-10 {
    width: 34px !important;
    height: 34px !important;
  }

  .grid-cols-2 > div > .flex .w-5,
  .grid-cols-3 > div > .flex .w-5,
  .grid-cols-5 > div > .flex .w-5 {
    width: 12px !important;
    height: 12px !important;
  }

  .grid-cols-2 > div .text-2xl,
  .grid-cols-3 > div .text-2xl,
  .grid-cols-5 > div .text-2xl {
    font-size: 1.2rem !important;
  }

  .grid-cols-2 > div .text-lg,
  .grid-cols-3 > div .text-lg,
  .grid-cols-5 > div .text-lg {
    font-size: 1rem !important;
  }

  .grid-cols-2 > div .text-sm,
  .grid-cols-3 > div .text-sm,
  .grid-cols-5 > div .text-sm {
    font-size: 1rem !important;
  }

  .grid-cols-5 > div .text-2xl {
    font-size: 1rem !important;
  }

  .grid-cols-2 > div .text-xs,
  .grid-cols-3 > div .text-xs,
  .grid-cols-5 > div .text-xs {
    display: block !important;
    font-size: 1rem !important;
  }

  .grid-cols-2 > div .w-10,
  .grid-cols-3 > div .w-10,
  .grid-cols-5 > div .w-10 {
    width: 28px !important;
    height: 28px !important;
  }

  .grid-cols-2 > div .w-10 svg,
  .grid-cols-3 > div .w-10 svg,
  .grid-cols-5 > div .w-10 svg {
    width: 14px !important;
    height: 14px !important;
  }

  /* Upload Studio Mobile */
  #upload-studio {
    padding: 12px !important;
    border-radius: 16px !important;
  }

  #upload-studio h2 {
    font-size: 1.25rem !important;
    margin-bottom: 12px !important;
  }

  /* Header & Navigation */
  .site-header {
    padding: 16px;
    flex-wrap: wrap;
    gap: 12px;
    position: relative;
  }
  .download-ad {
    width: 100%;
    max-width: 100;

  }

  .site-logo {
    font-size: 1rem;
  }

  .site-logo span {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  /* Mobile Menu Toggle */
  .mobile-menu-toggle {
    display: flex;
  }

  /* Navigation Links - Mobile Menu */
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    margin-top: 12px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  }

  .nav-links.menu-active-state {
    display: flex !important;
    animation: slideDown 0.3s ease-out;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-links a,
  .nav-link-button {
    width: 100%;
    text-align: center;
    padding: 12px 16px;
    font-size: 0.95rem;
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.08);
    transition: all 0.2s ease;
  }

  .nav-links a:hover,
  .nav-link-button:hover {
    background: rgba(var(--color-primary-rgb, 59, 130, 246), 0.15);
  }

  .nav-links form {
    width: 100%;
  }

  .nav-links form button {
    width: 100%;
  }

  /* Hero Section */
  .hero-block {
    padding: 32px 16px 24px;
  }

  .hero-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    line-height: 1.1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
  }

  .guest-hero h1 {
    width: 100% !important;
    max-width: 100% !important;
  }

  .hero-copy {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-top: 16px;
  }

  .primary-action {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    margin-top: 24px;
  }

  /* Feature Cards */
  .feature-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 32px;
  }

  .feature-card {
    padding: 20px;
    border-radius: 16px;
  }

  .feature-card h3 {
    font-size: 1rem;
    margin-bottom: 12px;
  }

  .feature-card p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  /* Section Title */
  .section-title {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    margin-bottom: 12px;
  }

  /* Upload Studio */
  .upload-studio {
    padding: 4px 8px !important;
    border-radius: 20px;
  }

  .upload-studio h2 {
    font-size: clamp(1.2rem, 5vw, 1.5rem);
  }

  .upload-limit-notice {
    font-size: 0.85rem;
    padding: 10px 12px;
    border-radius: 12px;
    line-height: 1.4;
  }

  /* Upload Card */
  .upload-card {
    padding: 20px 16px;
    border-radius: 16px;
    width: 100%;
  }

  .upload-zone {
    padding: 24px 16px;
    border-radius: 16px;
  }

  .upload-zone strong {
    font-size: 0.95rem;
  }

  .upload-zone small {
    font-size: 0.8rem;
  }

  /* Upload Actions */
  .upload-actions {
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
  }

  .upload-actions button {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.9rem;
    min-height: 44px;
    border-radius: 8px;
  }

  /* Primary Action Button */
  .primary-action {
    width: 100%;
    padding: 12px 20px;
    font-size: 0.95rem;
    border-radius: 8px;
  }

  /* Status Box */
  .status-box {
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 0.9rem;
    min-height: 60px;
  }

  /* File List */
  .file-list {
    margin-top: 20px;
    gap: 12px;
  }

  .file-card {
    padding: 16px;
    border-radius: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .file-card .file-info {
    width: 100%;
    display: flex;
  align-items: center;  
  gap: 12px;
  }

  .file-card strong {
    font-size: 0.95rem;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .file-card span {
    font-size: 0.85rem;
  }

  .file-actions,
  .guest-file-actions {
    display: none;
  }

  .file-card {
    cursor: pointer;
  }

  .file-card .file-info {
    pointer-events: none;
  }

  /* Mobile file action popup */
  .file-action-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px 20px 0 0;
    padding: 20px 16px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    max-width: 100%;
  }

  .file-action-popup.active {
    transform: translateY(0);
  }

  .file-action-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .file-action-popup-title {
    color: white;
    font-weight: 600;
    font-size: 16px;
  }

  .file-action-popup-close {
    border: none;
    color: white;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
  }

  .file-action-popup-close svg {
    width: 18px;
    height: 18px;
  }

  .file-action-popup-buttons {
    display: grid;
    grid-template-columns: repeat(5, 0.5fr);
    gap: 6px;
    padding-bottom: 40px;
  }

  .file-action-popup-buttons button,
  .file-action-popup-buttons a {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: white;
  }

  .file-action-popup-buttons button:hover,
  .file-action-popup-buttons a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
  }

  .file-action-popup-buttons button svg,
  .file-action-popup-buttons a svg {
    width: 20px;
    height: 20px;
  }

  .file-action-popup-buttons button span,
  .file-action-popup-buttons a span {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
  }

  .file-action-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
  }

  .file-action-popup-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .action-with-icon {
    gap: 6px;
  }

  .action-icon {
    width: 14px;
    height: 14px;
  }

  .action-icon svg {
    width: 14px;
    height: 14px;
  }

  /* Admin Panel Mobile */
  .admin-panel {
    padding: 16px 12px;
  }

  .panel-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .panel-card {
    padding: 20px 16px;
    border-radius: 16px;
    overflow: hidden;
  }

  .panel-card h2 {
    font-size: 1.4rem;
    margin-bottom: 8px;
  }

  .panel-card h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
  }

  .panel-card p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .section-title {
    font-size: 0.85rem;
    margin-bottom: 12px;
  }

  /* Panel Menu Mobile */
  .panel-menu {
    gap: 8px;
  }

  .panel-menu > a {
    padding: 14px 16px;
    font-size: 0.95rem;
    border-radius: 12px;
  }

  .panel-menu > form {
    margin-top: 12px;
    display: block;
  }

  .panel-menu > form button {
    width: 100%;
    padding: 14px 16px;
    font-size: 0.95rem;
    min-height: 48px;
    border-radius: 12px;
  }

  /* Table Tools Mobile */
  .table-tools {
    grid-template-columns: 1fr !important;
    gap: 10px;
    margin: 16px 0 12px;
  }

  .table-tools input,
  .table-tools select {
    min-height: 48px;
    padding: 12px 16px;
    font-size: 0.95rem;
    border-radius: 12px;
    width: 100%;
  }

  /* Filter group mobile - make fields vertical */
  .filter-group {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .filter-group input,
  .filter-group select {
    width: 100% !important;
    min-height: 48px;
  }

  /* Bootstrap row mobile - make vertical */
  .row {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .row > div {
    width: 100% !important;
    max-width: 100% !important;
  }

  .row input,
  .row select {
    width: 100% !important;
    min-height: 48px;
  }

  /* Bootstrap d-flex mobile - make vertical */
  .d-flex {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: flex-start !important;
  }

  .d-flex > * {
    width: 100% !important;
  }

  .d-flex.justify-content-between {
    justify-content: flex-start !important;
  }

  /* Admin Files Body Mobile - make it professional */
  #adminFilesBody {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }

  /* Desktop Stats Cards - Mobile Layout */
  .desktop-stats-cards {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Mobile Filters Section */
  .mobile-filters-section {
    margin-bottom: 16px !important;
  }

  /* Hide desktop filters on mobile */
  .d-none.d-md-flex {
    display: none !important;
  }

  /* Mobile Select All Section */
  .mobile-select-all-section {
    margin-bottom: 12px !important;
  }

  .mobile-select-all-wrapper {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
  }

  .admin-select-all-btn {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 1 !important;
    padding: 10px 16px !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
    transition: all 0.3s ease !important;
  }

  .admin-select-all-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4) !important;
  }

  .admin-select-all-btn:active {
    transform: translateY(0) !important;
  }

  .admin-select-all-btn svg {
    flex-shrink: 0 !important;
  }

  .mobile-files-badge {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 16px !important;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: white !important;
}

/* Mobile Search Wrapper */
.mobile-search-wrapper {
  display: none;
}

@media (max-width: 768px) {
  .mobile-search-wrapper {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
  }

  .mobile-search-wrapper .form-control {
    flex: 1 !important;
  }
}

  .admin-filter-toggle-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 48px !important;
    height: 48px !important;
    padding: 0 !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
  }

  .admin-filter-toggle-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4) !important;
  }

  .admin-filter-toggle-btn:active {
    transform: translateY(0) !important;
  }

  .admin-filter-toggle-btn svg {
    flex-shrink: 0 !important;
  }

  .mobile-filters-content {
    margin-top: 12px !important;
    padding: 16px !important;
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  }

  .mobile-filter-item {
    margin-bottom: 12px !important;
  }

  .mobile-filter-item:last-child {
    margin-bottom: 0 !important;
  }

  .mobile-filter-item .form-select {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid #dae0ec !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    background-color: #f8f9fa !important;
  }

  .desktop-stats-cards .card {
    padding: 16px !important;
  }

  .desktop-stats-cards .card-body {
    padding: 0 !important;
  }

  .desktop-stats-cards .d-flex {
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
  }

  .desktop-stats-cards .ms-3 {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .desktop-stats-cards .w-50px {
    width: 48px !important;
    height: 48px !important;
    flex: 0 0 auto !important;
  }

  .desktop-stats-cards .h4 {
    font-size: 1.5rem !important;
    margin-bottom: 0 !important;
  }

  .desktop-stats-cards .text-muted {
    font-size: 0.85rem !important;
  }

  #adminFilesBody .file-list-item {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    padding: 8px 16px !important;
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    gap: 8px !important;
    align-items: center !important;
  }

  /* Alternating row colors */
  #adminFilesBody .file-list-item:nth-child(even) {
    background: #f8fafc !important;
  }

  /* File list container - add spacing */
  .file-list {
    margin-top: 12px !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Admin Users Page Header - Mobile */
  .bg-white.rounded-2xl.border.border-gray-200 > .p-6.border-b {
    padding: 16px !important;
  }

  .bg-white.rounded-2xl.border.border-gray-200 > .p-6.border-b .flex {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .bg-white.rounded-2xl.border.border-gray-200 > .p-6.border-b .flex > div:first-child {
    width: 100% !important;
  }

  .bg-white.rounded-2xl.border.border-gray-200 > .p-6.border-b .flex > div:first-child h1 {
    font-size: 1.25rem !important;
    margin-bottom: 4px !important;
  }

  .bg-white.rounded-2xl.border.border-gray-200 > .p-6.border-b .flex > div:first-child p {
    font-size: 0.85rem !important;
  }

  .bg-white.rounded-2xl.border.border-gray-200 > .p-6.border-b .flex > div:last-child {
    width: 100% !important;
    flex-direction: row !important;
    justify-content: space-between !important;
  }

  .bg-white.rounded-2xl.border.border-gray-200 > .p-6.border-b .flex > div:last-child button {
    flex: 1 !important;
    padding: 10px 16px !important;
    font-size: 0.9rem !important;
  }

  .bg-white.rounded-2xl.border.border-gray-200 > .p-6.border-b .flex > div:last-child span {
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
  }

  /* Admin Plans Page Header - Mobile */
  .flex.items-center.justify-between.mb-4 {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .flex.items-center.justify-between.mb-4 > div:first-child {
    width: 100% !important;
  }

  .flex.items-center.justify-between.mb-4 > div:first-child h1 {
    font-size: 1.25rem !important;
    margin-bottom: 4px !important;
  }

  .flex.items-center.justify-between.mb-4 > div:first-child p {
    font-size: 0.85rem !important;
  }

  .flex.items-center.justify-between.mb-4 > button {
    width: 100% !important;
    padding: 10px 16px !important;
    font-size: 0.9rem !important;
  }

  /* Admin Plans Premium Mode Switch - Mobile */
  .bg-white.rounded-2xl.border.border-gray-200.shadow-lg.p-6.mb-6 {
    padding: 16px !important;
  }

  .bg-white.rounded-2xl.border.border-gray-200.shadow-lg.p-6.mb-6 .flex {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
  }

  .bg-white.rounded-2xl.border.border-gray-200.shadow-lg.p-6.mb-6 .flex > div:first-child {
    width: 100% !important;
  }

  .bg-white.rounded-2xl.border.border-gray-200.shadow-lg.p-6.mb-6 .flex > div:first-child .flex {
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
  }

  .bg-white.rounded-2xl.border.border-gray-200.shadow-lg.p-6.mb-6 .flex > div:first-child h3 {
    font-size: 1rem !important;
    margin-bottom: 4px !important;
  }

  .bg-white.rounded-2xl.border.border-gray-200.shadow-lg.p-6.mb-6 .flex > div:first-child p {
    font-size: 0.85rem !important;
  }

  .bg-white.rounded-2xl.border.border-gray-200.shadow-lg.p-6.mb-6 .flex > form {
    width: 100% !important;
  }

  .bg-white.rounded-2xl.border.border-gray-200.shadow-lg.p-6.mb-6 .flex > form button {
    width: 100% !important;
    padding: 10px 16px !important;
    font-size: 0.9rem !important;
    flex-direction: row !important;
  }

  /* Admin Plans Card Actions - Mobile */
  .p-6 .flex.gap-2 {
    flex-direction: row !important;
    gap: 8px !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
  }

  .p-6 .flex.gap-2 button {
    flex: 1 !important;
    padding: 10px 16px !important;
    font-size: 0.85rem !important;
  }

  .p-6 .flex.gap-2 form {
    flex: 1 !important;
  }

  .p-6 .flex.gap-2 form button {
    width: 100% !important;
  }

  /* Admin Reports Page Header - Mobile */
  .p-6.border-b.border-gray-200 {
    padding: 16px !important;
  }

  .p-6.border-b.border-gray-200 .flex.items-center.justify-between {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .p-6.border-b.border-gray-200 .flex.items-center.justify-between > div:first-child {
    width: 100% !important;
  }

  .p-6.border-b.border-gray-200 .flex.items-center.justify-between > div:first-child h1 {
    font-size: 1.25rem !important;
    margin-bottom: 4px !important;
  }

  .p-6.border-b.border-gray-200 .flex.items-center.justify-between > div:first-child p {
    font-size: 0.85rem !important;
  }

  .p-6.border-b.border-gray-200 .flex.items-center.justify-between > div:last-child {
    width: 100% !important;
  }

  .p-6.border-b.border-gray-200 .flex.items-center.justify-between > div:last-child span {
    width: 100% !important;
    text-align: center !important;
  }

  .p-6.border-b.border-gray-200 .flex.items-center.gap-4 {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .p-6.border-b.border-gray-200 .flex.items-center.gap-4 > div {
    width: 100% !important;
  }

  .p-6.border-b.border-gray-200 .flex.items-center.gap-4 button {
    width: 100% !important;
    padding: 10px 16px !important;
    font-size: 0.9rem !important;
  }

  /* Admin Reports Table - Mobile */
  #adminReportsBody .w-full.table-fixed {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #adminReportsBody .w-full.table-fixed table {
    min-width: 600px !important;
  }

  #adminReportsBody .w-full.table-fixed::-webkit-scrollbar {
    height: 4px !important;
  }

  #adminReportsBody .w-full.table-fixed::-webkit-scrollbar-track {
    background: #f1f5f9 !important;
    border-radius: 2px !important;
  }

  #adminReportsBody .w-full.table-fixed::-webkit-scrollbar-thumb {
    background: #94a3b8 !important;
    border-radius: 2px !important;
  }

  #adminReportsBody .w-full.table-fixed::-webkit-scrollbar-thumb:hover {
    background: #64748b !important;
  }

  /* Admin Reports Pagination - Mobile */
  .p-6.border-t.border-gray-200 {
    padding: 16px !important;
  }

  .p-6.border-t.border-gray-200.flex {
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
  }

  .p-6.border-t.border-gray-200 .text-muted {
    text-align: center !important;
    font-size: 0.85rem !important;
  }

  .p-6.border-t.border-gray-200 .pagination {
    width: 100% !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    flex-direction: row !important;
  }

  .p-6.border-t.border-gray-200 .pagination .page-item {
    display: inline-flex !important;
  }

  .p-6.border-t.border-gray-200 .pagination .page-link {
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
  }

  /* Buttons with transition-all - Mobile */
  .transition-all {
    min-width: 36px !important;
    min-height: 36px !important;
  }

  .transition-all button {
    min-width: 36px !important;
    min-height: 36px !important;
  }

  /* Text-primary elements - Mobile */
  .text-primary {
    min-width: 36px !important;
    min-height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Pagination numbers center - Mobile */
  .pagination .page-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .pagination span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .p-6.border-t.border-gray-200 .flex.items-center.gap-2 a,
  .p-6.border-t.border-gray-200 .flex.items-center.gap-2 span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  /* Ensure file-list-select is visible and properly sized */
  #adminFilesBody .file-list-item > .file-list-select {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    justify-content: flex-start;
    order: 1 !important;
    flex: 0 0 auto !important;
    max-width: 50px !important;
  }

  /* File name container - give it more space */
  #adminFilesBody .file-list-item > .file-list-name {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    order: 2 !important;
  }

  /* File size - auto width */
  #adminFilesBody .file-list-item > .file-list-size {
    flex: 0 0 auto !important;
    order: 3 !important;
    max-width: 80px !important;
  }

  /* File name text - allow it to take available space */
  #adminFilesBody .file-list-item > .file-list-name .file-name {
    width: auto !important;
  }

  /* Override SVG flex from admin-template.css */
  #adminFilesBody .file-list-select svg {
    flex: 0 0 auto !important;
  }

  /* Make checkbox square on mobile - override everything */
  #adminFilesBody .file-list-select input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 auto !important;
    min-width: 18px !important;
    max-width: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    aspect-ratio: 1 !important;
  }

  /* Make actions take full width and appear below other elements */
  #adminFilesBody .file-list-item > .file-list-actions {
    width: 100% !important;
    order: 4 !important;
  }

  /* Hide actions on mobile by default */
  #adminFilesBody .file-list-item > .file-list-actions {
    display: none !important;
  }

  /* Mobile action card/popup */
  .admin-mobile-action-card {
    display: none !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: white !important;
    border-radius: 16px 16px 0 0 !important;
    padding: 20px !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15) !important;
    z-index: 1000 !important;
    animation: slideUp 0.3s ease !important;
  }

  .admin-mobile-action-card-actions {
    display: flex !important;
    gap: 8px !important;
    margin-bottom: 60px !important;
  }

  .admin-mobile-action-card.active {
    display: block !important;
  }

  @keyframes slideUp {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }

  .admin-mobile-action-card-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 16px !important;
  }

  .admin-mobile-action-card-title {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
  }

  .admin-mobile-action-card-close {
    background: none !important;
    border: none !important;
    font-size: 24px !important;
    color: #6b7280 !important;
    cursor: pointer !important;
    padding: 0 !important;
  }

  .admin-mobile-action-card-info {
    margin-bottom: 16px !important;
  }

  .admin-mobile-action-card-file-name {
    font-size: 1rem !important;
    font-weight: 500 !important;
    color: #1f2937 !important;
    margin-bottom: 4px !important;
  }

  .admin-mobile-action-card-expire {
    font-size: 0.85rem !important;
    color: #6b7280 !important;
  }

  .admin-mobile-action-card-owner {
    font-size: 0.85rem !important;
    color: #6b7280 !important;
    margin-bottom: 4px !important;
  }

  .admin-mobile-action-card-actions {
    display: flex !important;
    gap: 8px !important;
  }

  .admin-mobile-action-card-actions button {
    flex: 1 !important;
    padding: 12px !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
  }

  /* Overlay */
  .admin-mobile-action-overlay {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 999 !important;
  }

  .admin-mobile-action-overlay.active {
    display: block !important;
  }

  /* Make checkbox square and smaller on mobile */
  #adminFilesBody .file-list-select input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 auto !important;
    min-width: 18px !important;
    max-width: 18px !important;
    aspect-ratio: 1 !important;
  }

  /* Make icon smaller on mobile */
  #adminFilesBody .file-list-select svg {
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 auto !important;
    min-width: 20px !important;
    max-width: 20px !important;
  }

  /* Make actions take full width and appear below other elements */
  #adminFilesBody .file-list-item > .file-list-actions {
    width: 100% !important;
  }

  /* Hide owner and downloads on mobile */
  #adminFilesBody .file-list-item > .file-list-owner,
  #adminFilesBody .file-list-item > .file-list-downloads {
    display: none !important;
  }

  #adminFilesBody .file-list-header {
    display: none !important;
  }

  /* Remove duplicate file-list-select rules - use the one inside mobile-file-info-wrapper */

  #adminFilesBody .file-list-select input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 auto !important;
    min-width: 20px !important;
    max-width: 20px !important;
    aspect-ratio: 1 !important;
  }

  #adminFilesBody .mobile-file-info-wrapper .file-list-select svg {
    width: 24px !important;
    height: 24px !important;
    flex: 0 0 auto !important;
    min-width: 24px !important;
    max-width: 24px !important;
  }

  /* Remove duplicate file-list-name rule - use the one inside mobile-file-info-wrapper */

  #adminFilesBody .file-list-owner,
  #adminFilesBody .file-list-downloads {
    width: 100% !important;
    font-size: 0.9rem !important;
    color: #64748b !important;
  }

  #adminFilesBody .file-list-actions {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  #adminFilesBody .file-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
  }

  #adminFilesBody .file-actions button,
  #adminFilesBody .file-actions a,
  #adminFilesBody .file-actions .file-actions-btn,
  #adminFilesBody .file-list-actions button,
  #adminFilesBody .file-list-actions a,
  #adminFilesBody .file-list-actions .file-actions-btn {
    flex: 0 0 auto !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    padding: 0 !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
  }

  #adminFilesBody .file-actions button:hover,
  #adminFilesBody .file-actions a:hover,
  #adminFilesBody .file-actions .file-actions-btn:hover,
  #adminFilesBody .file-list-actions button:hover,
  #adminFilesBody .file-list-actions a:hover,
  #adminFilesBody .file-list-actions .file-actions-btn:hover {
    opacity: 0.8 !important;
  }

  #adminFilesBody .file-actions .admin-download-btn,
  #adminFilesBody .file-actions .admin-share-btn,
  #adminFilesBody .file-actions .admin-rename-btn,
  #adminFilesBody .file-actions .admin-delete-btn,
  #adminFilesBody .file-actions .file-actions-btn--download,
  #adminFilesBody .file-actions .file-actions-btn--share,
  #adminFilesBody .file-actions .file-actions-btn--rename,
  #adminFilesBody .file-actions .file-actions-btn--danger,
  #adminFilesBody .file-list-actions .admin-download-btn,
  #adminFilesBody .file-list-actions .admin-share-btn,
  #adminFilesBody .file-list-actions .admin-rename-btn,
  #adminFilesBody .file-list-actions .admin-delete-btn,
  #adminFilesBody .file-list-actions .file-actions-btn--download,
  #adminFilesBody .file-list-actions .file-actions-btn--share,
  #adminFilesBody .file-list-actions .file-actions-btn--rename,
  #adminFilesBody .file-list-actions .file-actions-btn--danger {
    width: 32px !important;
    height: 32px !important;
    border: none !important;
  }

  #adminFilesBody .file-actions button svg,
  #adminFilesBody .file-actions a svg,
  #adminFilesBody .file-actions .file-actions-btn svg,
  #adminFilesBody .file-list-actions button svg,
  #adminFilesBody .file-list-actions a svg,
  #adminFilesBody .file-list-actions .file-actions-btn svg {
    width: 20px !important;
    height: 20px !important;
  }

  /* Button Colors for Mobile */
  #adminFilesBody .file-actions .file-actions-btn--download,
  #adminFilesBody .file-list-actions .file-actions-btn--download {
    background: rgb(59 130 246) !important;
  }

  #adminFilesBody .file-actions .file-actions-btn--share,
  #adminFilesBody .file-list-actions .file-actions-btn--share {
    background: rgb(34 197 94 / 82%) !important;
  }

  #adminFilesBody .file-actions .file-actions-btn--rename,
  #adminFilesBody .file-list-actions .file-actions-btn--rename {
    background: rgb(245 158 11) !important;
  }

  #adminFilesBody .file-actions .file-actions-btn--danger,
  #adminFilesBody .file-list-actions .file-actions-btn--danger {
    background: rgb(220 53 69) !important;
  }


  .batch-delete-btn {
    width: 100%;
    min-height: 48px;
    padding: 14px 16px;
    font-size: 0.95rem;
    border-radius: 12px;
    margin-top: 8px;
  }

  /* File List Mobile */
  .file-list {
    border-radius: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Admin table responsive */
  #adminFilesBody {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #adminFilesBody table {
    min-width: 800px;
  }

  #adminUsersBody {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #adminUsersBody table {
    min-width: 700px;
  }

  #adminReportsBody {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #adminReportsBody table {
    min-width: 900px;
  }

  .file-list-header {
    display: flex;
    white-space: nowrap;
  }

  .file-list-item {
    flex-direction: row;
    align-items: center;
    padding: 14px 16px;
    white-space: nowrap;
  }

  .file-list-item > div {
    padding: 0;
  }

  .file-list-item > div::before {
    display: none;
  }

  .file-list-select {
    flex: 0 0 40px !important;
  }

  .file-list-name {
    flex: 1 1 200px !important;
    min-width: 150px;
  }

  .file-list-owner {
    flex: 0 0 120px !important;
    min-width: 100px;
  }

  .file-list-size {
    flex: 0 0 80px !important;
    min-width: 70px;
  }

  .file-list-downloads {
    flex: 0 0 70px !important;
    min-width: 60px;
  }

  .file-list-actions {
    flex: 0 0 auto !important;
  }

  /* User List Mobile */
  .user-list {
    border-radius: 12px;
    overflow-x: auto;
  }

  .user-list-header {
    display: flex;
    white-space: nowrap;
  }

  .user-list-item {
    flex-direction: row;
    align-items: center;
    padding: 14px 16px;
    white-space: nowrap;
  }

  .user-list-item > div {
    padding: 0;
  }

  .user-list-item > div::before {
    display: none;
  }

  .user-list-id {
    flex: 0 0 50px !important;
    min-width: 40px;
  }

  .user-list-name {
    flex: 0 0 120px !important;
    min-width: 100px;
  }

  .user-list-email {
    flex: 1 1 150px !important;
    min-width: 120px;
  }

  .user-list-role {
    flex: 0 0 80px !important;
    min-width: 70px;
  }

  .user-list-actions {
    flex: 0 0 auto !important;
  }

  /* Reports List Mobile */
  .reports-list {
    border-radius: 12px;
    overflow-x: auto;
  }

  .reports-list-header {
    display: flex;
    white-space: nowrap;
  }

  .reports-list-item {
    flex-direction: row;
    align-items: center;
    padding: 14px 16px;
    white-space: nowrap;
  }

  .reports-list-item > div {
    padding: 0;
  }

  .reports-list-item > div::before {
    display: none;
  }

  .reports-list-time {
    flex: 0 0 120px !important;
    min-width: 100px;
  }

  .reports-list-action {
    flex: 0 0 120px !important;
    min-width: 100px;
  }

  .reports-list-actor {
    flex: 0 0 150px !important;
    min-width: 120px;
  }

  .reports-list-ip {
    flex: 0 0 100px !important;
    min-width: 80px;
  }

  .reports-list-details {
    flex: 1 1 150px !important;
    min-width: 120px;
  }

  /* Admin File Actions Mobile */
  .admin-file-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 12px;
  }

  .admin-file-actions a,
  .admin-file-actions button {
    padding: 12px 16px;
    font-size: 0.9rem;
    border-radius: 10px;
    min-height: 44px;
  }
}

/* Admin File List - Mobile Only Styles */

/* Hide mobile controls bar by default */
.admin-mobile-controls {
  display: none;
}

/* Hide mobile bottom action bar by default */
.mobile-bottom-action-bar {
  display: none;
}

/* Mobile Stats Section */
.mobile-stats-section {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Mobile Filters Section */
.mobile-filters-section {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

@media (max-width: 767px) {
  /* Show mobile stats section on mobile */
  .mobile-stats-section {
    display: block !important;
    height: auto !important;
    margin: 0 0 16px 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  /* Show mobile filters section on mobile */
  .mobile-filters-section {
    display: block !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }
}

/* Mobile Toggle Buttons */
.mobile-toggle-btn {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

@media (max-width: 767px) {
  /* Show mobile toggle buttons on mobile */
  .mobile-toggle-btn {
    display: flex !important;
    height: auto !important;
    margin: 0 0 16px 0 !important;
    padding: 12px 16px !important;
    overflow: visible !important;
  }
}

/* Desktop Stats Cards Layout */
@media (min-width: 768px) {
  .card-body .d-flex.align-items-center {
    display: flex !important;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: space-around;
  }
}

@media (max-width: 767px) {
  /* Show mobile stats section on mobile */
  .mobile-stats-section {
    display: block;
  }

  /* Mobile Stats Card */
  .mobile-stats-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 20px;
  }

  /* Mobile Stats Row */
  .mobile-stats-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .mobile-stats-row:last-child {
    border-bottom: none;
  }

  /* Mobile Stats Label */
  .mobile-stats-label {
    font-size: 14px;
    color: #6b7280;
  }

  /* Mobile Stats Value */
  .mobile-stats-value {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
  }

  /* Hide desktop header on mobile */
  .file-list-header {
    display: none !important;
  }

  /* Hide owner, downloads, and actions on mobile */
  .file-list-item .file-list-owner {
    display: none !important;
  }

  .file-list-item .file-list-downloads {
    display: none !important;
  }

  .file-list-item .file-list-actions {
    display: none !important;
  }

  /* Mobile File List Item - Simple Row Layout */
  .file-list-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid #e5e7eb !important;
    gap: 10px !important;
  }

  /* Mobile File List Select */
  .file-list-item .file-list-select {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
  }

  .file-list-item .file-list-select input[type="checkbox"].file-checkbox {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
  }

  .file-list-item .file-list-select svg {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
  }

  /* Mobile File List Name */
  .file-list-item .file-list-name {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .file-list-item .file-name {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 14px !important;
    color: #1f2937 !important;
    font-weight: 500 !important;
  }

  /* Hide expiry text on mobile */
  .file-list-item .file-list-name small {
    display: none !important;
  }

  /* Mobile File List Size */
  .file-list-item .file-list-size {
    flex-shrink: 0 !important;
    font-size: 12px !important;
    color: #6b7280 !important;
    margin-left: 12px !important;
    white-space: nowrap !important;
  }

  /* Fixed Bottom Action Bar for Bulk Selection */
  .mobile-bottom-action-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #ffffff;
    border-top: 1px solid #e9ecef;
    padding: 12px 16px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    justify-content: space-between;
    align-items: center;
  }

  .mobile-bottom-action-bar.active {
    display: flex;
  }

  .mobile-bottom-action-bar .selected-count {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
  }

  .mobile-bottom-action-bar .delete-selected-btn {
    padding: 10px 20px;
    background: #dc3545;
    border: none;
    color: #ffffff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
  }

  .mobile-bottom-action-bar .delete-selected-btn:hover {
    background: #c82333;
  }

  .action-with-icon {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    justify-content: center;
    text-align: center;
    width: 100%;
  }

  .action-with-icon .action-icon {
    width: 20px;
    height: 20px;
  }

  .action-with-icon .action-icon svg {
    width: 20px;
    height: 20px;
  }

  .action-with-icon span:last-child {
    font-size: 0.85rem;
  }

  /* Sort Header Buttons Mobile */
  .sort-header-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
  }

  .sort-indicator {
    font-size: 0.9rem;
  }

  /* Expiry Info Mobile */
  .expiry-info,
  .expiry-warning,
  .expiry-expired {
    font-size: 0.8rem;
    margin-top: 4px;
    display: inline-block;
  }

  /* Settings Form Mobile */
  .panel-card form {
    gap: 16px;
  }

  .panel-card label {
    font-size: 0.9rem;
    margin-bottom: 6px;
  }

  .panel-card input[type="text"],
  .panel-card input[type="number"],
  .panel-card input[type="url"],
  .panel-card input[type="password"],
  .panel-card textarea,
  .panel-card select {
    padding: 14px 16px;
    font-size: 0.95rem;
    border-radius: 12px;
    min-height: 48px;
  }

  .panel-card textarea {
    min-height: 100px;
    resize: vertical;
  }

  .panel-card button[type="submit"] {
    width: 100%;
    padding: 16px 24px;
    font-size: 1rem;
    min-height: 52px;
    margin-top: 8px;
  }

  /* Theme Color Options Mobile */
  #themeColorOptions {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .theme-color-option {
    padding: 14px;
    border-radius: 12px;
  }

  .theme-color-option div:first-child {
    font-size: 20px;
    margin-bottom: 6px;
  }

  .theme-color-option div:last-child {
    font-size: 0.85rem;
  }

  /* S3 Settings Mobile */
  #s3-settings {
    gap: 14px;
    padding: 16px;
    border-radius: 12px;
  }

  #s3-settings p {
    font-size: 0.85rem;
    line-height: 1.6;
  }

  /* Reports Table Mobile */
  .file-table td[colspan] {
    padding: 24px 16px;
    text-align: center;
    font-size: 0.9rem;
  }

  /* Clear Reports Button Mobile */
  #clearAllReportsBtn {
    width: 100%;
    padding: 14px 16px;
    font-size: 0.95rem;
    min-height: 48px;
    border-radius: 12px;
  }

  /* User Table Mobile */
  .file-table td[style*="width"] {
    width: auto !important;
  }

  .file-checkbox,
  #selectAllFiles {
    width: 20px;
    height: 20px;
  }

  /* Admin File Actions Mobile */
  .admin-file-actions {
    grid-template-columns: 1fr;
    max-width: 100%;
    gap: 8px;
  }

  .admin-file-actions > a,
  .admin-file-actions > button,
  .admin-file-actions > form > button {
    min-height: 44px;
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  .admin-file-actions .action-icon {
    width: 18px;
    height: 18px;
  }

  .admin-file-actions .action-icon svg {
    width: 18px;
    height: 18px;
  }

  .admin-file-actions .inline-rename-form.is-open {
    grid-template-columns: 1fr;
  }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hero-block {
    padding: 20px 16px;
  }

  .hero-title {
    font-size: clamp(1.4rem, 4vw, 1.8rem);
  }

  .feature-cards {
    grid-template-columns: repeat(2, 1fr);
    display: grid;
  }

  .upload-studio {
    padding: 16px;
  }

  .upload-actions {
    flex-direction: row;
  }

  .upload-actions button {
    width: auto;
    flex: 1;
  }
}

/* Prevent text overflow */
* {
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Ensure images don't overflow */
img {
  max-width: 100%;
  height: auto;
}

/* Improve touch targets on mobile */
@media (max-width: 768px) {
  button,
  a,
  input,
  select {
    min-height: 44px;
  }

  .file-actions a,
  .file-actions button,
  .nav-links a,
  .nav-link-button {
    min-height: 40px;
  }
}
/* ===================================================
   MOBILE FIX FOR ALL 5 THEMES & USER PANEL BUTTONS
   =================================================== */

@media (max-width: 768px) {
    /* Enforce modern alignment and layout for user buttons on small screens */
    .dashboard-file-actions, 
    .file-actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        width: 100% !important;
        padding: 4px 0 !important;
    }

    /* Hide guest file actions on mobile - use popup instead */
    .file-card .file-actions,
    .file-card .guest-file-actions {
        display: none !important;
    }

    /* Standardize button size and eliminate stretched layouts */
    .dashboard-file-actions a, 
    .dashboard-file-actions button,
    .file-actions a,
    .file-actions button {
        flex: 1 !important;
        min-width: calc(50% - 8px) !important;
        width: auto !important;
        min-height: 58px !important;
        height: 58px !important;
        padding: 6px 12px !important;
        font-size: 0.84rem !important;
        border-radius: 8px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Force delete buttons to maintain custom red theme on mobile */
    .dashboard-file-actions .danger-link-button,
    .file-actions button.delete-file-btn {
        background: rgba(239, 68, 68, 0.16) !important;
        color: #fca5a5 !important;
        border: 1px solid rgba(239, 68, 68, 0.3) !important;
    }

    /* User Dashboard File List Mobile */
    #userFilesBody {
        overflow-x: visible !important;
    }

    #userFilesBody > div {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }

    /* User file list item mobile - combine checkbox, icon, name, and size */
    .file-list-item {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        padding: 12px 16px !important;
        gap: 12px !important;
        cursor: pointer !important;
        grid-template-columns: none !important;
        background: rgba(51, 65, 85, 0.5) !important;
        border-radius: 12px !important;
        border: none !important;
    }

    /* Checkbox - hide original on mobile */
    .file-list-item > div:first-child {
        display: none !important;
    }

    /* Mobile file select - show inside name container */
    .mobile-file-select {
        display: flex !important;
        align-items: center !important;
        flex: 0 0 auto !important;
    }

    /* File type icon */
    .file-list-item .file-type-icon {
        flex: 0 0 auto !important;
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border-radius: 8px !important;
    }

    /* File name */
    .file-list-item > .file-list-name > .truncate {
        color: white !important;
        font-weight: 500 !important;
        font-size: 0.95rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        flex: 1 !important;
        min-width: 0 !important;
        text-align: left !important;
    }

    /* File meta (size) */
    .file-list-item > .file-list-name > .file-meta {
        color: rgba(148, 163, 184, 0.8) !important;
        font-size: 0.85rem !important;
    }

    /* File size - hide separate size div on mobile (user dashboard only) */
    #userFilesBody .file-list-item > div:nth-child(3) {
        display: none !important;
    }

    /* Downloads - hide on mobile (user dashboard only) */
    #userFilesBody .file-list-item > div:nth-child(4) {
        display: none !important;
    }

    /* Actions - hide on mobile */
    .file-list-item > div:nth-child(5) {
        display: none !important;
    }

    /* Hide file actions on mobile */
    .file-actions-container {
        display: none !important;
    }

    /* User file list header mobile */
    #userFilesBody > div > div:first-child {
        display: none !important;
    }

    /* User filters mobile */
    .grid.grid-cols-1.sm\\:grid-cols-2.lg\\:grid-cols-4 {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    /* User delete button mobile */
    #userDeleteSelectedBtn {
        width: 100% !important;
        min-height: 48px !important;
        margin-top: 8px !important;
    }

    /* User file action popup - hide on desktop */
    .user-file-action-popup {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }

    .user-file-action-popup-overlay {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }

    /* Show only on mobile - user file action popup */
    .user-file-action-popup {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(30, 41, 59, 0.98);
        backdrop-filter: blur(20px);
        border-radius: 20px 20px 0 0;
        padding: 20px 16px;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        max-width: 100%;
    }

    .user-file-action-popup.active {
        transform: translateY(0);
    }

    .user-file-action-popup-overlay {
        display: none !important;
        visibility: hidden !important;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s;
    }

    .user-file-action-popup-overlay.active {
        display: block !important;
        visibility: visible !important;
        opacity: 1;
    }

    .user-file-action-popup-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 16px;
        padding-bottom: 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .user-file-action-popup-title {
        color: white;
        font-weight: 600;
        font-size: 16px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .user-file-action-popup-title .file-type-icon {
        width: 24px;
        height: 24px;
    }

    .user-file-action-popup-close {
        border: none;
        color: white;
        width: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.2s;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
    }

    .user-file-action-popup-close svg {
        width: 18px;
        height: 18px;
    }

    .user-file-action-popup-buttons {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding-bottom: 40px;
    }

    .user-file-action-popup-buttons button,
    .user-file-action-popup-buttons a {
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        padding: 10px 6px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
        color: white;
    }

    .user-file-action-popup-buttons button:hover,
    .user-file-action-popup-buttons a:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: translateY(-2px);
    }

    .user-file-action-popup-buttons button svg,
    .user-file-action-popup-buttons a svg {
        width: 18px;
        height: 18px;
    }

    .user-file-action-popup-buttons button span,
    .user-file-action-popup-buttons a span {
        display: block;
        font-size: 10px;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.8);
    }
}

/* Extra small screens */
@media (max-width: 480px) {
  /* Header */
  .site-header {
    padding: 12px;
  }

  .site-logo {
    font-size: 1.2rem;
    gap: 8px;
  }

  .site-logo span {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .nav-links {
    gap: 8px;
  }

  .nav-links a,
  .nav-link-button {
    font-size: 1.4rem;
    padding: 6px 10px;
  }

  /* Hero */
  .hero-block {
    padding: 24px 12px 20px;
  }

  .hero-title {
    font-size: clamp(1.5rem, 10vw, 2rem);
  }

  .hero-copy {
    font-size: 0.9rem;
  }

  /* Features */
  .feature-card {
    padding: 16px;
  }

  .feature-card h3 {
    font-size: 0.95rem;
  }

  .feature-card p {
    font-size: 0.85rem;
  }

  /* Upload */
  .upload-studio {
    padding: 16px 12px;
  }

  .upload-studio h2 {
    font-size: 1.2rem;
  }

  .upload-card {
    padding: 16px 12px;
  }

  .upload-zone {
    padding: 20px 12px;
  }

  .upload-zone strong {
    font-size: 0.9rem;
  }

  .upload-zone small {
    font-size: 0.75rem;
  }

  /* File Actions */
  .file-actions {
    flex-direction: column;
  }

  .file-actions a,
  .file-actions button {
    width: 100%;
    min-width: auto;
  }

  /* Modals */
  .share-modal {
    padding: 20px;
    max-width: 95%;
  }

  .share-modal-header h3 {
    font-size: 1.1rem;
  }

  .share-option {
    padding: 12px;
    font-size: 0.9rem;
  }

  .confirm-dialog {
    padding: 18px;
    max-width: 90%;
  }

  .confirm-dialog h3 {
    font-size: 1rem;
  }

  .confirm-dialog p {
    font-size: 0.9rem;
  }

  /* Toast */
  .toast {
    padding: 12px 16px;
    font-size: 0.85rem;
    max-width: 95%;
  }
}
