* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }

body {
  background: #f0f2f5;
  color: #1a1a1a;
  min-height: 100vh;
}

/* LOGIN */
.login-screen {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex; justify-content: center; align-items: center;
  padding: 20px;
}
.login-box {
  background: #fff; padding: 40px 30px;
  border-radius: 16px; width: 100%; max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3); text-align: center;
}
.login-box h2 { margin-bottom: 25px; color: #333; }
.login-box input {
  width: 100%; padding: 14px 16px;
  border: 2px solid #e0e0e0; border-radius: 10px;
  font-size: 15px; margin-bottom: 15px; outline: none;
  transition: border 0.3s;
}
.login-box input:focus { border-color: #667eea; }
.login-box button {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff; border: none; border-radius: 10px;
  font-size: 16px; font-weight: 600; cursor: pointer;
  transition: transform 0.2s;
}
.login-box button:hover { transform: scale(1.02); }
.hint { font-size: 12px; color: #888; margin-top: 15px; }
.hint code { background: #f0f0f0; padding: 2px 6px; border-radius: 4px; color: #667eea; }
.error { color: #e74c3c; font-size: 13px; margin-top: 10px; min-height: 18px; }

/* LAYOUT */
.admin-wrap { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px; background: #1a1a2e; color: #fff;
  padding: 24px 16px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar h2 { margin-bottom: 24px; font-size: 20px; padding-left: 8px; }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  padding: 12px 14px; border-radius: 8px;
  cursor: pointer; font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
  transition: all 0.2s; color: rgba(255,255,255,0.75);
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; }
.nav-item i { width: 18px; }
.back-btn {
  margin-top: 16px; padding: 12px;
  background: rgba(255,255,255,0.1); color: #fff;
  text-decoration: none; border-radius: 8px;
  text-align: center; font-size: 13px;
  transition: background 0.2s;
}
.back-btn:hover { background: rgba(255,255,255,0.2); }

.content {
  flex: 1; padding: 30px 40px;
  max-width: 900px; margin: 0 auto; width: 100%;
}
.tab { display: none; animation: fadeIn 0.3s ease; }
.tab.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.tab h1 { font-size: 26px; margin-bottom: 24px; color: #1a1a1a; }
.tab h3 { font-size: 16px; margin: 24px 0 12px; color: #555; }
.tab label { display: block; font-size: 13px; font-weight: 600; color: #555; margin: 15px 0 6px; }
.tab input[type="text"], .tab input[type="password"], .tab input[type="datetime-local"],
.tab textarea, .tab select {
  width: 100%; padding: 12px 14px;
  border: 2px solid #e0e0e0; border-radius: 10px;
  font-size: 14px; outline: none; transition: border 0.3s;
  font-family: inherit; background: #fff;
}
.tab input:focus, .tab textarea:focus, .tab select:focus { border-color: #667eea; }
.tab textarea { resize: vertical; }

/* BUTTONS */
.btn-save, .btn-add, .btn-danger, .btn-cancel, .btn-upload {
  padding: 12px 22px; border-radius: 10px;
  border: none; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 15px;
}
.btn-save { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; }
.btn-save:hover { transform: scale(1.03); box-shadow: 0 6px 20px rgba(102,126,234,0.4); }
.btn-add { background: #27ae60; color: #fff; }
.btn-add:hover { background: #229954; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-cancel { background: #e0e0e0; color: #333; }
.btn-cancel:hover { background: #d0d0d0; }
.btn-upload { background: #3498db; color: #fff; }

/* AVATAR UPLOAD */
.avatar-upload {
  display: flex; gap: 20px; align-items: center;
  padding: 15px; background: #fff; border-radius: 12px;
  border: 2px dashed #ddd;
}
.avatar-upload img {
  width: 80px; height: 80px; border-radius: 50%;
  object-fit: cover; background: #eee;
}

/* LINKS LIST */
.links-list, .embeds-list, .socials-list { margin-top: 20px; }
.list-item {
  background: #fff; padding: 15px 18px;
  border-radius: 12px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.2s;
}
.list-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-1px); }
.list-item .drag { cursor: grab; color: #ccc; }
.list-item .info { flex: 1; min-width: 0; }
.list-item .info .title { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.list-item .info .url { font-size: 12px; color: #888; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .info .badge {
  display: inline-block; font-size: 10px; padding: 2px 8px;
  border-radius: 20px; background: #f0f0f0; color: #555;
  margin-left: 6px; font-weight: 600;
}
.list-item .info .badge.video { background: #ffe8e8; color: #e74c3c; }
.list-item .info .badge.scheduled { background: #fff4d6; color: #d68910; }
.list-item .info .badge.category { background: #e8f0ff; color: #3498db; }
.list-item .actions { display: flex; gap: 6px; }
.list-item .actions button {
  width: 34px; height: 34px; border-radius: 8px;
  border: none; cursor: pointer; font-size: 13px;
  transition: all 0.2s;
}
.list-item .actions .edit { background: #e8f0ff; color: #3498db; }
.list-item .actions .edit:hover { background: #3498db; color: #fff; }
.list-item .actions .del { background: #ffe8e8; color: #e74c3c; }
.list-item .actions .del:hover { background: #e74c3c; color: #fff; }

.info-text { font-size: 13px; color: #888; margin-bottom: 15px; }

/* THEME GRID */
.theme-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}
.theme-card {
  height: 80px; border-radius: 10px;
  cursor: pointer; border: 3px solid transparent;
  transition: all 0.2s;
  display: flex; align-items: flex-end; padding: 8px;
  color: #fff; font-size: 12px; font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.theme-card:hover { transform: scale(1.05); }
.theme-card.active { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.3); }

/* WALLPAPER */
.wallpaper-options { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 15px; }
.wp-btn {
  padding: 10px 18px; border-radius: 8px;
  border: 2px solid #e0e0e0; background: #fff;
  cursor: pointer; font-size: 13px; font-weight: 600;
  transition: all 0.2s;
}
.wp-btn:hover { border-color: #667eea; }
.wp-btn.active { background: #667eea; color: #fff; border-color: #667eea; }

#wallpaperConfig input[type="color"] {
  width: 60px; height: 40px; border: none;
  border-radius: 8px; cursor: pointer;
}

/* TRANSLATION EDITOR */
.translation-editor { margin-top: 15px; }
.translation-row {
  background: #fff; padding: 12px 15px; border-radius: 10px;
  margin-bottom: 10px; display: flex; gap: 12px; align-items: center;
}
.translation-row .key {
  font-size: 12px; font-weight: 600; color: #667eea;
  min-width: 120px; text-transform: uppercase;
}
.translation-row input { flex: 1; padding: 8px 12px; border: 1px solid #e0e0e0; border-radius: 6px; font-size: 13px; }

/* MODAL */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: none; justify-content: center; align-items: center;
  z-index: 1000; padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal.open { display: flex; }
.modal-box {
  background: #fff; border-radius: 16px;
  padding: 30px; width: 100%; max-width: 500px;
  max-height: 90vh; overflow-y: auto;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-box h2 { margin-bottom: 20px; font-size: 20px; }
.modal-box label { display: block; font-size: 13px; font-weight: 600; color: #555; margin: 14px 0 6px; }
.modal-box input[type="text"], .modal-box input[type="datetime-local"],
.modal-box input[type="password"], .modal-box select, .modal-box textarea {
  width: 100%; padding: 11px 14px;
  border: 2px solid #e0e0e0; border-radius: 10px;
  font-size: 14px; outline: none; font-family: inherit;
}
.modal-box input:focus, .modal-box select:focus { border-color: #667eea; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* TOAST */
.toast {
  position: fixed; bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1a1a1a; color: #fff;
  padding: 14px 24px; border-radius: 10px;
  font-size: 14px; transition: transform 0.4s ease;
  z-index: 2000;
}
.toast.show { transform: translateX(-50%) translateY(0); }

@media (max-width: 768px) {
  .admin-wrap { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; padding: 15px; }
  .sidebar nav { flex-direction: row; overflow-x: auto; gap: 6px; }
  .nav-item { white-space: nowrap; font-size: 12px; padding: 10px 12px; }
  .content { padding: 20px; }
}* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }

body {
  background: #f0f2f5;
  color: #1a1a1a;
  min-height: 100vh;
}

/* LOGIN */
.login-screen {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex; justify-content: center; align-items: center;
  padding: 20px;
}
.login-box {
  background: #fff; padding: 40px 30px;
  border-radius: 16px; width: 100%; max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3); text-align: center;
}
.login-box h2 { margin-bottom: 25px; color: #333; }
.login-box input {
  width: 100%; padding: 14px 16px;
  border: 2px solid #e0e0e0; border-radius: 10px;
  font-size: 15px; margin-bottom: 15px; outline: none;
  transition: border 0.3s;
}
.login-box input:focus { border-color: #667eea; }
.login-box button {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff; border: none; border-radius: 10px;
  font-size: 16px; font-weight: 600; cursor: pointer;
  transition: transform 0.2s;
}
.login-box button:hover { transform: scale(1.02); }
.hint { font-size: 12px; color: #888; margin-top: 15px; }
.hint code { background: #f0f0f0; padding: 2px 6px; border-radius: 4px; color: #667eea; }
.error { color: #e74c3c; font-size: 13px; margin-top: 10px; min-height: 18px; }

/* LAYOUT */
.admin-wrap { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px; background: #1a1a2e; color: #fff;
  padding: 24px 16px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar h2 { margin-bottom: 24px; font-size: 20px; padding-left: 8px; }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  padding: 12px 14px; border-radius: 8px;
  cursor: pointer; font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
  transition: all 0.2s; color: rgba(255,255,255,0.75);
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; }
.nav-item i { width: 18px; }
.back-btn {
  margin-top: 16px; padding: 12px;
  background: rgba(255,255,255,0.1); color: #fff;
  text-decoration: none; border-radius: 8px;
  text-align: center; font-size: 13px;
  transition: background 0.2s;
}
.back-btn:hover { background: rgba(255,255,255,0.2); }

.content {
  flex: 1; padding: 30px 40px;
  max-width: 900px; margin: 0 auto; width: 100%;
}
.tab { display: none; animation: fadeIn 0.3s ease; }
.tab.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.tab h1 { font-size: 26px; margin-bottom: 24px; color: #1a1a1a; }
.tab h3 { font-size: 16px; margin: 24px 0 12px; color: #555; }
.tab label { display: block; font-size: 13px; font-weight: 600; color: #555; margin: 15px 0 6px; }
.tab input[type="text"], .tab input[type="password"], .tab input[type="datetime-local"],
.tab textarea, .tab select {
  width: 100%; padding: 12px 14px;
  border: 2px solid #e0e0e0; border-radius: 10px;
  font-size: 14px; outline: none; transition: border 0.3s;
  font-family: inherit; background: #fff;
}
.tab input:focus, .tab textarea:focus, .tab select:focus { border-color: #667eea; }
.tab textarea { resize: vertical; }

/* BUTTONS */
.btn-save, .btn-add, .btn-danger, .btn-cancel, .btn-upload {
  padding: 12px 22px; border-radius: 10px;
  border: none; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 15px;
}
.btn-save { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; }
.btn-save:hover { transform: scale(1.03); box-shadow: 0 6px 20px rgba(102,126,234,0.4); }
.btn-add { background: #27ae60; color: #fff; }
.btn-add:hover { background: #229954; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-cancel { background: #e0e0e0; color: #333; }
.btn-cancel:hover { background: #d0d0d0; }
.btn-upload { background: #3498db; color: #fff; }

/* AVATAR UPLOAD */
.avatar-upload {
  display: flex; gap: 20px; align-items: center;
  padding: 15px; background: #fff; border-radius: 12px;
  border: 2px dashed #ddd;
}
.avatar-upload img {
  width: 80px; height: 80px; border-radius: 50%;
  object-fit: cover; background: #eee;
}

/* LINKS LIST */
.links-list, .embeds-list, .socials-list { margin-top: 20px; }
.list-item {
  background: #fff; padding: 15px 18px;
  border-radius: 12px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.2s;
}
.list-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-1px); }
.list-item .drag { cursor: grab; color: #ccc; }
.list-item .info { flex: 1; min-width: 0; }
.list-item .info .title { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.list-item .info .url { font-size: 12px; color: #888; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .info .badge {
  display: inline-block; font-size: 10px; padding: 2px 8px;
  border-radius: 20px; background: #f0f0f0; color: #555;
  margin-left: 6px; font-weight: 600;
}
.list-item .info .badge.video { background: #ffe8e8; color: #e74c3c; }
.list-item .info .badge.scheduled { background: #fff4d6; color: #d68910; }
.list-item .info .badge.category { background: #e8f0ff; color: #3498db; }
.list-item .actions { display: flex; gap: 6px; }
.list-item .actions button {
  width: 34px; height: 34px; border-radius: 8px;
  border: none; cursor: pointer; font-size: 13px;
  transition: all 0.2s;
}
.list-item .actions .edit { background: #e8f0ff; color: #3498db; }
.list-item .actions .edit:hover { background: #3498db; color: #fff; }
.list-item .actions .del { background: #ffe8e8; color: #e74c3c; }
.list-item .actions .del:hover { background: #e74c3c; color: #fff; }

.info-text { font-size: 13px; color: #888; margin-bottom: 15px; }

/* THEME GRID */
.theme-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}
.theme-card {
  height: 80px; border-radius: 10px;
  cursor: pointer; border: 3px solid transparent;
  transition: all 0.2s;
  display: flex; align-items: flex-end; padding: 8px;
  color: #fff; font-size: 12px; font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.theme-card:hover { transform: scale(1.05); }
.theme-card.active { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.3); }

/* WALLPAPER */
.wallpaper-options { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 15px; }
.wp-btn {
  padding: 10px 18px; border-radius: 8px;
  border: 2px solid #e0e0e0; background: #fff;
  cursor: pointer; font-size: 13px; font-weight: 600;
  transition: all 0.2s;
}
.wp-btn:hover { border-color: #667eea; }
.wp-btn.active { background: #667eea; color: #fff; border-color: #667eea; }

#wallpaperConfig input[type="color"] {
  width: 60px; height: 40px; border: none;
  border-radius: 8px; cursor: pointer;
}

/* TRANSLATION EDITOR */
.translation-editor { margin-top: 15px; }
.translation-row {
  background: #fff; padding: 12px 15px; border-radius: 10px;
  margin-bottom: 10px; display: flex; gap: 12px; align-items: center;
}
.translation-row .key {
  font-size: 12px; font-weight: 600; color: #667eea;
  min-width: 120px; text-transform: uppercase;
}
.translation-row input { flex: 1; padding: 8px 12px; border: 1px solid #e0e0e0; border-radius: 6px; font-size: 13px; }

/* MODAL */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: none; justify-content: center; align-items: center;
  z-index: 1000; padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal.open { display: flex; }
.modal-box {
  background: #fff; border-radius: 16px;
  padding: 30px; width: 100%; max-width: 500px;
  max-height: 90vh; overflow-y: auto;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-box h2 { margin-bottom: 20px; font-size: 20px; }
.modal-box label { display: block; font-size: 13px; font-weight: 600; color: #555; margin: 14px 0 6px; }
.modal-box input[type="text"], .modal-box input[type="datetime-local"],
.modal-box input[type="password"], .modal-box select, .modal-box textarea {
  width: 100%; padding: 11px 14px;
  border: 2px solid #e0e0e0; border-radius: 10px;
  font-size: 14px; outline: none; font-family: inherit;
}
.modal-box input:focus, .modal-box select:focus { border-color: #667eea; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* TOAST */
.toast {
  position: fixed; bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1a1a1a; color: #fff;
  padding: 14px 24px; border-radius: 10px;
  font-size: 14px; transition: transform 0.4s ease;
  z-index: 2000;
}
.toast.show { transform: translateX(-50%) translateY(0); }

@media (max-width: 768px) {
  .admin-wrap { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; padding: 15px; }
  .sidebar nav { flex-direction: row; overflow-x: auto; gap: 6px; }
  .nav-item { white-space: nowrap; font-size: 12px; padding: 10px 12px; }
  .content { padding: 20px; }
}