/* ==========================================================================
   SMARTEX 2.0 - Dedicated Mobile UI Stylesheet
   Activated for viewports < 768px.
   ========================================================================== */

@media (max-width: 767px) {
  /* Hide Desktop Sidebar */
  .sidebar-nav {
    display: none !important;
  }

  .content-viewport {
    padding: 1rem !important;
    padding-bottom: 76px !important;
  }

  .app-header {
    padding: 0 1rem !important;
    height: 56px !important;
  }

  .brand-text {
    font-size: 1.15rem !important;
  }

  .brand-badge {
    display: none !important;
  }

  /* Minimized Auth Card on Mobile */
  .auth-container {
    padding: 0.85rem !important;
    height: calc(100vh - 56px) !important;
  }

  .auth-card {
    padding: 1.35rem 1.15rem !important;
    max-width: 100% !important;
    border-radius: 16px !important;
  }

  /* Dedicated Mobile Bottom Navigation Bar */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(10, 14, 23, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 90;
    align-items: center;
    justify-content: space-around;
    padding: 0 4px;
  }

  /* Hide mobile bottom navbar when auth view is active */
  body.auth-active .mobile-bottom-nav {
    display: none !important;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 500;
    width: 18%;
    height: 100%;
  }

  .mobile-nav-item i {
    font-size: 1.15rem;
  }

  .mobile-nav-item.active {
    color: var(--accent-primary);
    font-weight: 700;
  }

  /* Compact Cards Mobile Layout */
  .compact-card {
    height: auto !important;
    min-height: 54px !important;
    padding: 0.75rem !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .compact-card-info {
    width: 100%;
    justify-content: space-between;
  }

  .compact-card-actions {
    width: 100%;
    justify-content: flex-end;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 6px;
  }

  /* Profile Card Mobile */
  .profile-card {
    padding: 1.25rem !important;
  }

  .apikey-btn-group {
    flex-direction: column !important;
  }

  .apikey-btn-group button {
    width: 100% !important;
  }

  .album-grid {
    grid-template-columns: 1fr !important;
  }

  .image-gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Mobile Monaco IDE UI */
  .ide-wrapper {
    flex-direction: column !important;
  }

  .ide-action-bar {
    height: auto !important;
    padding: 6px 8px !important;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start !important;
  }

  .ide-toolbar-buttons {
    width: 100%;
    overflow-x: auto;
  }

  .ide-tree-panel {
    width: 100% !important;
    height: 130px !important;
  }

  .ide-split-container {
    flex-direction: column !important;
  }

  .preview-container {
    height: 50% !important;
  }

  .mobile-editor-keys {
    display: flex !important;
    height: 38px;
    background: #0e121b;
    border-top: 1px solid var(--border-glass);
    align-items: center;
    padding: 0 6px;
    gap: 6px;
    overflow-x: auto;
  }

  .editor-key {
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    border-radius: 4px;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.8rem;
  }
}

@media (min-width: 768px) {
  .mobile-bottom-nav {
    display: none !important;
  }
  .mobile-editor-keys {
    display: none !important;
  }
}
