/* ============================================================
   DHRUV AWS PROJECT — mycloud.css  v2.0
   Dark-themed Secure private cloud storage UI
   ============================================================ */

.mycloud-page {
  background: transparent;
  border-radius: 20px;
  padding: 32px 36px;
  min-height: 70vh;
  animation: mcFadeIn 0.35s ease;
  font-family: 'Inter', 'Syne', -apple-system, BlinkMacSystemFont, sans-serif;
  position: relative;
}

@keyframes mcFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Header actions row ── */
.mc-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ── Header controls row (Search + Buttons) ── */
.mc-header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.mc-header-controls .mc-search-wrap {
  max-width: 280px;
  margin-bottom: 0;
}

/* ── Upload link icon beside heading ── */
.mc-upload-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0,229,255,0.1);
  border: 1px solid var(--cyan-mid);
  color: var(--cyan);
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-left: 6px;
  vertical-align: middle;
}

.mc-upload-link:hover {
  background: rgba(0,229,255,0.2);
  border-color: var(--cyan);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,229,255,0.25);
}

.mc-upload-link i {
  pointer-events: none;
}

/* ── Locked Overlay ── */
.mc-locked-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  animation: mcOverlayIn 0.3s ease;
}

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

.mc-locked-box {
  position: relative;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  animation: mcBoxIn 0.35s ease;
}

@keyframes mcBoxIn {
  from { transform: scale(0.92) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.mc-locked-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  background: linear-gradient(135deg, rgba(0,229,255,0.12), rgba(255,153,0,0.08));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--cyan);
}

.mc-locked-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-white);
  margin: 0 0 6px;
}

.mc-locked-sub {
  font-size: 13px;
  color: var(--text-gray);
  margin: 0 0 24px;
  line-height: 1.5;
}

.mc-password-wrap {
  margin-bottom: 16px;
}

.mc-password-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text-white);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  letter-spacing: 2px;
  box-sizing: border-box;
}

.mc-password-input::placeholder {
  color: var(--text-dim);
}

.mc-password-input:focus {
  border-color: var(--cyan-mid);
  box-shadow: 0 0 0 3px rgba(0,229,255,0.1);
}

/* ── Locked actions row (Unlock + Reset side by side) ── */
.mc-locked-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.mc-unlock-btn {
  flex: 1;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--cyan), #00B4D8);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mc-unlock-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,229,255,0.3);
}

.mc-reset-btn {
  flex: 0 0 auto;
  padding: 12px 18px;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text-gray);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mc-reset-btn:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(239,68,68,0.1);
}

.mc-error-msg {
  font-size: 12px;
  color: var(--red);
  margin-top: 12px;
  min-height: 18px;
}

/* ── Setup Modal ── */
.mc-setup-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  animation: mcOverlayIn 0.3s ease;
}

.mc-setup-box {
  position: relative;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  animation: mcBoxIn 0.35s ease;
}

/* Close button (top-right corner) */
.mc-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 5;
  line-height: 1;
}
.mc-popup-close:hover {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.3);
  color: var(--red);
}

.mc-setup-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  background: linear-gradient(135deg, rgba(0,229,255,0.12), rgba(255,153,0,0.08));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--cyan);
}

.mc-setup-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-white);
  margin: 0 0 6px;
}

.mc-setup-sub {
  font-size: 13px;
  color: var(--text-gray);
  margin: 0 0 24px;
  line-height: 1.5;
}

/* Setup fields container */
.mc-setup-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  text-align: left;
}

.mc-field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: -2px;
}

.mc-setup-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.mc-setup-password-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.mc-setup-input {
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text-white);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  letter-spacing: 2px;
  width: 100%;
  box-sizing: border-box;
}

.mc-setup-input-text {
  letter-spacing: 0.5px;
}

.mc-setup-input::placeholder {
  color: var(--text-dim);
}

.mc-setup-input:focus {
  border-color: var(--cyan-mid);
  box-shadow: 0 0 0 3px rgba(0,229,255,0.1);
}

/* ── Setup actions row ── */
.mc-setup-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.mc-setup-btn {
  flex: 1;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--cyan), #00B4D8);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mc-setup-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,229,255,0.3);
}

.mc-setup-skip {
  flex: 0 0 auto;
  padding: 12px 18px;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text-gray);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mc-setup-skip:hover {
  border-color: var(--text-gray);
  color: var(--text-white);
  background: rgba(255,255,255,0.06);
}

/* ── Password visibility toggle (eye icon) ── */
.mc-pwd-toggle-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.mc-pwd-toggle-wrap .mc-pwd-toggle-input {
  padding-right: 42px !important;
}

.mc-pwd-toggle-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 15px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
  z-index: 2;
  padding: 0;
  line-height: 1;
}

.mc-pwd-toggle-btn:hover {
  color: var(--cyan);
  background: rgba(0,229,255,0.1);
}

.mc-pwd-toggle-btn:active {
  color: var(--text-white);
}

.mc-pwd-toggle-wrap-locked .mc-pwd-toggle-btn {
  right: 12px;
}

/* ── Recovery fields ── */
.mc-recovery-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  text-align: left;
}

/* Recovery icon variants */
.mc-locked-icon-recovery {
  background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(239,68,68,0.08)) !important;
  color: var(--text-white) !important;
}

.mc-locked-icon-newpass {
  background: linear-gradient(135deg, rgba(34,197,94,0.12), rgba(0,229,255,0.08)) !important;
  color: var(--text-white) !important;
}

/* ── Upload to Data Button ── */
.mc-upload-data-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--cyan), #00B4D8);
  border: none;
  border-radius: 10px;
  color: #000;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mc-upload-data-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,229,255,0.3);
}

/* ── File Cards (matching Favorites card style) ── */
.mc-file-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.25s ease;
  cursor: default;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  animation: mcFileIn 0.3s ease;
}

@keyframes mcFileIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mc-file-card:hover {
  transform: translateY(-3px);
  border-color: var(--cyan-mid);
  box-shadow: 0 10px 24px rgba(0,229,255,0.08), 0 4px 8px rgba(0,0,0,0.04);
}

.mc-file-card.selected {
  border-color: var(--cyan);
  background: rgba(0,229,255,0.08);
  box-shadow: 0 0 0 2px rgba(0,229,255,0.15), 0 0 20px rgba(0,229,255,0.08);
  animation: mcSelectedPulse 2.5s ease-in-out infinite;
  position: relative;
}

.mc-file-card.selected:hover {
  border-color: var(--cyan);
  background: rgba(0,229,255,0.12);
  box-shadow: 0 0 0 2px rgba(0,229,255,0.2), 0 0 28px rgba(0,229,255,0.12);
}

@keyframes mcSelectedPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(0,229,255,0.15), 0 0 20px rgba(0,229,255,0.06); }
  50% { box-shadow: 0 0 0 2px rgba(0,229,255,0.2), 0 0 28px rgba(0,229,255,0.1); }
}

.mc-file-thumb {
  width: 100%;
  height: 160px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mc-file-info {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mc-file-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.mc-file-date {
  font-size: 12px;
  color: var(--text-gray);
}

/* ── Card dot-menu (removed — replaced by shared ContextMenu) ── */
/* ── Unlocked Content ── */
.mc-content {
  animation: mcContentIn 0.3s ease;
}

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

.mc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.mc-heading {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-white);
  margin: 0 0 4px;
  letter-spacing: -0.3px;
}

.mc-sub {
  font-size: 14px;
  color: var(--text-gray);
  margin: 0;
}

.mc-lock-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text-gray);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mc-lock-btn:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(239,68,68,0.1);
}

/* ── Trash Button ── */
.mc-trash-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text-gray);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 8px;
}

.mc-trash-btn:hover {
  border-color: var(--aws-orange);
  color: var(--aws-orange);
  background: rgba(255,153,0,0.1);
}

/* ── Search ── */
.mc-search-wrap {
  position: relative;
  max-width: 400px;
  margin-bottom: 28px;
}

.mc-search-wrap i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-gray);
  font-size: 15px;
}

.mc-search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-white);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mc-search-input::placeholder {
  color: var(--text-dim);
}

.mc-search-input:focus {
  border-color: var(--cyan-mid);
  box-shadow: 0 0 0 3px rgba(0,229,255,0.1);
}

/* ── Files Grid ── */
.mc-files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.mc-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-gray);
}

.mc-empty i {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
  color: var(--text-dim);
}

.mc-empty p {
  font-size: 14px;
  margin: 0;
}

/* ── 3-Dot Menu (removed — replaced by shared ContextMenu) ── */

/* ── File Viewer Modal (matching Favorites viewer) ── */
.mc-viewer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(16px);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: mcOverlayIn 0.2s ease;
}
.mc-viewer-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 750px;
  width: 92%;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 30px rgba(0,229,255,0.08);
  display: flex;
  flex-direction: column;
  animation: mcModalIn 0.25s ease;
}

@keyframes mcModalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.mc-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.mc-viewer-filename {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  margin-right: 12px;
}
.mc-viewer-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-gray);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.mc-viewer-close:hover {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.3);
  color: #EF4444;
}
.mc-viewer-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  position: relative;
}
.mc-viewer-preview {
  text-align: center;
  width: 100%;
}
.mc-viewer-preview img {
  max-width: 100%;
  max-height: 55vh;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.mc-viewer-preview video {
  max-width: 100%;
  max-height: 55vh;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.mc-viewer-preview iframe {
  width: 100%;
  height: 55vh;
  border: none;
  border-radius: 8px;
}

.mc-viewer-preview audio {
  width: 100%;
  max-width: 400px;
}

.mc-viewer-meta {
  display: flex;
  gap: 16px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-gray);
}

/* Navigation controls */
.mc-viewer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}

.mc-viewer-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-gray);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mc-viewer-nav-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--cyan-mid);
  color: var(--cyan);
}

.mc-viewer-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.mc-viewer-counter {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}

/* ── Trash Section ── */
.mc-trash-section {
  animation: mcFadeIn 0.3s ease;
}
.mc-trash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.mc-trash-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-white);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mc-trash-title i {
  color: var(--red);
}
.mc-trash-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text-gray);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}
.mc-trash-back-btn:hover {
  border-color: var(--cyan-mid);
  color: var(--cyan);
  background: rgba(0,229,255,0.1);
}
.mc-trash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.mc-trash-card {
  border-color: rgba(239,68,68,0.3) !important;
  background: rgba(239,68,68,0.1) !important;
}
.mc-trash-card:hover {
  border-color: rgba(239,68,68,0.5) !important;
  box-shadow: 0 4px 16px rgba(239,68,68,0.12) !important;
}
.mc-trash-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.mc-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
  font-family: inherit;
  color: var(--text-gray);
  cursor: pointer;
  transition: all 0.15s ease;
}
.mc-action-btn.restore:hover {
  border-color: var(--green);
  color: var(--green);
  background: rgba(34,197,94,0.1);
}
.mc-action-btn.delete-perm {
  width: 32px;
  padding: 6px;
  justify-content: center;
}
.mc-action-btn.delete-perm:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(239,68,68,0.1);
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .mc-files-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
  .mc-header-controls .mc-search-wrap { max-width: 220px; }
}

@media (max-width: 1024px) {
  .mycloud-page { padding: 28px 24px; }
  .mc-heading { font-size: 24px; }
  .mc-files-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .mc-file-thumb { height: 140px; }
  .mc-viewer-modal { max-width: 94%; }
  .mc-trash-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

@media (max-width: 768px) {
  .mycloud-page { padding: 20px 16px; border-radius: 14px; }
  .mc-locked-box { padding: 28px 20px; max-width: 90%; }
  .mc-heading { font-size: 22px; }
  .mc-sub { font-size: 13px; }
  .mc-password-wrap { flex-direction: column; }
  .mc-files-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .mc-file-thumb { height: 120px; }
  .mc-file-info { padding: 10px 12px; }
  .mc-file-name { font-size: 12px; }
  .mc-file-date { font-size: 10px; }
  .mc-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .mc-header-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .mc-header-controls { width: 100%; flex-wrap: wrap; }
  .mc-header-controls .mc-search-wrap { max-width: 100%; width: 100%; margin-bottom: 8px; }
  .mc-search-wrap { max-width: 100%; margin-bottom: 16px; }
  .mc-setup-box { padding: 28px 20px; max-width: 92%; }
  .mc-locked-box { max-width: 92%; }
  .mc-locked-actions { flex-direction: column; gap: 8px; }
  .mc-unlock-btn, .mc-reset-btn { width: 100%; }
  .mc-setup-actions { flex-direction: column; gap: 8px; }
  .mc-setup-btn, .mc-setup-skip { width: 100%; }
  .mc-locked-title { font-size: 18px; }
  .mc-locked-sub { font-size: 12px; }
  .mc-viewer-modal { width: 96%; max-height: 90vh; }
  .mc-viewer-body { padding: 16px; }
  .mc-viewer-preview img { max-height: 45vh; }
  .mc-viewer-preview video { max-height: 45vh; }
  .mc-viewer-preview iframe { height: 45vh; }
  .mc-viewer-header { padding: 12px 14px; }
  .mc-viewer-filename { font-size: 13px; }
  .mc-viewer-nav { flex-wrap: wrap; }
  .mc-trash-grid { grid-template-columns: 1fr; }
  .mc-trash-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .mc-lock-btn { width: 100%; justify-content: center; }
  .mc-trash-btn { width: 100%; justify-content: center; margin-left: 0; }
  
  /* Multi-select bulk bar */
  #mcBulkBar { flex-wrap: wrap; }
  #mcBulkBar .dm-btn { font-size: 11px; padding: 6px 10px; }
}

@media (max-width: 600px) {
  .mycloud-page { padding: 14px 10px; }
  .mc-heading { font-size: 20px; }
  .mc-locked-box { padding: 22px 16px; }
  .mc-setup-box { padding: 22px 16px; }
  .mc-files-grid { grid-template-columns: 1fr; gap: 10px; }
  .mc-file-thumb { height: 180px; }
  .mc-file-card { border-radius: 12px; }
  .mc-viewer-modal { width: 100%; border-radius: 0; border: none; max-height: 100vh; }
  .mc-viewer-nav { padding: 8px 12px; }
  .mc-viewer-nav-btn { padding: 6px 10px; font-size: 11px; }
  .mc-setup-title { font-size: 18px; }
  .mc-setup-sub { font-size: 12px; }
  .mc-locked-icon { width: 52px; height: 52px; font-size: 22px; }
  .mc-setup-icon { width: 52px; height: 52px; font-size: 22px; }
  .mc-password-input { font-size: 14px; padding: 10px 14px; }
  .mc-setup-input { font-size: 14px; padding: 10px 14px; }
}

@media (max-width: 400px) {
  .mycloud-page { padding: 10px 6px; }
  .mc-heading { font-size: 18px; }
  .mc-locked-box { padding: 18px 12px; }
  .mc-setup-box { padding: 18px 12px; }
  .mc-file-thumb { height: 150px; }
  .mc-file-info { padding: 8px 10px; }
  .mc-file-name { font-size: 11px; }
  .mc-locked-title { font-size: 16px; }
  .mc-setup-title { font-size: 16px; }
  .mc-locked-sub { font-size: 11px; }
  .mc-setup-sub { font-size: 11px; }
}
