/**
 * PhimMoi User Service - CSS Styles
 * Version: 1.0
 * 
 */

/* ============================================ */
/* HEADER AUTH BUTTONS                          */
/* ============================================ */
.pm-header-right-wrapper {
  float: right;
  display: flex;
  align-items: center;
  gap: 15px;
  height: 60px;
}
#header .pm-header-right-wrapper .form-search {
  float: none;
  margin: 0;
  width: 200px;
}
.pm-header-auth {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pm-header-auth #pm-guest-btns {
  display: flex;
  gap: 8px;
}
.pm-auth-btn {
  background: none;
  border: 1px solid #ff9601;
  color: #ff9601;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pm-auth-btn:hover {
  background: #ff9601;
  color: #000;
}
.pm-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8a00, #ff5500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.pm-user-avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 3px rgba(255,150,1,0.3);
}
.pm-notification-badge {
  position: relative;
  display: inline-block;
}
.pm-notification-badge .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #f44336;
  color: #fff;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
}
#pm-user-logged {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ============================================ */
/* USER MENU DROPDOWN                           */
/* ============================================ */
.pm-user-menu-dropdown {
  position: fixed;
  top: 70px;
  right: 20px;
  width: 280px;
  background: linear-gradient(145deg, #1e1e1e, #151515);
  border: 1px solid #333;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  display: none;
  z-index: 10001;
  overflow: hidden;
}
.pm-user-menu-dropdown.show {
  display: block;
  animation: pmFadeIn 0.2s ease;
}
@keyframes pmFadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.pm-user-menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(255,150,1,0.05);
}
.pm-user-avatar-large {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8a00, #ff5500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 20px;
  color: #fff;
}
.pm-user-menu-info {
  flex: 1;
  min-width: 0;
}
.pm-user-menu-name {
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pm-user-menu-name .pm-badge {
  font-size: 9px;
  padding: 2px 5px;
  flex-shrink: 0;
}
.pm-user-menu-name .pm-badge-verified {
  font-size: 12px;
}
.pm-user-menu-email {
  color: #888;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pm-user-menu-divider {
  height: 1px;
  background: #333;
  margin: 4px 0;
}
.pm-user-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #ccc;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.pm-user-menu-item:hover {
  background: rgba(255,150,1,0.1);
  color: #ff9601;
}
.pm-user-menu-item i {
  width: 18px;
  text-align: center;
  color: #888;
}
.pm-user-menu-item:hover i {
  color: #ff9601;
}
.pm-user-menu-item.logout {
  color: #f44336;
}
.pm-user-menu-item.logout:hover {
  background: rgba(244,67,54,0.1);
}
.pm-user-menu-item.logout i {
  color: #f44336;
}

/* ============================================ */
/* NOTIFICATIONS DROPDOWN                       */
/* ============================================ */
.pm-notifications-dropdown {
  position: fixed;
  top: 70px;
  right: 20px;
  width: 350px;
  max-height: 400px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  display: none;
  overflow-y: auto;
  z-index: 10001;
}
.pm-notifications-dropdown.show {
  display: block;
  animation: pmFadeIn 0.2s ease;
}
.pm-notification-item {
  padding: 12px 15px;
  border-bottom: 1px solid #333;
  cursor: pointer;
  transition: background 0.2s;
}
.pm-notification-item:hover {
  background: #252525;
}
.pm-notification-item.unread {
  background: rgba(255, 138, 0, 0.1);
  border-left: 3px solid #ff8a00;
}
.pm-notification-title {
  color: #fff;
  font-size: 13px;
  margin-bottom: 5px;
}
.pm-notification-time {
  color: #666;
  font-size: 11px;
}

/* ============================================ */
/* FILM ACTION BUTTONS                          */
/* ============================================ */
.pm-film-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 15px 0;
}
.pm-action-btn {
  background: transparent;
  border: none;
  color: #999;
  padding: 12px 8px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.pm-action-btn i {
  font-size: 20px;
}
.pm-action-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}
.pm-action-btn.active {
  color: #ff8a00;
}
.pm-action-btn.active i {
  animation: pmPulse 0.3s ease;
}
@keyframes pmPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}
#pm-btn-favorite:hover, #pm-btn-favorite.active { color: #ff4757; }
#pm-btn-watchlater:hover, #pm-btn-watchlater.active { color: #2ed573; }
#pm-btn-follow:hover, #pm-btn-follow.active { color: #ffa502; }
#pm-btn-share:hover { color: #1e90ff; }

/* ============================================ */
/* CONTINUE WATCHING                            */
/* ============================================ */
.pm-continue-watching {
  background: #252525;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}
.pm-continue-watching h4 {
  color: #ff8a00;
  margin: 0 0 10px 0;
  font-size: 14px;
}
.pm-progress-bar {
  height: 4px;
  background: #444;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 5px;
}
.pm-progress-bar-fill {
  height: 100%;
  background: #ff8a00;
  border-radius: 2px;
}

/* ============================================ */
/* COMMENTS SECTION                             */
/* ============================================ */
.pm-comments-section {
  background: #1a1a1a;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
}
.pm-comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}
.pm-comments-title {
  color: #ff8a00;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}
.pm-comments-count {
  background: #ff8a00;
  color: #000;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}
.pm-comments-sort {
  display: flex;
  gap: 10px;
}
.pm-sort-btn {
  background: none;
  border: none;
  color: #888;
  font-size: 13px;
  cursor: pointer;
  padding: 5px 10px;
}
.pm-sort-btn.active {
  color: #ff8a00;
  border-bottom: 2px solid #ff8a00;
}

/* ============================================ */
/* COMMENT FORM                                 */
/* ============================================ */
.pm-comment-form {
  background: #1e1e1e;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid #2a2a2a;
}
.pm-login-prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(255, 138, 0, 0.1), rgba(255, 193, 7, 0.08));
  border: 1px solid rgba(255, 138, 0, 0.3);
  border-radius: 8px;
  margin-bottom: 14px;
  color: #ccc;
  font-size: 14px;
}
.pm-login-prompt i {
  font-size: 20px;
  color: #ff8a00;
}
.pm-login-prompt .pm-login-link {
  color: #ff8a00;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.pm-login-prompt .pm-login-link:hover {
  color: #ffc107;
  text-decoration: underline;
}
.pm-comment-form textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid #333;
  border-radius: 0;
  padding: 8px 0 12px 0;
  color: #fff;
  resize: vertical;
  min-height: 80px;
  font-size: 14px;
}
.pm-comment-form textarea:focus {
  outline: none;
  border-color: #ff8a00;
}
.pm-comment-form-footer {
  display: flex;
  align-items: center;
  margin-top: 12px;
  gap: 12px;
}
.pm-guest-name {
  background: #2a2a2a;
  border: none;
  border-radius: 20px;
  padding: 8px 14px;
  color: #fff;
  font-size: 13px;
  flex: 1;
  max-width: 160px;
}
.pm-guest-name:focus {
  outline: none;
  background: #333;
}
.pm-guest-name:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.pm-spoiler-check {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #666;
  font-size: 12px;
  cursor: pointer;
}
.pm-spoiler-check:hover {
  color: #888;
}
.pm-spoiler-check input {
  accent-color: #ff8a00;
  cursor: pointer;
}
.pm-submit-btn {
  background: linear-gradient(135deg, #ff8a00, #ff6b00);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  margin-left: auto;
  transition: all 0.2s;
}
.pm-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,138,0,0.3);
}
.pm-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ============================================ */
/* COMMENTS LIST                                */
/* ============================================ */
.pm-comments-list {
  margin-top: 20px;
}
.pm-comment {
  background: #252525;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 12px;
}
.pm-comment.reply {
  margin-left: 40px;
  background: #222;
  border-left: 3px solid #ff8a00;
  position: relative;
}
.pm-comment.reply::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 20px;
  width: 16px;
  height: 2px;
  background: #444;
}
.pm-comment.reply .pm-comment-avatar {
  width: 32px;
  height: 32px;
  font-size: 13px;
}
.pm-comment.reply .pm-comment-content {
  font-size: 13px;
}
.pm-comment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.pm-comment-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pm-comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8a00, #ff5500);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}
.pm-comment-name {
  color: #ff8a00;
  font-weight: 600;
  font-size: 14px;
}
.pm-comment-time {
  color: #888;
  font-size: 12px;
}
.pm-comment-content {
  color: #ddd;
  line-height: 1.6;
  font-size: 14px;
  margin-bottom: 10px;
}
.pm-comment.deleted {
  opacity: 0.7;
}
.pm-comment-deleted {
  color: #888;
  font-style: italic;
  padding: 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pm-comment-deleted i {
  color: #666;
}
.pm-no-replies {
  color: #888;
  font-style: italic;
  padding: 12px 0 12px 40px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pm-comment-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pm-comment-action {
  background: none;
  border: none;
  color: #888;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s;
}
.pm-comment-action:hover {
  background: #333;
  color: #fff;
}
.pm-comment-action.liked { color: #4CAF50; }
.pm-comment-action.disliked { color: #f44336; }

/* ============================================ */
/* SPOILER                                      */
/* ============================================ */
.pm-comment.spoiler .pm-comment-content {
  background: #333;
  padding: 10px;
  border-radius: 4px;
  color: transparent;
  text-shadow: 0 0 8px rgba(255,255,255,0.5);
  cursor: pointer;
  user-select: none;
}
.pm-comment.spoiler .pm-comment-content.revealed {
  color: #ddd;
  text-shadow: none;
  background: transparent;
}
.pm-spoiler-label {
  background: #f44336;
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 8px;
}

/* Pinned Comment */
.pm-comment.pinned {
  border-left: 3px solid #4CAF50;
  background: linear-gradient(90deg, rgba(76, 175, 80, 0.1) 0%, transparent 50%);
}
.pm-pinned-label {
  color: #4CAF50;
  margin-right: 6px;
}
.pm-pinned-label i {
  transform: rotate(45deg);
}

/* Verified Badges */
.pm-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 6px;
  font-weight: 600;
  vertical-align: middle;
}
.pm-badge i {
  font-size: 9px;
}
.pm-badge-admin {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: #fff;
  box-shadow: 0 2px 4px rgba(238, 90, 36, 0.3);
}
.pm-badge-mod {
  background: linear-gradient(135deg, #26de81, #20bf6b);
  color: #fff;
  box-shadow: 0 2px 4px rgba(32, 191, 107, 0.3);
}
.pm-badge-verified {
  background: transparent;
  color: #1da1f2;
  padding: 0;
  margin-left: 4px;
}
.pm-badge-verified i {
  font-size: 14px;
}

/* ============================================ */
/* REPLIES                                      */
/* ============================================ */
.pm-reply-indicator {
  color: #ff8a00;
  font-size: 11px;
  margin-left: 6px;
}
.pm-reply-indicator i {
  margin-right: 3px;
  transform: scaleX(-1);
}
.pm-show-replies-btn {
  background: rgba(255,138,0,0.1);
  border: none;
  color: #ff8a00;
  font-size: 13px;
  cursor: pointer;
  margin-left: 52px;
  margin-top: 12px;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.2s;
}
.pm-show-replies-btn:hover {
  background: rgba(255,138,0,0.2);
}
.pm-replies-container {
  margin-left: 52px;
  margin-top: 12px;
  background: rgba(255,255,255,0.02);
  border-radius: 12px;
  padding: 4px 0;
}
.pm-replies-container .pm-comment.reply {
  margin-left: 0;
  margin-bottom: 0;
  padding: 12px 16px;
  background: transparent;
  border-left: none;
  border-radius: 0;
  position: relative;
}
.pm-replies-container .pm-comment.reply::before {
  display: none;
}
.pm-replies-container .pm-comment.reply::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 1px;
  background: rgba(255,255,255,0.06);
}
.pm-replies-container .pm-comment.reply:last-child::after {
  display: none;
}
.pm-replies-container .pm-comment-avatar {
  width: 28px;
  height: 28px;
  font-size: 12px;
}
.pm-replies-container .pm-comment-content {
  font-size: 13px;
  line-height: 1.5;
  margin-left: 40px;
  margin-top: 4px;
  color: #ddd;
}
.pm-replies-container .pm-comment-actions {
  margin-left: 40px;
  margin-top: 8px;
}
.pm-loading-replies {
  color: #888;
  padding: 16px;
  font-size: 13px;
}

/* ============================================ */
/* REPLY FORM                                   */
/* ============================================ */
.pm-reply-form {
  background: #1e1e1e;
  border-radius: 10px;
  padding: 12px;
  margin-top: 12px;
  margin-left: 40px;
  border: 1px solid #2a2a2a;
}
.pm-reply-form textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid #333;
  border-radius: 0;
  padding: 8px 0;
  color: #fff;
  resize: none;
  min-height: 50px;
  font-size: 13px;
}
.pm-reply-form textarea:focus {
  outline: none;
  border-color: #ff8a00;
}
.pm-reply-form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.pm-reply-cancel {
  background: transparent;
  border: 1px solid #444;
  color: #888;
  padding: 6px 14px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}
.pm-reply-cancel:hover {
  border-color: #666;
  color: #fff;
}
.pm-reply-submit {
  background: linear-gradient(135deg, #ff8a00, #ff6b00);
  border: none;
  color: #fff;
  padding: 6px 16px;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.2s;
}
.pm-reply-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(255,138,0,0.3);
}

/* ============================================ */
/* LOAD MORE & STATUS                           */
/* ============================================ */
.pm-load-more {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #ff9601, #ff7601);
  border: none;
  color: #000;
  padding: 14px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  margin-top: 20px;
  transition: all 0.2s;
}
.pm-load-more:hover {
  background: linear-gradient(135deg, #ff7601, #ff5501);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 150, 1, 0.3);
}
.pm-load-more:disabled {
  background: #444;
  color: #888;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.pm-loading {
  text-align: center;
  padding: 30px;
  color: #888;
}
.pm-no-comments {
  text-align: center;
  padding: 40px;
  color: #666;
}
.pm-error {
  background: #ff5252;
  color: #fff;
  padding: 10px 15px;
  border-radius: 6px;
  margin-bottom: 15px;
}

/* ============================================ */
/* COMMENT MENU                                 */
/* ============================================ */
.pm-comment-menu {
  position: relative;
}
.pm-comment-menu-btn {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  padding: 5px;
}
.pm-comment-menu-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  background: #252525;
  border: 1px solid #444;
  border-radius: 6px;
  min-width: 120px;
  display: none;
  z-index: 100;
}
.pm-comment-menu-dropdown.show {
  display: block;
}
.pm-comment-menu-dropdown button {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: #fff;
  padding: 10px 15px;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
}
.pm-comment-menu-dropdown button:hover {
  background: #333;
}
.pm-comment-menu-dropdown button.danger {
  color: #f44336;
}
.pm-menu-divider {
  height: 1px;
  background: #444;
  margin: 5px 0;
}

/* ============================================ */
/* LOGIN/REGISTER MODAL                         */
/* ============================================ */
.pm-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.85);
  z-index: 99999;
  justify-content: center;
  align-items: center;
  animation: pmFadeIn 0.2s ease;
}
.pm-modal-overlay.active {
  display: flex;
}
.pm-modal {
  background: linear-gradient(145deg, #1e1e1e, #151515);
  border-radius: 12px;
  width: 90%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,150,1,0.1);
  animation: pmSlideUp 0.3s ease;
}
@keyframes pmSlideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.pm-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid #333;
}
.pm-modal-header h3 {
  color: #ff9601;
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}
.pm-modal-close {
  background: none;
  border: none;
  color: #666;
  font-size: 28px;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}
.pm-modal-close:hover {
  color: #ff9601;
}
.pm-modal-body {
  padding: 25px;
}
.pm-form-group {
  margin-bottom: 18px;
}
.pm-form-group label {
  display: block;
  color: #888;
  margin-bottom: 8px;
  font-size: 13px;
}
.pm-form-group label i {
  margin-right: 6px;
  color: #ff9601;
}
.pm-form-group input {
  width: 100%;
  background: #252525;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  padding: 14px 16px;
  color: #fff;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pm-form-group input:focus {
  outline: none;
  border-color: #ff9601;
  box-shadow: 0 0 0 3px rgba(255,150,1,0.1);
}
.pm-form-group input::placeholder {
  color: #555;
}
.pm-form-submit {
  width: 100%;
  background: linear-gradient(135deg, #ff9601, #ff7601);
  border: none;
  color: #000;
  padding: 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  margin-top: 5px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.pm-form-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(255,150,1,0.3);
}
.pm-form-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}
.pm-form-submit .pm-btn-loading {
  display: none;
}
.pm-form-submit.loading .pm-btn-text {
  display: none;
}
.pm-form-submit.loading .pm-btn-loading {
  display: inline-block;
}

/* Form Error Messages */
.pm-form-error {
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
  border-radius: 8px;
  padding: 12px 15px;
  margin-bottom: 18px;
  color: #f44336;
  font-size: 13px;
  display: none;
  animation: pmShake 0.4s ease;
}
.pm-form-error.show {
  display: block;
}
.pm-form-error i {
  margin-right: 8px;
}
@keyframes pmShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

/* Field Error Messages */
.pm-field-error {
  display: none;
  color: #f44336;
  font-size: 12px;
  margin-top: 5px;
}
.pm-field-error.show {
  display: block;
}
.pm-form-group.has-error input {
  border-color: #f44336;
}
.pm-form-group.has-error input:focus {
  box-shadow: 0 0 0 3px rgba(244,67,54,0.1);
}

/* Form Success State */
.pm-form-group.has-success input {
  border-color: #4caf50;
}
.pm-form-group.has-success input:focus {
  box-shadow: 0 0 0 3px rgba(76,175,80,0.1);
}
.pm-form-divider {
  text-align: center;
  color: #555;
  margin: 25px 0;
  position: relative;
  font-size: 13px;
}
.pm-form-divider::before,
.pm-form-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #333;
}
.pm-form-divider::before { left: 0; }
.pm-form-divider::after { right: 0; }
.pm-social-btns {
  display: flex;
  gap: 12px;
}
.pm-social-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.pm-social-btn:hover {
  transform: translateY(-2px);
}
.pm-social-btn.google {
  background: #fff;
  color: #333;
}
.pm-social-btn.google:hover {
  box-shadow: 0 5px 15px rgba(255,255,255,0.2);
}
.pm-social-btn.facebook {
  background: #1877f2;
  color: #fff;
}
.pm-social-btn.facebook:hover {
  box-shadow: 0 5px 15px rgba(24,119,242,0.3);
}
.pm-form-footer {
  text-align: center;
  margin-top: 25px;
  font-size: 14px;
  color: #888;
}
.pm-form-footer a {
  color: #ff9601;
  cursor: pointer;
  font-weight: 500;
  transition: color 0.2s;
}
.pm-form-footer a:hover {
  color: #ffb040;
}

/* ============================================ */
/* TOAST NOTIFICATIONS                          */
/* ============================================ */
.pm-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
}
.pm-toast {
  background: #333;
  color: #fff;
  padding: 15px 20px;
  border-radius: 6px;
  margin-bottom: 10px;
  min-width: 250px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  animation: pmSlideIn 0.3s ease;
}
.pm-toast.success { border-left: 4px solid #4CAF50; }
.pm-toast.error { border-left: 4px solid #f44336; }
.pm-toast.info { border-left: 4px solid #2196F3; }
.pm-toast.warning { border-left: 4px solid #ff9800; }
@keyframes pmSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ============================================ */
/* INLINE EDIT & DELETE                         */
/* ============================================ */
.pm-edit-form, .pm-delete-confirm { margin-top: 10px; }
.pm-inline-edit, .pm-inline-delete {
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  padding: 12px;
  animation: pmFadeIn 0.2s ease;
}
.pm-inline-edit textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
}
.pm-inline-edit textarea:focus {
  outline: none;
  border-color: #ff9601;
  background: rgba(255,255,255,0.1);
}
.pm-inline-edit textarea::placeholder { color: #666; }
.pm-inline-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  justify-content: flex-end;
}
.pm-inline-cancel, .pm-inline-submit, .pm-inline-danger {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.pm-inline-cancel {
  background: rgba(255,255,255,0.1);
  color: #aaa;
}
.pm-inline-cancel:hover { background: rgba(255,255,255,0.15); color: #fff; }
.pm-inline-submit {
  background: #ff9601;
  color: #fff;
}
.pm-inline-submit:hover { background: #ff8000; }
.pm-inline-danger {
  background: #f44336;
  color: #fff;
}
.pm-inline-danger:hover { background: #d32f2f; }
.pm-inline-submit:disabled, .pm-inline-danger:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.pm-inline-delete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.pm-delete-text {
  color: #f44336;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pm-delete-text i { font-size: 14px; }

/* ============================================ */
/* MOBILE OVERLAY                               */
/* ============================================ */
.pm-mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
}
.pm-mobile-overlay.show {
  display: block;
}
@media only screen and (min-width: 769px) {
  .pm-mobile-overlay { display: none !important; }
}

/* ============================================ */
/* MOBILE HEADER AUTH                           */
/* ============================================ */
.pm-mobile-header-right {
  display: flex;
  align-items: center;
  gap: 15px;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}
.pm-mobile-header-right .btn-search {
  position: static !important;
  margin: 0 !important;
}
#mobile-header {
  position: relative;
  z-index: 10001;
}
#mobile-header > .btn-search {
  display: none;
}
.pm-header-auth-mobile {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pm-auth-btn-mobile {
  background: none;
  border: none;
  color: #ff9601;
  font-size: 18px;
  padding: 6px;
  cursor: pointer;
  position: relative;
}
.pm-user-avatar-mobile {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8a00, #ff5500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  color: #fff;
  cursor: pointer;
}
.mobile-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #f44336;
  color: #fff;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 8px;
  min-width: 14px;
  text-align: center;
}

/* ============================================ */
/* MOBILE RESPONSIVE                            */
/* ============================================ */
@media only screen and (max-width: 768px) {
  .pm-header-right-wrapper {
    display: none;
  }
  .pm-header-auth {
    display: none;
  }
  
  /* Bottom sheet dropdowns */
  .pm-user-menu-dropdown {
    position: fixed;
    top: auto !important;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 80vh;
    border-radius: 20px 20px 0 0;
    animation: pmSlideUpMobile 0.3s ease;
  }
  .pm-notifications-dropdown {
    position: fixed;
    top: auto !important;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 70vh;
    border-radius: 20px 20px 0 0;
    animation: pmSlideUpMobile 0.3s ease;
  }
  @keyframes pmSlideUpMobile {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
  .pm-user-menu-header { padding: 20px; }
  .pm-user-avatar-large { width: 56px; height: 56px; font-size: 24px; }
  .pm-user-menu-name { font-size: 17px; }
  .pm-user-menu-item { padding: 16px 20px; font-size: 15px; }
  .pm-notification-item { padding: 16px 20px; }
  
  /* Film actions */
  .pm-film-actions {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin: 12px 0;
    padding: 8px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
  }
  .pm-action-btn { padding: 10px 4px; font-size: 11px; }
  .pm-action-btn i { font-size: 18px; }
  
  /* Comments */
  .pm-comments-section {
    padding: 15px;
    margin-top: 15px;
    border-radius: 0;
    margin-left: -15px;
    margin-right: -15px;
  }
  .pm-comments-header { flex-direction: column; align-items: flex-start; }
  .pm-comments-sort { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .pm-comments-sort::-webkit-scrollbar { display: none; }
  
  /* Comment form */
  .pm-comment-form { padding: 12px; border-radius: 10px; }
  .pm-comment-form textarea { min-height: 60px; font-size: 14px; }
  .pm-comment-form-footer { flex-wrap: wrap; gap: 10px; }
  .pm-guest-name { flex: 1; min-width: 120px; max-width: none; }
  .pm-spoiler-check { order: 3; width: 100%; justify-content: center; padding-top: 8px; border-top: 1px solid #2a2a2a; margin-top: 4px; }
  .pm-submit-btn { padding: 10px 24px; }
  
  /* Comments list */
  .pm-comment { padding: 12px; margin-bottom: 10px; }
  .pm-comment.reply { margin-left: 15px; }
  .pm-comment.reply::before { left: -12px; width: 8px; }
  .pm-reply-form { margin-left: 15px; padding: 10px; }
  .pm-replies-container { margin-left: 0; margin-top: 10px; border-radius: 8px; }
  .pm-replies-container .pm-comment.reply { padding: 10px 12px; }
  .pm-replies-container .pm-comment-content { margin-left: 36px; }
  .pm-replies-container .pm-comment-actions { margin-left: 36px; }
  .pm-show-replies-btn { margin-left: 0; }
  .pm-comment-actions { flex-wrap: nowrap; overflow-x: auto; }
  .pm-comment-action { flex-shrink: 0; padding: 6px 10px; font-size: 12px; }
  
  /* Modal full screen */
  .pm-modal { width: 100%; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
  .pm-modal-overlay { padding: 0; }
  
  /* Toast bottom */
  .pm-toast-container { top: auto; bottom: 20px; left: 10px; right: 10px; }
  .pm-toast { min-width: auto; width: 100%; }
  
  /* Load more */
  .pm-load-more { padding: 12px 20px; font-size: 13px; }
}

@media only screen and (max-width: 480px) {
  .pm-user-avatar { width: 28px; height: 28px; font-size: 12px; }
  .pm-auth-btn { width: 32px; height: 32px; font-size: 14px; }
  .pm-comment-avatar { width: 30px; height: 30px; font-size: 12px; }
  .pm-comment-name { font-size: 13px; }
  .pm-comment-content { font-size: 13px; }
  .pm-comment-time { font-size: 11px; }
}

/* Mobile search bar z-index fix */
.mobile-search-bar {
  z-index: 10002 !important;
}
.mobile-search-bar .close-button {
  z-index: 10003 !important;
  pointer-events: auto !important;
}

/* Modal close button mobile fix */
@media only screen and (max-width: 768px) {
  .pm-modal-close {
    width: 44px;
    height: 44px;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .pm-modal-header {
    padding: 15px 20px;
  }
}

.pm-member-page {
  display: flex;
  gap: 30px;
  padding: 30px 0;
  min-height: 60vh;
}
.pm-member-sidebar {
  width: 280px;
  flex-shrink: 0;
}
.pm-member-profile {
  background: linear-gradient(145deg, #1e1e1e, #151515);
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  margin-bottom: 20px;
  border: 1px solid #333;
}
.pm-member-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff9601, #ff6b00);
  color: #fff;
  font-size: 32px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
}
.pm-member-name {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
}
.pm-member-email {
  color: #888;
  font-size: 13px;
}
.pm-member-nav {
  background: linear-gradient(145deg, #1e1e1e, #151515);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #333;
}
.pm-member-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  color: #ccc;
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.pm-member-nav-item:hover {
  background: rgba(255,150,1,0.1);
  color: #ff9601;
}
.pm-member-nav-item.active {
  background: rgba(255,150,1,0.15);
  color: #ff9601;
  border-left-color: #ff9601;
}
.pm-member-nav-item.logout {
  color: #ff4444;
  border-top: 1px solid #333;
}
.pm-member-nav-item.logout:hover {
  background: rgba(255,68,68,0.1);
}
.pm-member-nav-item i {
  width: 20px;
  text-align: center;
}
.pm-member-content {
  flex: 1;
  min-width: 0;
}
.pm-member-header {
  margin-bottom: 25px;
}
.pm-member-title {
  color: #ff9601;
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}
.pm-member-body {
  background: linear-gradient(145deg, #1e1e1e, #151515);
  border-radius: 12px;
  padding: 25px;
  border: 1px solid #333;
}
.pm-member-loading {
  text-align: center;
  padding: 50px;
  color: #888;
}
.pm-member-empty {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}
.pm-member-empty i {
  font-size: 48px;
  margin-bottom: 15px;
  display: block;
}
.pm-film-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 15px;
}
.pm-film-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a1a;
  transition: all 0.3s;
}
.pm-film-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255,150,1,0.2);
}
.pm-film-card > a {
  display: block;
  position: relative;
}
.pm-film-card-thumb {
  position: relative;
  padding-top: 56.25%;
  overflow: hidden;
}
.pm-film-card-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.pm-film-card:hover .pm-film-card-thumb img {
  transform: scale(1.05);
}
.pm-film-card-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0,0,0,0.8);
  border: none;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pm-film-card:hover .pm-film-card-remove {
  opacity: 1;
}
.pm-film-card-remove:hover {
  background: #ff4444;
  transform: scale(1.1);
}
.pm-film-card-year {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255,150,1,0.9);
  color: #000;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  z-index: 5;
}
.pm-film-card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: rgba(255,150,1,0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.pm-film-card:hover .pm-film-card-play {
  opacity: 1;
}
.pm-film-card-play i {
  color: #000;
  font-size: 20px;
  margin-left: 3px;
}
.pm-film-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 12px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
}
.pm-film-card-title {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pm-film-card-title a {
  color: inherit;
  text-decoration: none;
}
.pm-film-card-title a:hover {
  color: #ff9601;
}
.pm-film-card-meta {
  display: none;
}
.pm-film-card-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(0,0,0,0.5);
  z-index: 10;
}
.pm-film-card-progress-bar {
  height: 100%;
  background: #ff9601;
}
.pm-settings-form {
  max-width: 500px;
}
.pm-settings-group {
  margin-bottom: 20px;
}
.pm-settings-label {
  display: block;
  color: #ccc;
  font-size: 13px;
  margin-bottom: 8px;
}
.pm-settings-input {
  width: 100%;
  padding: 12px 15px;
  background: #222;
  border: 1px solid #444;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
}
.pm-settings-input:focus {
  outline: none;
  border-color: #ff9601;
}
.pm-settings-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.pm-settings-btn {
  padding: 12px 30px;
  background: linear-gradient(135deg, #ff9601, #ff6b00);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}
.pm-settings-btn:hover {
  transform: translateY(-2px);
}
.pm-settings-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.pm-settings-section {
  border-top: 1px solid #333;
  padding-top: 25px;
  margin-top: 25px;
}
.pm-settings-section-title {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
}
.pm-settings-toggle {
  margin-bottom: 12px;
}
.pm-settings-toggle label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ccc;
  font-size: 14px;
  cursor: pointer;
}
.pm-settings-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #ff9601;
  cursor: pointer;
}
.pm-settings-group .pm-settings-label i {
  width: 20px;
  color: #ff9601;
  margin-right: 8px;
}
.pm-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 25px;
}
.pm-pagination-btn {
  padding: 8px 16px;
  background: #333;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
.pm-pagination-btn:hover {
  background: #444;
}
.pm-pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.pm-pagination-info {
  padding: 8px 16px;
  color: #888;
}
@media (max-width: 768px) {
  .pm-member-page {
    flex-direction: column;
    padding: 15px 0;
  }
  .pm-member-sidebar {
    width: 100%;
  }
  .pm-member-nav {
    display: flex;
    flex-wrap: wrap;
  }
  .pm-member-nav-item {
    flex: 1;
    min-width: 50%;
    justify-content: center;
    padding: 12px;
    border-left: none;
    border-bottom: 3px solid transparent;
  }
  .pm-member-nav-item.active {
    border-left-color: transparent;
    border-bottom-color: #ff9601;
  }
  .pm-member-nav-item span {
    display: none;
  }
  .pm-member-nav-item i {
    font-size: 18px;
  }
  .pm-film-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
  }
}

/* ============================================ */
/* CONTINUE WATCHING - TRANG CHỦ               */
/* ============================================ */
.pm-continue-block {
  margin-bottom: 20px;
}
.pm-continue-item a {
  position: relative;
  display: block;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
}
.pm-continue-item a img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pm-continue-item a p {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
  z-index: 3;
}
.pm-continue-item a .icon-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
}
.pm-progress-bar {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(0,0,0,0.7);
  z-index: 5;
}
.pm-progress {
  height: 100%;
  background: linear-gradient(90deg, #ff9601, #ff6b00);
  border-radius: 0 2px 2px 0;
  transition: width 0.3s;
}

/* ============================================ */
/* AVATAR SYSTEM                                */
/* ============================================ */
.pm-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.pm-user-avatar .pm-avatar-img,
.pm-user-avatar-mobile .pm-avatar-img {
  width: 32px;
  height: 32px;
}
.pm-comment-avatar .pm-avatar-img {
  width: 40px;
  height: 40px;
}
.pm-comment-avatar.has-avatar {
  background: transparent;
}

/* Avatar Picker Preview in Settings */
.pm-avatar-picker-preview {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 15px 0;
}
.pm-avatar-current {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8a00, #ff5500);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px solid #ff9601;
  box-shadow: 0 4px 15px rgba(255, 150, 1, 0.3);
}
.pm-avatar-current img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pm-avatar-current .pm-avatar-initial {
  font-size: 32px;
  font-weight: bold;
  color: #fff;
}
.pm-btn-secondary {
  background: transparent !important;
  border: 1px solid #ff9601 !important;
  color: #ff9601 !important;
}
.pm-btn-secondary:hover {
  background: rgba(255, 150, 1, 0.1) !important;
}

/* Avatar Picker Modal */
.pm-avatar-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pm-avatar-modal.active {
  display: flex;
}
.pm-avatar-modal-content {
  background: linear-gradient(145deg, #1e1e1e, #151515);
  border: 1px solid #333;
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease;
}
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.pm-avatar-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #333;
}
.pm-avatar-modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: #fff;
}
.pm-avatar-close {
  background: none;
  border: none;
  color: #888;
  font-size: 20px;
  cursor: pointer;
  padding: 5px 10px;
  transition: color 0.2s;
}
.pm-avatar-close:hover {
  color: #ff9601;
}
.pm-avatar-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.pm-avatar-category {
  margin-bottom: 25px;
}
.pm-avatar-category:last-child {
  margin-bottom: 0;
}
.pm-avatar-category-title {
  font-size: 14px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 1px solid #333;
}
.pm-avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 12px;
}
.pm-avatar-option {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.2s;
  background: #252525;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pm-avatar-option:hover {
  border-color: #555;
  transform: scale(1.05);
}
.pm-avatar-option.selected {
  border-color: #ff9601;
  box-shadow: 0 0 15px rgba(255, 150, 1, 0.4);
}
.pm-avatar-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pm-avatar-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid #333;
}
.pm-avatar-modal-footer .pm-settings-btn {
  min-width: 100px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .pm-avatar-modal {
    padding: 10px;
  }
  .pm-avatar-modal-content {
    max-height: 90vh;
    border-radius: 12px;
  }
  .pm-avatar-grid {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
  }
  .pm-avatar-option {
    width: 60px;
    height: 60px;
  }
  .pm-avatar-picker-preview {
    flex-direction: column;
    text-align: center;
  }
  .pm-avatar-current {
    width: 100px;
    height: 100px;
  }
  .pm-avatar-current .pm-avatar-initial {
    font-size: 40px;
  }
}

/* ============================================ */
/* SHARE MODAL                                   */
/* ============================================ */
.pm-share-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.pm-share-modal.active {
  display: flex;
}
.pm-share-modal-content {
  background: linear-gradient(145deg, #1e1e1e, #252525);
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid #333;
}
.pm-share-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid #333;
  background: rgba(255, 150, 1, 0.05);
}
.pm-share-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pm-share-modal-header h3 i {
  color: #ff9601;
}
.pm-share-close {
  background: none;
  border: none;
  color: #888;
  font-size: 20px;
  cursor: pointer;
  padding: 5px;
  transition: color 0.2s;
}
.pm-share-close:hover {
  color: #fff;
}
.pm-share-modal-body {
  padding: 25px;
  overflow-y: auto;
  flex: 1;
}
.pm-share-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
  margin-bottom: 10px;
}
.pm-share-link-section {
  margin-bottom: 25px;
}
.pm-share-link-box {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.pm-share-link-input {
  flex: 1;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 12px 15px;
  color: #fff;
  font-size: 14px;
  font-family: 'Consolas', monospace;
}
.pm-share-link-input:focus {
  outline: none;
  border-color: #ff9601;
}
.pm-share-copy-btn {
  background: #ff9601;
  border: none;
  border-radius: 8px;
  padding: 12px 18px;
  color: #000;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.pm-share-copy-btn:hover {
  background: #ffad33;
  transform: scale(1.05);
}
.pm-share-stats {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: #888;
}
.pm-share-stats span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pm-share-stats i {
  color: #ff9601;
}
.pm-share-social {
  margin-bottom: 25px;
  padding-bottom: 25px;
  border-bottom: 1px solid #333;
}
.pm-share-social-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pm-share-social-btn {
  flex: 1;
  min-width: 120px;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}
.pm-share-fb {
  background: #1877f2;
  color: #fff;
}
.pm-share-fb:hover {
  background: #166fe5;
  transform: translateY(-2px);
}
.pm-share-tw {
  background: #1da1f2;
  color: #fff;
}
.pm-share-tw:hover {
  background: #1a91da;
  transform: translateY(-2px);
}
.pm-share-tg {
  background: #0088cc;
  color: #fff;
}
.pm-share-tg:hover {
  background: #007ab8;
  transform: translateY(-2px);
}
.pm-share-settings {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.pm-share-setting-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pm-share-setting-row label {
  font-size: 13px;
  color: #aaa;
}
.pm-share-input {
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 12px 15px;
  color: #fff;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}
.pm-share-input:focus {
  outline: none;
  border-color: #ff9601;
}
.pm-share-textarea {
  min-height: 80px;
  resize: vertical;
  font-family: inherit;
}
.pm-share-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: #ccc;
}
.pm-share-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #ff9601;
  cursor: pointer;
}
.pm-share-select {
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 10px 15px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
}
.pm-share-select:focus {
  outline: none;
  border-color: #ff9601;
}
.pm-share-empty {
  text-align: center;
  padding: 30px 20px;
}
.pm-share-empty > i {
  font-size: 60px;
  color: #ff9601;
  margin-bottom: 20px;
  display: block;
}
.pm-share-empty p {
  font-size: 16px;
  color: #ccc;
  margin-bottom: 25px;
}
.pm-share-features {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  display: inline-block;
}
.pm-share-features li {
  padding: 8px 0;
  color: #888;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pm-share-features li i {
  color: #4caf50;
}
.pm-share-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 25px;
  border-top: 1px solid #333;
  background: rgba(0, 0, 0, 0.2);
}
.pm-share-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.pm-share-btn-primary {
  background: #ff9601;
  color: #000;
}
.pm-share-btn-primary:hover {
  background: #ffad33;
}
.pm-share-btn-secondary {
  background: #333;
  color: #fff;
}
.pm-share-btn-secondary:hover {
  background: #444;
}
.pm-share-btn-danger {
  background: transparent;
  color: #f44336;
  border: 1px solid #f44336;
}
.pm-share-btn-danger:hover {
  background: #f44336;
  color: #fff;
}

/* Share button in member panel */
.pm-member-actions {
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pm-member-share-btn {
  background: linear-gradient(135deg, #ff9601, #ff6b00);
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.pm-member-share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(255, 150, 1, 0.3);
}
.pm-member-share-btn.active {
  background: linear-gradient(135deg, #4caf50, #388e3c);
}

/* Share modal mobile */
@media (max-width: 600px) {
  .pm-share-modal {
    padding: 10px;
  }
  .pm-share-modal-content {
    max-height: 95vh;
    border-radius: 12px;
  }
  .pm-share-modal-header {
    padding: 15px 20px;
  }
  .pm-share-modal-header h3 {
    font-size: 16px;
  }
  .pm-share-modal-body {
    padding: 20px;
  }
  .pm-share-social-btns {
    flex-direction: column;
  }
  .pm-share-social-btn {
    min-width: 100%;
  }
  .pm-share-modal-footer {
    padding: 15px 20px;
    flex-wrap: wrap;
  }
  .pm-share-btn {
    flex: 1;
    min-width: calc(50% - 5px);
    justify-content: center;
  }
}
