/* ==========================================================================
   RESPONSIVE DESIGN SYSTEM (PC & MOBILE)
   ========================================================================== */

/* Medium Screens & Tablets (max-width: 1024px) */
@media screen and (max-width: 1024px) {
  .nav-menu {
    display: none !important;
  }
}

@media screen and (max-width: 860px) {
  .site-header {
    min-height: 58px;
    height: auto;
    padding: 6px 20px;
  }

  .main-container {
    flex-direction: column;
    padding: 30px 16px 60px 16px;
    gap: 20px;
    max-width: 100%;
  }

  .content-sidebar {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    position: static;
  }

  .content-main {
    width: 100%;
  }

  .hero-title {
    font-size: 2.6rem;
  }
}

/* Mobile Screens (max-width: 768px) */
@media screen and (max-width: 768px) {
  .site-header {
    min-height: 58px;
    height: auto;
    padding: 6px 16px;
  }

  .site-logo {
    gap: 10px;
    max-width: calc(100vw - 120px);
  }

  .site-logo .site-logo-image {
    height: var(--logo-height-mobile, 48px) !important;
    max-height: var(--logo-height-mobile, 48px) !important;
    width: auto !important;
    max-width: 280px !important;
    object-fit: contain !important;
    object-position: left center !important;
    image-rendering: -webkit-optimize-contrast;
  }

  .site-logo.logo-only .site-logo-image {
    max-width: min(340px, 70vw) !important;
  }

  .site-logo .logo-text {
    font-size: 1.25rem !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-brand {
    font-size: 1.05rem;
  }

  .brand-icon {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .header-btn {
    width: 36px;
    height: 36px;
  }

  /* Responsive hero section */
  .hero {
    height: 100vh;
    width: 100%;
    margin-top: -58px;
    padding-top: 58px;
  }

  .hero .hero-content {
    margin-top: 14px;
    padding: 0 16px;
  }

  .hero .hero-tg-btn {
    margin-top: 16px;
    margin-bottom: 4px;
  }

  .hero .hero-tg-btn .tg-btn-inner {
    padding: 9px 20px 9px 14px;
    gap: 8px;
  }

  .hero .hero-tg-btn .tg-icon-wrap {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .hero .hero-tg-btn .tg-btn-text {
    font-size: 13.5px;
  }

  .hero .hero-sub {
    font-size: 11px;
    letter-spacing: 2px;
  }

  .hero .hero-title {
    font-size: 28px;
    max-width: 340px;
  }

  .hero .hero-typewriter {
    font-size: 0.78rem;
    line-height: 1.5;
  }

  .hero .hero-quick-channels {
    gap: 16px;
    margin: 14px auto 2px;
    padding: 4px 6px;
  }

  .hero .hero-quick-ch-btn {
    min-width: 64px;
  }

  .hero .quick-ch-circle {
    width: 44px;
    height: 44px;
    font-size: 18px;
    border-width: 1px;
  }

  .hero .quick-ch-name {
    font-size: 10.5px;
    margin-top: 5px;
  }

  .hero .scroll-hint {
    margin-top: 20px;
  }

  .hero .scroll-hint .scroll-hint-text {
    font-size: 11px;
  }

  .hero .scroll-hint .scroll-arrow {
    font-size: 18px;
  }

  .hero .waves-container {
    height: 14vh;
    min-height: 50px;
    max-height: 90px;
  }

  /* Main Container Mobile */
  .main-container {
    padding: 24px 14px 50px 14px;
    gap: 18px;
  }

  /* Notice */
  .notice-banner {
    padding: 12px 14px;
  }

  .notice-content {
    font-size: 0.86rem;
  }

  /* Profile Card Mobile */
  .profile-card.el-card .el-card__body {
    padding: 22px 16px 18px !important;
  }

  .profile-avatar-wrap {
    width: 88px;
    height: 88px;
    margin: 2px auto 12px;
  }

  .profile-name {
    font-size: 1.2rem;
  }

  .profile-motto {
    font-size: 0.82rem;
    margin-bottom: 16px;
  }

  .profile-stats-grid {
    margin-bottom: 16px;
    padding: 4px 0;
  }

  .stat-num {
    font-size: 1.18rem;
  }

  .stat-label {
    font-size: 0.74rem;
  }

  .profile-follow-btn.el-button {
    width: 100% !important;
    height: 38px !important;
    font-size: 0.88rem !important;
    margin-bottom: 14px !important;
  }

  /* Generic Widgets */
  .widget-card {
    padding: 20px 16px;
  }

  .widget-title {
    font-size: 0.96rem;
    margin-bottom: 14px;
    padding-bottom: 10px;
  }

  /* Channel Item Mobile */
  .channel-item {
    padding: 12px 14px;
    gap: 10px;
    font-size: 0.88rem;
  }

  .channel-left {
    gap: 10px;
    min-width: 0;
    flex: 1;
  }

  .channel-icon-pill {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 0.8rem;
    flex-shrink: 0;
  }

  .channel-name {
    font-size: 0.88rem;
    line-height: 1.35;
  }

  .channel-description {
    font-size: 0.75rem;
  }

  .event-item {
    grid-template-columns: 1fr 18px;
    gap: 10px;
  }

  .event-date {
    grid-column: 1 / -1;
    font-size: 0.7rem;
  }

  .platform-list {
    grid-template-columns: 1fr;
  }

  .platform-link,
  .platform-link:nth-child(odd),
  .platform-link:nth-child(even) {
    min-height: 0;
    padding: 14px 0;
    border-right: 0;
    border-bottom: 1px solid var(--border-glass);
  }

  .platform-link:last-child {
    border-bottom: 0;
  }

  .channel-right {
    gap: 8px;
    flex-shrink: 0;
  }

  .channel-count {
    font-size: 0.75rem;
    padding: 3px 10px;
    white-space: nowrap;
    border-radius: 999px;
  }

  .channel-arrow {
    font-size: 0.78rem;
    flex-shrink: 0;
  }

  /* Tag Cloud Mobile */
  .cloud-tag {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  /* Back to Top Mobile */
  .back-to-top-btn {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }

  .scroll-percent-text {
    font-size: 0.68rem;
  }

  /* Footer Mobile */
  .site-footer {
    padding: 36px 16px 76px;
    font-size: 0.82rem;
  }

  .footer-inner {
    gap: 16px;
  }

  .footer-meta-item.copyright-line {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
  }

  .footer-separator {
    display: none;
  }

  .footer-runtime {
    padding: 12px 14px;
    font-size: 0.8rem;
    flex-direction: column;
    gap: 10px;
    border-radius: 14px;
    width: 100%;
  }

  .footer-runtime .runtime-prefix {
    margin-bottom: 2px;
  }

  .footer-runtime .cat-emote {
    margin-left: 0;
  }

  .footer-badges-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 10px;
    width: 100%;
    margin-top: 6px;
  }

  .shield-badge {
    font-size: 11px;
    width: auto;
    max-width: 100%;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  }

  .shield-badge .badge-left {
    padding: 5.5px 8.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
  }

  .shield-badge .badge-right {
    padding: 5.5px 8.5px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
  }
}

/* Small Smartphone (max-width: 540px) */
@media screen and (max-width: 540px) {
  .site-header {
    min-height: 54px;
    height: auto;
    padding: 6px 12px;
  }

  .site-logo {
    gap: 8px;
    max-width: calc(100vw - 100px);
  }

  .site-logo .site-logo-image {
    height: var(--logo-height-mobile, 46px) !important;
    max-height: var(--logo-height-mobile, 46px) !important;
    width: auto !important;
    max-width: 240px !important;
    object-fit: contain !important;
    object-position: left center !important;
  }

  .site-logo.logo-only .site-logo-image {
    max-width: min(300px, 72vw) !important;
  }

  .site-logo .logo-text {
    font-size: 1.15rem !important;
  }

  .header-actions {
    gap: 6px;
  }

  .auth-btn {
    padding: 4px 10px;
    font-size: 12px;
  }
}

/* Extra Small Smartphone (max-width: 420px) */
@media screen and (max-width: 420px) {
  .site-logo {
    gap: 6px;
    max-width: calc(100vw - 88px);
  }

  .site-logo .site-logo-image {
    height: var(--logo-height-mobile, 44px) !important;
    max-height: var(--logo-height-mobile, 44px) !important;
    width: auto !important;
    max-width: 210px !important;
    object-fit: contain !important;
    object-position: left center !important;
  }

  .site-logo.logo-only .site-logo-image {
    max-width: min(260px, 72vw) !important;
  }

  .site-logo .logo-text {
    font-size: 1.05rem !important;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-badge-pill {
    font-size: 0.95rem;
    padding: 5px 18px;
    letter-spacing: 2px;
  }

  .hero-subtitle {
    font-size: 0.72rem;
    letter-spacing: 2px;
  }

  .channel-item {
    padding: 10px 12px;
    gap: 8px;
  }

  .channel-name {
    font-size: 0.82rem;
    line-height: 1.3;
  }

  .channel-count {
    padding: 3px 8px;
    font-size: 0.72rem;
    white-space: nowrap;
  }
}