/* ============================================
   AI Linghang Ju - Author Page Styles (Three-Section Layout)
   ============================================ */

/* Author page background */
body.author .main {
  background-color: #f5f5f5;
}

/* ============================================
   Part 1: Header Section - Gray Background, Left-Right Layout
   ============================================ */

.ailhj-author-header {
  padding: 50px 0;
}

.ailhj-author-info-wrapper {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: center;
}

/* Left Side - User Info */

.ailhj-author-left {
  min-width: 0;
  display: flex;
  gap: 15px;
  flex-direction: row;
  align-items: flex-start;
}

.ailhj-author-avatar {
  flex: 0 0 100px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background: #fff;
}

.ailhj-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ailhj-author-details {
  flex: 1 1 auto;
  min-width: 0;
}

.ailhj-author-name {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.ailhj-author-name .display-name {
  font-size: 24px;
  font-weight: 600;
  color: var(--body-color);
  line-height: 1.2;
}

.ailhj-author-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ailhj-author-badges .badg {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
}

.ailhj-author-registered {
  font-size: 14px;
  color: var(--muted-color);
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.ailhj-author-desc {
  font-size: 14px;
  color: var(--muted-color);
  line-height: 1.7;
  margin-bottom: 16px;
}

.ailhj-author-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ailhj-author-actions .but {
  font-size: 14px;
  padding: 8px 20px;
  border-radius: 6px;
}

/* Right Side - Stats */
.ailhj-author-right {
  display: flex;
  align-items: center;
  justify-self: end;
}

.ailhj-author-stats {
  display: flex;
  gap: 50px;
  align-items: center;
}

.ailhj-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ailhj-stat-value {
  font-size: 40px;
  font-weight: 700;
  color: var(--muted-color);
  line-height: 1;
}

.ailhj-stat-label {
  font-size: 13px;
  color: var(--muted-color);
  font-weight: 400;
}

/* ============================================
   Part 2: Tab Navigation - White Background
   ============================================ */

.ailhj-author-tabs {
  background: #fff;
}

.ailhj-author-tab-nav {
  display: flex;
  overflow-x: auto;
  gap: 8px;
}

.ailhj-author-tab-nav::-webkit-scrollbar {
  display: none;
}

.ailhj-author-tab {
  position: relative;
  padding: 0;
  margin-top: 16px;
  padding-bottom: 16px;
  margin-right: 20px;
  font-size: 16px;
  font-weight: 500;
  color: var(--muted-color);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.ailhj-author-tab:hover {
  color: var(--ailhj-blue);
}

.ailhj-author-tab.active {
  color: var(--ailhj-blue);
  border-bottom-color: var(--ailhj-blue);
}

.ailhj-author-tab .count {
  font-size: 13px;
  opacity: 0.7;
  margin-left: 4px;
  font-weight: 400;
}

/* ============================================
   Part 3: Content Area - Gray Background (Full Width)
   ============================================ */

.ailhj-author-tab-content {
  background: var(--body-bg-color);
  padding: 30px 0;
  min-height: 400px;
}

.ailhj-author-pane {
  display: none;
}

.ailhj-author-pane.active {
  display: block;
}

/* ============================================
   Empty State
   ============================================ */

.ailhj-author-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted-color);
  font-size: 14px;
}

.ailhj-author-empty i {
  font-size: 56px;
  opacity: 0.2;
  margin-bottom: 20px;
  display: block;
}

/* ============================================
   Loading State
   ============================================ */

.ailhj-author-loading {
  padding: 40px 0;
  text-align: center;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 992px) {
  .ailhj-author-info-wrapper {
    flex-direction: column;
    gap: 30px;
  }

  .ailhj-author-left {
    max-width: 100%;
    flex-direction: row;
  }

  .ailhj-author-right {
    width: 100%;
  }

  .ailhj-author-stats {
    justify-content: flex-start;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .ailhj-author-header {
    padding: 30px 0;
  }

  .ailhj-author-avatar {
    width: 80px;
    height: 80px;
  }

  .ailhj-author-name .display-name {
    font-size: 20px;
  }

  .ailhj-author-stats {
    gap: 30px;
  }

  .ailhj-stat-value {
    font-size: 24px;
  }

  .ailhj-stat-label {
    font-size: 12px;
  }

  .ailhj-author-tab {
    padding: 14px 20px;
    font-size: 14px;
  }

  .ailhj-author-tab-content {
    padding: 24px 0;
  }
}

@media (max-width: 576px) {
  .ailhj-author-header {
    padding: 20px 0;
  }

  .ailhj-author-info-wrapper {
    gap: 20px;
  }

  .ailhj-author-left {
    flex-direction: row;
    gap: 16px;
  }

  .ailhj-author-avatar {
    flex: 0 0 70px;
    width: 70px;
    height: 70px;
  }

  .ailhj-author-name .display-name {
    font-size: 18px;
  }

  .ailhj-author-stats {
    gap: 24px;
    flex-wrap: wrap;
  }

  .ailhj-stat-value {
    font-size: 20px;
  }

  .ailhj-author-actions {
    flex-direction: column;
    width: 100%;
  }

  .ailhj-author-actions .but {
    width: 100%;
  }

  .ailhj-author-tab {
    padding: 12px 16px;
    font-size: 13px;
  }

  .ailhj-author-tab-content {
    padding: 20px 0;
    background: none;
    padding-top: 0px;

  }
}


/* ============================================
   Posts Grid Layout (5 Columns)
   ============================================ */

.ailhj-author-posts-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.ailhj-author-post-card {
  background: #fff;
  border-radius: 8px;
  overflow: visible;
  padding: 20px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.ailhj-author-post-card:hover {
  transform: translateY(-2px);
}

.ailhj-author-post-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f5f5f5;
  position: relative;
  border-radius: 8px;
}

.ailhj-author-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.ailhj-author-post-card:hover .ailhj-author-post-thumb img {
  transform: scale(1.05);
}

.ailhj-author-post-content {
  padding: 12px 0 0 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ailhj-author-post-category-wrap {
  margin-bottom: 8px;
}

.ailhj-author-post-category {
  display: inline-block;
  font-size: 12px;
  color: var(--ailhj-blue);
  background: var(--ailhj-blue-op1);
  padding: 3px 10px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.ailhj-author-post-category:hover {
  background: var(--ailhj-blue-op15);
  color: var(--ailhj-blue);
}

.ailhj-author-post-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 10px 0;
  flex: 1;
}

.ailhj-author-post-title a {
  color: var(--body-color);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ailhj-author-post-title a:hover {
  color: var(--ailhj-blue);
}

.ailhj-author-post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted-color);
  padding-top: 10px;
  flex-wrap: wrap;
}

.ailhj-author-post-meta .meta-item {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.ailhj-author-post-meta .meta-date {
  margin-left: auto;
}

/* Grid Responsive */
@media (max-width: 1200px) {
  .ailhj-author-posts-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  .ailhj-author-posts-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .ailhj-author-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  /* Hide PC Layout on Mobile */
  .ailhj-author-header:not(.ailhj-author-header-mobile) {
    display: none;
  }
  
  /* Mobile Header Layout */
  .ailhj-author-header-mobile {
    padding: 60px 0 0px 0;
  }
  
  .ailhj-author-header-mobile .container {
    padding: 0 16px;
  }
  
  /* Mobile Card */
  .ailhj-author-mobile-card {
    background: #fff;
    border-radius: 12px;
    padding: 60px 16px 16px 16px;
    position: relative;
  }
  
  /* Floating Avatar */
  .ailhj-author-mobile-avatar {
    position: absolute;
    top: -40px;
    left: 16px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    z-index: 2;
  }
  
  .ailhj-author-mobile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  /* Top Right Actions */
  .ailhj-author-mobile-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    z-index: 1;
  }
  
  .ailhj-author-mobile-actions .but {
    font-size: 12px;
    padding: 5px 12px;
    white-space: nowrap;
  }
  
  .ailhj-author-mobile-actions .but i {
    font-size: 12px;
  }
  
  /* User Info - Center Aligned */
  .ailhj-author-mobile-info {
    text-align: left;
    padding: 0 0 16px 0;
  }
  
  .ailhj-author-mobile-info .ailhj-author-name {
    justify-content: flex-start;
    margin-bottom: 8px;
  }
  
  .ailhj-author-mobile-info .display-name {
    font-size: 18px;
  }
  
  .ailhj-author-mobile-info .ailhj-author-registered {
    justify-content: flex-start;
    margin-bottom: 8px;
    font-size: 12px;
  }
  
  .ailhj-author-mobile-info .ailhj-author-desc {
    font-size: 13px;
    line-height: 1.6;
  }
  
  /* Bottom Stats Row */
  .ailhj-author-mobile-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
  }
  
  .ailhj-author-mobile-stats .ailhj-stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  
  .ailhj-author-mobile-stats .ailhj-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--key-color);
    line-height: 1;
  }
  
  .ailhj-author-mobile-stats .ailhj-stat-label {
    font-size: 12px;
    color: var(--muted-color);
  }
  
  /* Posts Grid */
  .ailhj-author-posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .ailhj-author-post-category-wrap {
    display: none;
  }
  
  .ailhj-author-post-title {
    font-size: 14px;
  }
  
  .ailhj-author-post-meta {
    font-size: 11px;
    gap: 8px;
  }
}


/* Mobile Tab Navigation - Capsule Style */
@media (max-width: 576px) {
  .ailhj-author-tabs {
    background: transparent;
    border: none;
    padding: 16px 0;
  }
  
  .ailhj-author-tabs .container {
    padding: 0 16px;
  }
  
  .ailhj-author-tab-nav {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 4px;
    display: flex;
    gap: 0;
    overflow: visible;
  }
  
  .ailhj-author-tab {
    flex: 1;
    padding: 10px 12px;
    margin-top: 0;
    margin-right: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted-color);
    text-align: center;
    border-radius: 8px;
    border-bottom: none;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
  }
  
  .ailhj-author-tab:hover {
    color: var(--body-color);
  }
  
  .ailhj-author-tab.active {
    color: var(--muted-color);
    background: #fff;
    border-bottom: none;
  }
  
  .ailhj-author-tab .count {
    display: none;
  }
}


/* Mobile Page - Hide Default Header and Footer */
@media (max-width: 576px) {
  body.author .header-wrapper,
  body.author .footer-tabbar {
    display: none !important;
  }
  body.author .header{
    padding: 0;
  }
  
  body.author .main {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
}

/* Mobile Custom Navbar */
.ailhj-author-mobile-navbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  z-index: 999;
}

@media (max-width: 576px) {
  .ailhj-author-mobile-navbar {
    display: block;
  }
  
  body.author .ailhj-author-header-mobile {
    padding-top: 70px;
  }
}

.ailhj-navbar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 16px;
  position: relative;
}

.ailhj-navbar-back {
  position: absolute;
  left: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--body-color);
  font-size: 20px;
  transition: all 0.2s ease;
  border-radius: 50%;
  cursor: pointer;
}

.ailhj-navbar-back:hover {
  color: var(--ailhj-blue);
  background: var(--ailhj-blue-op05);
}

.ailhj-navbar-back:active {
  background: var(--ailhj-blue-op1);
}

.ailhj-navbar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--body-color);
}

.ailhj-navbar-placeholder {
  width: 40px;
}
