/* ===================================================
   FileCloud TMA — Stylesheet
   Telegram Mini App optimized
   =================================================== */

/* ─── Variables ─────────────────────────────────── */
:root {
  --primary:       #2AABEE;
  --primary-dark:  #1a8cc5;
  --secondary:     #54a9eb;
  --accent:        #64FFDA;
  --bg:            #0e1117;
  --bg2:           #161b22;
  --bg3:           #21262d;
  --surface:       #1c2128;
  --border:        #30363d;
  --text:          #e6edf3;
  --text-muted:    #7d8590;
  --danger:        #f85149;
  --success:       #3fb950;
  --warning:       #d29922;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 4px 24px rgba(0,0,0,.4);
  --shadow-sm:     0 2px 8px rgba(0,0,0,.3);
  --font:          'IBM Plex Sans Arabic', sans-serif;
  --font-mono:     'Space Mono', monospace;
  --nav-h:         60px;
  --tg-safe-top:   env(safe-area-inset-top, 0px);
  --tg-safe-bot:   env(safe-area-inset-bottom, 0px);
}

/* Light mode (Telegram light theme) */
body.light-mode {
  --bg:      #f0f2f5;
  --bg2:     #ffffff;
  --bg3:     #f0f2f5;
  --surface: #ffffff;
  --border:  #d0d7de;
  --text:    #24292f;
  --text-muted: #57606a;
  --shadow:  0 4px 24px rgba(0,0,0,.1);
}

/* ─── Reset & Base ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; -webkit-text-size-adjust: 100%; }

body {
  font-family:      var(--font);
  background:       var(--bg);
  color:            var(--text);
  line-height:      1.6;
  min-height:       100vh;
  padding-top:      calc(var(--nav-h) + var(--tg-safe-top));
  padding-bottom:   var(--tg-safe-bot);
  overflow-x:       hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: var(--font); }

/* ─── Navbar ─────────────────────────────────────── */
.navbar {
  position:   fixed;
  top:        var(--tg-safe-top);
  right:      0; left: 0;
  height:     var(--nav-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  z-index:    100;
  backdrop-filter: blur(12px);
}

.nav-container {
  max-width:   1200px;
  margin:      0 auto;
  padding:     0 16px;
  height:      100%;
  display:     flex;
  align-items: center;
  gap:         16px;
}

.nav-logo {
  display:     flex;
  align-items: center;
  gap:         8px;
  font-size:   1.2rem;
  font-weight: 700;
  color:       var(--primary);
  cursor:      pointer;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap:     4px;
  flex:    1;
}

.nav-links a {
  padding:       6px 10px;
  border-radius: var(--radius-sm);
  color:         var(--text-muted);
  font-size:     .875rem;
  transition:    all .2s;
}
.nav-links a:hover { background: var(--bg3); color: var(--text); text-decoration: none; }

.nav-actions {
  display:     flex;
  align-items: center;
  gap:         8px;
  margin-right: auto; /* RTL: push to left */
}

/* ─── Buttons ────────────────────────────────────── */
.btn {
  display:       inline-flex;
  align-items:   center;
  gap:           6px;
  padding:       8px 16px;
  border:        none;
  border-radius: var(--radius-sm);
  cursor:        pointer;
  font-size:     .875rem;
  font-weight:   500;
  transition:    all .2s;
  white-space:   nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover  { background: var(--primary-dark); }
.btn-outline  { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover  { background: var(--bg3); }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-danger:hover   { opacity: .85; }
.btn-lg  { padding: 12px 24px; font-size: 1rem; }
.btn-sm  { padding: 5px 10px; font-size: .8rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 6px; border-radius: 50%;
  display: flex; align-items: center; gap: 4px; font-size: .875rem;
  transition: all .2s;
}
.btn-icon:hover { background: var(--bg3); color: var(--text); }

/* ─── Forms ─────────────────────────────────────── */
.form-control {
  width:         100%;
  padding:       10px 14px;
  background:    var(--bg3);
  border:        1px solid var(--border);
  border-radius: var(--radius-sm);
  color:         var(--text);
  font-size:     .9rem;
  transition:    border .2s;
}
.form-control:focus {
  outline:       none;
  border-color:  var(--primary);
  box-shadow:    0 0 0 3px rgba(42,171,238,.15);
}
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: .875rem; font-weight: 500; color: var(--text-muted); }

.radio-group { display: flex; gap: 16px; }
.radio-group label {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: all .2s;
}
.radio-group label:has(input:checked) { border-color: var(--primary); background: rgba(42,171,238,.1); }

/* Tags */
.tags-input-container {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px; background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); min-height: 44px;
}
.tags-input { background: none; border: none; outline: none; color: var(--text); font-size: .875rem; min-width: 100px; }
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; background: rgba(42,171,238,.15); border-radius: 20px;
  font-size: .8rem; color: var(--primary);
}
.tag button { background: none; border: none; cursor: pointer; color: var(--primary); font-size: .8rem; padding: 0; }

/* Alerts */
.alert {
  padding: 10px 14px; border-radius: var(--radius-sm); font-size: .875rem; margin-bottom: 12px;
}
.alert-error   { background: rgba(248,81,73,.15); color: var(--danger); border: 1px solid rgba(248,81,73,.3); }
.alert-success { background: rgba(63,185,80,.15); color: var(--success); border: 1px solid rgba(63,185,80,.3); }
.hidden { display: none !important; }

/* ─── Pages ─────────────────────────────────────── */
#app { max-width: 1200px; margin: 0 auto; padding: 24px 16px; }
.page { display: none; }
.page.active { display: block; animation: fadeIn .25s ease; }

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

.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 1.5rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.page-header h1 i { color: var(--primary); }
.page-header p { color: var(--text-muted); margin-top: 4px; }

/* ─── Hero ───────────────────────────────────────── */
.hero {
  display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center;
  padding: 40px 0; min-height: 320px;
}
.hero-content h1 { font-size: 2rem; font-weight: 700; line-height: 1.3; margin-bottom: 12px; }
.hero-content p  { color: var(--text-muted); margin-bottom: 24px; font-size: 1rem; }
.hero-buttons    { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.hero-stats      { display: flex; gap: 24px; }
.stat { text-align: center; }
.stat span { display: block; font-size: 1.8rem; font-weight: 700; color: var(--primary); font-family: var(--font-mono); }
.stat small { font-size: .8rem; color: var(--text-muted); }

.hero-visual { display: flex; align-items: center; justify-content: center; }
.hero-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 20px;
  background: var(--surface); border-radius: 16px; border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.hero-card i { color: var(--primary); opacity: .7; }
.floating { animation: float 4s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ─── Section titles ─────────────────────────────── */
.recent-section h2, .features-section h2 {
  font-size: 1.3rem; font-weight: 700; margin-bottom: 20px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.mt-2 { margin-top: 16px; }

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

.file-card {
  background:    var(--surface);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  overflow:      hidden;
  cursor:        pointer;
  transition:    all .2s;
  box-shadow:    var(--shadow-sm);
}
.file-card:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: var(--shadow); }

.file-card-thumb {
  height: 110px; display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; position: relative;
  background: linear-gradient(135deg, var(--bg3) 0%, var(--bg2) 100%);
}
.file-card-thumb.pdf     { background: linear-gradient(135deg, #ff4b4b22, #ff4b4b11); color: #ff4b4b; }
.file-card-thumb.image   { background: linear-gradient(135deg, #00d4aa22, #00d4aa11); color: #00d4aa; }
.file-card-thumb.video   { background: linear-gradient(135deg, #7c5cfc22, #7c5cfc11); color: #7c5cfc; }
.file-card-thumb.audio   { background: linear-gradient(135deg, #ff8c4222, #ff8c4211); color: #ff8c42; }
.file-card-thumb.code    { background: linear-gradient(135deg, #2aabee22, #2aabee11); color: #2aabee; }
.file-card-thumb.archive { background: linear-gradient(135deg, #ffd70022, #ffd70011); color: #ffd700; }
.file-card-thumb.other   { background: linear-gradient(135deg, #96969622, #96969611); color: #969696; }

.file-badge {
  position: absolute; top: 8px; right: 8px;
  padding: 2px 6px; background: rgba(0,0,0,.4); border-radius: 6px;
  font-size: .7rem; font-family: var(--font-mono); color: #fff;
}

.file-card-body   { padding: 12px; }
.file-card-title  { font-weight: 600; font-size: .9rem; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-card-meta   { display: flex; flex-wrap: wrap; gap: 8px; font-size: .75rem; color: var(--text-muted); margin-bottom: 10px; }
.file-card-actions { display: flex; gap: 6px; align-items: center; }

.fav-btn {
  background: none; border: 1px solid var(--border); color: var(--text-muted);
  padding: 5px 8px; border-radius: var(--radius-sm); cursor: pointer; transition: all .2s;
}
.fav-btn:hover, .fav-btn.active { color: var(--danger); border-color: var(--danger); background: rgba(248,81,73,.1); }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: .7rem; font-weight: 600; }
.badge-private { background: rgba(248,81,73,.15); color: var(--danger); border: 1px solid rgba(248,81,73,.3); }
.badge-public  { background: rgba(63,185,80,.15);  color: var(--success); border: 1px solid rgba(63,185,80,.3); }

/* ─── Upload ─────────────────────────────────────── */
.upload-container { max-width: 640px; margin: 0 auto; }

.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 40px; text-align: center; cursor: pointer;
  transition: all .2s; color: var(--text-muted);
}
.upload-zone.dragover { border-color: var(--primary); background: rgba(42,171,238,.05); }
.upload-zone i { color: var(--primary); margin-bottom: 12px; }
.upload-zone h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--text); }
.upload-hint { font-size: .8rem; margin-top: 10px; }

.file-preview-list { margin: 16px 0; display: flex; flex-direction: column; gap: 8px; }
.file-preview-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: var(--surface); border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.file-preview-info { flex: 1; overflow: hidden; }
.file-preview-info span { font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.file-preview-info small { color: var(--text-muted); font-size: .75rem; }
.remove-file { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; }
.remove-file:hover { color: var(--danger); }

.upload-form { margin-top: 20px; }

.progress-bar { background: var(--bg3); border-radius: 20px; height: 8px; margin-bottom: 6px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 20px; transition: width .2s; width: 0%; }
.upload-progress { margin: 12px 0; }
#progressText { font-size: .8rem; color: var(--text-muted); font-family: var(--font-mono); }

/* ─── Browse ─────────────────────────────────────── */
.browse-controls { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.browse-search {
  position: relative;
}
.browse-search i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.browse-search input { padding-right: 36px; }
.browse-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.browse-filters select { flex: 1; min-width: 120px; }
.view-toggle { display: flex; gap: 4px; }
.view-toggle .btn-icon.active { background: var(--primary); color: #fff; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.page-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; color: var(--text); font-size: .875rem; transition: all .2s;
}
.page-btn:hover  { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ─── Categories ─────────────────────────────────── */
.categories-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px;
}
.cat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 16px; text-align: center; cursor: pointer; transition: all .2s;
}
.cat-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.cat-card h3    { font-size: .9rem; margin: 8px 0 4px; font-weight: 600; }
.cat-card p     { font-size: .75rem; color: var(--text-muted); }
.cat-count      { display: inline-block; padding: 2px 8px; background: rgba(42,171,238,.15); color: var(--primary); border-radius: 20px; font-size: .75rem; font-weight: 700; margin-bottom: 4px; }

.cat-icon      { font-size: 1.8rem; }
.cat-icon.docs     { color: #ff4b4b; }
.cat-icon.images   { color: #00d4aa; }
.cat-icon.videos   { color: #7c5cfc; }
.cat-icon.audio    { color: #ff8c42; }
.cat-icon.code     { color: #2aabee; }
.cat-icon.archives { color: #ffd700; }
.cat-icon.other    { color: #969696; }

/* ─── Search ─────────────────────────────────────── */
.search-box-big {
  position: relative; margin-bottom: 16px;
}
.search-box-big i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.search-box-big input { padding-right: 40px; font-size: 1rem; }

.search-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.filter-chip {
  padding: 6px 12px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted); cursor: pointer;
  font-size: .8rem; transition: all .2s; display: flex; align-items: center; gap: 4px;
}
.filter-chip:hover, .filter-chip.active { border-color: var(--primary); color: var(--primary); background: rgba(42,171,238,.1); }

/* ─── File Detail ────────────────────────────────── */
.file-detail-main {
  display: grid; grid-template-columns: 300px 1fr; gap: 32px; align-items: start;
}
.file-detail-preview { background: var(--surface); border-radius: var(--radius); padding: 20px; border: 1px solid var(--border); }
.file-detail-preview h3 { margin: 12px 0 4px; font-size: 1.1rem; }
.file-detail-actions { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.share-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.share-section h4 { font-size: .875rem; margin-bottom: 10px; }
.share-link { display: flex; gap: 6px; }
.copy-btn { background: var(--bg3); border: 1px solid var(--border); color: var(--text-muted); padding: 8px; border-radius: var(--radius-sm); cursor: pointer; }
.copy-btn:hover { color: var(--primary); border-color: var(--primary); }

.owner-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.file-detail-info h2 { font-size: 1.3rem; margin-bottom: 8px; }
.file-desc { color: var(--text-muted); margin-bottom: 16px; }
.file-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.meta-item { padding: 10px; background: var(--bg3); border-radius: var(--radius-sm); }
.meta-item small { display: block; font-size: .75rem; color: var(--text-muted); margin-bottom: 2px; }
.meta-item strong { font-size: .9rem; }
.file-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ─── Profile ────────────────────────────────────── */
.profile-container { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.profile-sidebar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; text-align: center; }
.avatar-circle {
  width: 80px; height: 80px; border-radius: 50%; background: var(--bg3);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 12px;
  border: 3px solid var(--primary); color: var(--primary);
}
.profile-sidebar h3 { font-size: 1rem; font-weight: 700; }
.text-muted { color: var(--text-muted); font-size: .875rem; }
.tg-badge {
  display: inline-flex; align-items: center; gap: 4px;
  margin: 8px 0; padding: 4px 10px; background: rgba(42,171,238,.1);
  color: var(--primary); border-radius: 20px; font-size: .75rem;
}
.profile-stats { display: flex; gap: 16px; justify-content: center; margin-top: 16px; }
.pstat { text-align: center; }
.pstat span { display: block; font-size: 1.3rem; font-weight: 700; color: var(--primary); font-family: var(--font-mono); }
.pstat small { font-size: .75rem; color: var(--text-muted); }

.storage-bar { margin-top: 16px; }
.bar-track { background: var(--bg3); border-radius: 20px; height: 6px; overflow: hidden; margin-bottom: 4px; }
.bar-fill  { height: 100%; background: var(--primary); border-radius: 20px; transition: width .5s; }
.bar-label { font-size: .75rem; color: var(--text-muted); font-family: var(--font-mono); }

/* ─── User Menu ─────────────────────────────────── */
.user-menu     { position: relative; }
.user-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0;
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  min-width: 180px; box-shadow: var(--shadow); z-index: 200; overflow: hidden;
}
.user-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; color: var(--text); font-size: .875rem; transition: background .15s;
}
.user-dropdown a:hover { background: var(--bg3); text-decoration: none; }
.user-dropdown hr { border: none; border-top: 1px solid var(--border); }

/* ─── Contact ────────────────────────────────────── */
.contact-container { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; }
.contact-info { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.contact-info h3 { margin-bottom: 16px; }
.contact-item { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: .875rem; color: var(--text-muted); }
.social-links { display: flex; gap: 10px; margin-top: 16px; }
.social-links a {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: all .2s;
}
.social-links a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

/* ─── Empty State ────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state i { display: block; margin-bottom: 16px; opacity: .4; }
.empty-state p { font-size: .95rem; margin-bottom: 16px; }

/* ─── Loading ────────────────────────────────────── */
.loading-spinner { text-align: center; padding: 48px; color: var(--primary); grid-column: 1/-1; }
.skeleton-grid   { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; grid-column: 1/-1; }
.skeleton-card   {
  height: 180px; background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(90deg, var(--bg3) 25%, var(--surface) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ─── Toast ──────────────────────────────────────── */
.toast {
  position: fixed; bottom: calc(24px + var(--tg-safe-bot)); left: 50%; transform: translateX(-50%);
  padding: 12px 20px; border-radius: var(--radius);
  font-size: .875rem; font-weight: 500; z-index: 9999;
  background: var(--bg2); border: 1px solid var(--border); box-shadow: var(--shadow);
  white-space: nowrap; max-width: calc(100vw - 32px);
  animation: slideUp .3s ease;
}
.toast.success { background: rgba(63,185,80,.15); border-color: var(--success); color: var(--success); }
.toast.error   { background: rgba(248,81,73,.15); border-color: var(--danger); color: var(--danger); }
.toast.info    { background: rgba(42,171,238,.15); border-color: var(--primary); color: var(--primary); }
@keyframes slideUp { from { opacity:0; transform: translateX(-50%) translateY(10px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }

/* ─── Modal ──────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 999; padding: 16px;
}
.modal-box {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; max-width: 480px; width: 100%; position: relative; box-shadow: var(--shadow);
}
.modal-close { position: absolute; top: 12px; left: 12px; }

/* ─── Footer ─────────────────────────────────────── */
.footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 32px 16px 16px; margin-top: 48px; }
.footer-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.footer-brand i, .footer-brand span { color: var(--primary); font-size: 1.1rem; font-weight: 700; }
.footer-brand p { color: var(--text-muted); font-size: .8rem; margin-top: 6px; }
.footer-links h4 { font-size: .875rem; font-weight: 600; margin-bottom: 12px; color: var(--text-muted); }
.footer-links a  { display: block; color: var(--text-muted); font-size: .875rem; margin-bottom: 6px; transition: color .2s; }
.footer-links a:hover { color: var(--primary); text-decoration: none; }
.footer-bottom { max-width: 1200px; margin: 24px auto 0; padding-top: 16px; border-top: 1px solid var(--border); text-align: center; color: var(--text-muted); font-size: .8rem; }

/* ─── Hamburger + Mobile ─────────────────────────── */
.hamburger { display: none; }

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links  { display: none; position: fixed; top: var(--nav-h); right: 0; left: 0; background: var(--bg2); padding: 12px; flex-direction: column; border-bottom: 1px solid var(--border); }
  .nav-links.mobile-open { display: flex; }

  .hero { grid-template-columns: 1fr; text-align: center; padding: 24px 0; }
  .hero-visual { display: none; }
  .hero-content h1 { font-size: 1.5rem; }
  .hero-buttons { justify-content: center; }
  .hero-stats { justify-content: center; }

  .file-detail-main   { grid-template-columns: 1fr; }
  .profile-container  { grid-template-columns: 1fr; }
  .contact-container  { grid-template-columns: 1fr; }
  .categories-grid    { grid-template-columns: repeat(2, 1fr); }
  .footer-container   { grid-template-columns: 1fr; gap: 20px; }

  .files-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .browse-filters { flex-wrap: wrap; }
  .browse-filters select { min-width: 100px; }
}

@media (max-width: 480px) {
  #app { padding: 16px 12px; }
  .files-grid { grid-template-columns: 1fr 1fr; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
}
