/* KKY Theme - Main CSS
 * Author: KKY Cloud Team
 * Description: KKY Cloud theme main styles
 */

/* ==================== Header ==================== */
.kky-header {
  width: 100%;
  height: 60px;
  background: #ffffff;
  border-bottom: 1px solid #f0f0f0;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  align-items: stretch;
}

.kky-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
  height: 100%;
  width: 100%;
  padding: 0 150px 0 50px;
  position: relative;
}

.kky-header .header-inner.logged-in {
  padding-right: 0;
}

/* Logo */
.kky-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 30px;
}

.kky-logo a {
  display: block;
  line-height: 0;
}

.kky-logo img {
  height: 50px;
  width: auto;
  display: block;
}

/* Main Navigation */
.kky-nav {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  height: 100%;
  margin-left: 100px;
}

.kky-nav-list {
  display: flex;
  align-items: center;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: nowrap;
}

.kky-nav-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 90px;
}

.kky-nav-item > a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 22px;
  font-size: 16px;
  color: #333333;
  font-weight: 500;
  position: relative;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.kky-nav-item > a:hover,
.kky-nav-item.active > a {
  color: #2B5BFF;
}

.kky-nav-item > a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: #2B5BFF;
  transition: width 0.3s ease;
}

.kky-nav-item.active > a::after,
.kky-nav-item > a:hover::after {
  width: 60%;
}

.kky-nav-item .caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 6px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #999;
  transition: transform 0.2s ease;
  vertical-align: middle;
}

.kky-nav-item:hover .caret {
  transform: rotate(180deg);
  border-top-color: #2B5BFF;
}

/* No-sub nav item: no dropdown, no caret */
.kky-nav-item.no-sub .caret,
.kky-nav-item.no-sub .mega-menu {
  display: none;
}

/* HOT Badge */
.hot-tag {
  position: absolute;
  top: 12px;
  right: 2px;
  background: #ff4757;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px 8px 8px 0;
  line-height: 1.3;
  letter-spacing: 0.5px;
  z-index: 1;
}

/* ==================== Mega Menu (Dropdown) ==================== */
.kky-nav-item .mega-menu {
  position: fixed;
  top: 59px;                       /* 紧贴头部底部（头部高度 59px） */
  bottom: 20%;                     /* 底部 20% 留空 */
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  display: none;
  z-index: 1000;
  margin-top: 0;
  overflow: hidden;
}

.kky-nav-item:hover .mega-menu {
  display: block;
  animation: megaFadeIn 0.18s ease;
}

@keyframes megaFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mega-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: #999;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s ease;
  z-index: 5;
}

.mega-close svg {
  display: block;
  width: 14px;
  height: 14px;
}

.mega-close:hover {
  background: #f5f5f5;
  color: #333;
}

.mega-inner {
  display: flex;
  height: 100%;
  margin: 0 auto;
}

/* Sidebar */
.mega-sidebar {
  width: 300px;
  background: linear-gradient(180deg, #f4f7ff 0%, #eaf0ff 100%);
  padding: 24px 0;
  flex-shrink: 0;
  border-right: 1px solid #eef0f5;
}

.mega-sidebar-title {
  padding: 0 28px 16px 32px;
  font-size: 22px;
  font-weight: 600;
  color: #2B5BFF;
  border-bottom: 1px solid rgba(43, 91, 255, 0.15);
  margin-bottom: 12px;
  text-align: center;
}

.mega-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-cat-item {
  position: relative;
  margin: 0;
}

.mega-cat-item a {
  display: block;
  padding: 12px 28px 12px 32px;
  font-size: 14px;
  color: #555;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}

.mega-cat-item a:hover {
  color: #2B5BFF;
  background: rgba(255, 255, 255, 0.6);
}

.mega-cat-item.active a {
  color: #2B5BFF;
  background: #fff;
  border-left-color: #2B5BFF;
  font-weight: 600;
}

/* Content */
.mega-content {
  flex: 1;
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* 介绍文字（侧边栏）- 纯文字介绍样式 */
.mega-sidebar-intro {
  margin: 8px 16px 18px;
  padding: 12px 14px;
  background: transparent;
  border: none;
  color: #5a6a85;
  font-size: 19px;
  line-height: 1.8;
  letter-spacing: 0.2px;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}

/* Search bar */
.mega-search-bar {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 8px 0 16px;
  background: #f5f7fa;
  border-radius: 22px;
  border: 1px solid #e8eaef;
  transition: border-color 0.2s ease;
}

.mega-search-bar:focus-within {
  border-color: #2B5BFF;
  background: #fff;
}

.mega-search-bar svg {
  flex-shrink: 0;
  margin-right: 8px;
}

.mega-search-input {
  flex: 1;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 14px;
  color: #333;
  min-width: 0;
}

.mega-search-input::placeholder {
  color: #999;
}

.mega-search-btn {
  flex-shrink: 0;
  height: 32px;
  padding: 0 18px;
  background: #2B5BFF;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.mega-search-btn:hover {
  background: #1E47E5;
}

/* Cards */
.mega-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.mega-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: #fafbfc;
  border: 1px solid #eef0f5;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
  transition: all 0.2s ease;
  min-width: 140px;
}

.mega-card:hover {
  border-color: #2B5BFF;
  background: #f5f7ff;
  color: #2B5BFF;
  transform: translateY(-1px);
}

.mega-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #fff5f5;
  border-radius: 6px;
  font-size: 16px;
  flex-shrink: 0;
}

.mega-card-text {
  font-weight: 500;
}

/* ==================== Mega Menu Sub-pane (三级菜单) ==================== */
.mega-sub-pane {
  display: none;
}

.mega-sub-pane.active {
  display: block;
  animation: megaPaneFade 0.18s ease;
}

@keyframes megaPaneFade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mega-sub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 14px;
}

/* ==================== Mega Menu Group Layout (一级分组嵌套二级) ==================== */
.mega-group-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px 36px;
}

.mega-group-section {
  position: relative;
  transition: opacity 0.2s ease;
  grid-column: 1 / -1;
}

.mega-group-section.mega-group-dim {
  opacity: 0.35;
}

.mega-group-section.mega-group-hidden {
  display: none;
}

.mega-group-section .mega-group-title {
  display: none;
}

/* 无二级菜单的一级菜单区域 - 卡片宽度和起始位置与有二级菜单保持一致 */
.mega-group-section.mega-single-section {
  grid-column: 1 / -1;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.mega-group-section.mega-single-section .mega-group-items {
  grid-template-columns: repeat(4, 200px);
}

.mega-group-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: #2B5BFF;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef0f5;
  position: relative;
}

.mega-group-title::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 24px;
  height: 2px;
  background: #2B5BFF;
  border-radius: 1px;
}

.mega-group-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.mega-sub-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  max-width: 260px;
  height: 120px;
  padding: 16px 18px;
  background: #f4f7ff;
  border: 1px solid transparent;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  font-size: 13px;
  transition: all 0.2s ease;
  gap: 8px;
}

.mega-sub-card:hover {
  border-color: #d6e0ff;
  background: #f5f7ff;
  color: #2B5BFF;
  transform: translateX(2px);
}

.mega-sub-top {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.mega-sub-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #ff4757;
  color: #fff;
  font-size: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}

.mega-sub-card.mega-sub-single {
  background: linear-gradient(135deg, #f4f7ff 0%, #eaf0ff 100%);
  border-color: #d6e0ff;
  font-weight: 500;
  padding: 14px 18px;
}

.mega-sub-name {
  font-weight: 500;
  margin-bottom: 4px;
  margin-top: 0;
  line-height: 1.3;
}

.mega-sub-tagline {
  font-size: 12px;
  color: #888;
  line-height: 1.5;
  word-break: break-all;
  word-wrap: break-word;
  white-space: normal;
  width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mega-sub-arrow {
  color: #bbb;
  display: inline-flex;
  align-items: center;
  transition: all 0.2s ease;
}

.mega-sub-card:hover .mega-sub-arrow {
  color: #2B5BFF;
  transform: translateX(2px);
}

/* Header Right Area */
.kky-header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 100%;
  margin-left: auto;
  white-space: nowrap;
  min-width: 0;
}

.kky-search {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 8px;
  flex-shrink: 0;
}

.kky-search .search-input {
  width: 180px;
  height: 36px;
  padding: 0 36px 0 14px;
  border: 1px solid #e0e0e0;
  border-radius: 18px;
  background: #f7f8fa;
  font-size: 13px;
  color: #333;
  transition: all 0.2s ease;
}

.kky-search .search-input:focus {
  border-color: #2B5BFF;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(43, 91, 255, 0.08);
}

.kky-search .search-input::placeholder {
  color: #999;
}

.kky-search .search-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #999;
  font-size: 16px;
  background: transparent;
  border: none;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.kky-search .search-btn:hover {
  color: #2B5BFF;
  background: rgba(43, 91, 255, 0.06);
}

.kky-link-item {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 14px;
  font-size: 14px;
  color: #555;
  position: relative;
  transition: color 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.kky-link-item:hover {
  color: #2B5BFF;
}

.kky-link-divider {
  width: 1px;
  height: 14px;
  background: #e0e0e0;
  margin: 0 2px;
}

.kky-login-link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 14px;
  font-size: 14px;
  color: #555;
  transition: color 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.kky-login-link:hover {
  color: #2B5BFF;
}

.kky-register-btn {
  position: absolute;
  top: 0;
  right: 0;
  height: 60px;
  width: 150px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2B5BFF;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  border: none;
  text-decoration: none;
  transition: background 0.2s ease;
  z-index: 5;
  flex-shrink: 0;
}

.kky-register-btn:hover {
  background: #1E47E5;
  color: #fff;
}

.kky-register-btn i,
.kky-register-btn svg {
  margin-right: 8px;
  font-size: 16px;
  vertical-align: middle;
}

.kky-register-btn .register-text {
  display: inline-block;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* User dropdown (logged in) */
.kky-user-area {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 14px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.kky-user-area .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  margin-left: 8px;
  flex-shrink: 0;
}

.kky-user-area .user-name {
  font-size: 14px;
  color: #555;
  margin-right: 6px;
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kky-user-area .user-name:hover {
  color: #2B5BFF;
}

.kky-user-area .user-caret {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #999;
  transition: transform 0.2s ease;
}

.kky-user-area:hover .user-caret {
  transform: rotate(180deg);
  border-top-color: #2B5BFF;
}

.kky-user-area .user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 160px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  padding: 8px 0;
  display: none;
  z-index: 1000;
}

.kky-user-area:hover .user-dropdown,
.kky-user-area .user-dropdown.show {
  display: block;
}

.kky-user-area .user-dropdown a {
  display: block;
  padding: 10px 18px;
  font-size: 14px;
  color: #555;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.kky-user-area .user-dropdown a:hover {
  background: #f5f7ff;
  color: #2B5BFF;
}

/* Mobile Menu Toggle */
.kky-mobile-toggle {
  display: none;
  width: 36px;
  height: 36px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  margin-left: 8px;
}

.toggle-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.toggle-icon span {
  display: block;
  width: 22px;
  height: 2px;
  background: #333;
  border-radius: 1px;
}

.close-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}

/* 菜单打开时显示X图标，隐藏汉堡图标 */
.kky-mobile-toggle.active .toggle-icon {
  display: none;
}

.kky-mobile-toggle.active .close-icon {
  display: flex !important;
}

/* Mobile menu drawer */
.kky-mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  overflow-y: auto;
  z-index: 999;
  padding: 0;
}

.kky-mobile-menu.active {
  display: block;
}

/* Two-column layout: left sidebar + right panel */
.kky-mobile-menu .mobile-menu-cols {
  display: flex;
  flex-direction: row;
  min-height: calc(100% - 110px);
}

/* ===== Left Sidebar: top-level + nested first-level ===== */
.kky-mobile-menu .mobile-menu-left {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 120px;
  flex-shrink: 0;
  background: #f0f4fa;
  overflow-y: auto;
}

/* Top-level menu items */
.kky-mobile-menu .mobile-top-item > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 10px;
  font-size: 14px;
  color: #333;
  font-weight: 500;
  border-bottom: 1px solid #e6ebf3;
  cursor: pointer;
}

.kky-mobile-menu .mobile-top-item.active > a {
  color: #2B5BFF;
  background: #fff;
  position: relative;
}

.kky-mobile-menu .mobile-top-item.active > a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #2B5BFF;
}

.kky-mobile-menu .mobile-top-item > a .arrow {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #999;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 4px;
}

.kky-mobile-menu .mobile-top-item.top-open > a .arrow {
  transform: rotate(180deg);
}

/* First-level list (nested under top-level, inside left sidebar) */
.kky-mobile-menu .mobile-l1-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #fff;
}

.kky-mobile-menu .mobile-l1-item > a {
  display: block;
  padding: 11px 10px 11px 16px;
  font-size: 13px;
  color: #555;
  border-bottom: 1px solid #eee;
  line-height: 1.4;
  cursor: pointer;
}

.kky-mobile-menu .mobile-l1-item.l1-active > a {
  color: #2B5BFF;
  font-weight: 600;
  position: relative;
}

.kky-mobile-menu .mobile-l1-item.l1-active > a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: #2B5BFF;
  border-radius: 0 2px 2px 0;
}

/* Tag badge on l1 items */
.kky-mobile-menu .menu-tag {
  display: inline-block;
  font-size: 11px;
  color: #e53e3e;
  border: 1px solid #e53e3e;
  border-radius: 3px;
  padding: 0 4px;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1.4;
}

/* ===== Right Panel (3 cases) ===== */
.kky-mobile-menu .mobile-menu-right {
  flex: 1;
  background: #fff;
  overflow-y: auto;
  padding: 8px 16px;
}

/* Common right panel list */
.kky-mobile-menu .mobile-right-panel {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kky-mobile-menu .mobile-right-panel li a {
  display: block;
  padding: 11px 0;
  font-size: 15px;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
}

.kky-mobile-menu .mobile-right-panel li:last-child a {
  border-bottom: none;
}

.kky-mobile-menu .mobile-menu-bottom {
  padding: 20px;
  display: flex;
  gap: 10px;
  border-top: 1px solid #f0f0f0;
  margin-top: 20px;
}

.kky-mobile-menu .mobile-menu-bottom a {
  flex: 1;
  display: block;
  text-align: center;
  padding: 12px 0;
  font-size: 15px;
  border-radius: 4px;
  text-decoration: none;
}

.kky-mobile-menu .mobile-menu-bottom .login-btn {
  background: #fff;
  color: #555;
  border: 1px solid #ddd;
}

.kky-mobile-menu .mobile-menu-bottom .register-btn {
  background: #2B5BFF;
  color: #fff;
}

.kky-mobile-menu .mobile-menu-extras {
  display: flex;
  justify-content: space-around;
  padding: 15px 20px;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
}

.kky-mobile-menu .mobile-menu-extras a {
  font-size: 14px;
  color: #555;
  text-decoration: none;
}

/* ==================== Footer ==================== */
.kky-footer {
  background: #1a1f2e;
  color: #aab2c5;
  padding: 50px 0 0;
}

.kky-footer .footer-inner {
  width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.kky-footer .footer-col {
  flex: 1;
  min-width: 200px;
  padding: 0 15px;
  margin-bottom: 30px;
}

.kky-footer .footer-col h4 {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
}

.kky-footer .footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.kky-footer .footer-col ul li {
  margin-bottom: 12px;
}

.kky-footer .footer-col ul li a {
  color: #aab2c5;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.kky-footer .footer-col ul li a:hover {
  color: #fff;
}

.kky-footer .footer-contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 14px;
  font-size: 14px;
  color: #aab2c5;
  line-height: 1.6;
}

.kky-footer .footer-contact-item i {
  width: 18px;
  margin-right: 10px;
  color: #2B5BFF;
  flex-shrink: 0;
  margin-top: 4px;
}

.kky-footer .footer-logo {
  margin-bottom: 16px;
}

.kky-footer .footer-logo img {
  height: 44px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.kky-footer .footer-profile {
  color: #aab2c5;
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 280px;
}

.kky-footer .friend-links {
  width: 1200px;
  margin: 30px auto 0;
  padding: 20px;
  border-top: 1px solid #2a3142;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
}

.kky-footer .friend-links-title {
  font-size: 14px;
  color: #fff;
  font-weight: 600;
  margin-right: 20px;
  flex-shrink: 0;
}

.kky-footer .friend-links-list {
  display: flex;
  flex-wrap: wrap;
  flex: 1;
}

.kky-footer .friend-links-list a {
  color: #aab2c5;
  font-size: 13px;
  margin-right: 20px;
  margin-bottom: 8px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.kky-footer .friend-links-list a:hover {
  color: #fff;
}

.kky-footer .footer-copyright {
  background: #141823;
  padding: 18px 0;
  text-align: center;
  font-size: 13px;
  color: #7a8295;
  margin-top: 30px;
}

/* ==================== Responsive ==================== */
.kky-mobile-toggle {
  display: none;
}

@media (max-width: 1440px) {
  .kky-header .header-inner {
    padding: 0 150px 0 50px;
  }
  .kky-header .header-inner.logged-in {
    padding-right: 0;
  }
  .kky-footer .footer-inner,
  .kky-footer .friend-links {
    width: 100%;
    padding: 0 60px;
  }
}

@media (max-width: 1240px) {
  .kky-header .header-inner {
    padding: 0 170px 0 50px;
  }
  .kky-header .header-inner.logged-in {
    padding-right: 0;
  }
  .kky-footer .footer-inner,
  .kky-footer .friend-links {
    width: 100%;
    padding: 0 20px;
  }
}

@media (max-width: 992px) {
  body {
    min-width: 0;
  }
  .kky-header {
    height: 60px;
  }
  .kky-header .header-inner {
    height: 60px;
    padding: 0 110px 0 16px;
  }
  .kky-header .header-inner.logged-in {
    padding-right: 0;
  }
  .kky-logo img {
    height: 36px;
  }
  .kky-nav,
  .kky-header-right .kky-search,
  .kky-header-right .kky-link-item,
  .kky-header-right .kky-link-divider,
  .kky-header-right .kky-login-link,
  .kky-register-btn,
  .kky-user-area .user-name {
    display: none !important;
  }
  .kky-header-right {
    margin-right: 44px;
  }
  .kky-user-area .user-dropdown {
    right: -44px;
  }
  .kky-mobile-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    right: 16px;
  }
  .kky-header {
    border-bottom: 1px solid #eaeaea;
  }
  .kky-footer .footer-inner {
    flex-direction: column;
  }
  .kky-footer .footer-col {
    width: 100%;
    padding: 0;
  }
  .kky-footer .friend-links {
    flex-direction: column;
  }
  .kky-footer .friend-links-title {
    margin-bottom: 10px;
  }
}

/* 1440px 以下：下拉列表左侧一级菜单边距重置为 0（取消 inner 居中） */
@media (max-width: 1440px) {
  .mega-inner {
    margin: 0;
    max-width: 100%;
  }
}

/* 移动端：Footer 手机端现代风格适配 v2 */
@media (max-width: 576px) {
  .kky-footer {
    padding: 0;
    font-size: 13px;
    background: #11141c;
    position: relative;
  }
  /* 顶部微光装饰线 */
  .kky-footer::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(43,91,255,0.3), transparent);
  }
  .kky-footer .footer-inner {
    padding: 24px 16px 0;
    gap: 0;
    display: block;
  }

  /* ===== 公司信息区：现代卡片 ===== */
  .kky-footer .footer-col:first-child {
    background: transparent;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 8px;
    border-bottom: none;
    border: none;
    box-shadow: none;
  }

  /* Logo 行 */
  .kky-footer .footer-logo {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
  }
  .kky-footer .footer-logo img {
    height: 28px;
    filter: brightness(0) invert(1);
    opacity: 0.95;
  }

  /* 公司简介 */
  .kky-footer .footer-profile {
    font-size: 12px;
    color: #6b7385;
    line-height: 1.75;
    max-width: 100%;
    margin-bottom: 18px;
  }

  /* 联系方式：图标徽章 + 文字 */
  .kky-footer .footer-contact-item {
    font-size: 12px;
    color: #8892a6;
    margin-bottom: 11px;
    align-items: center;
    gap: 0;
    padding: 7px 0;
  }
  .kky-footer .footer-contact-item i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 7px;
    margin-right: 10px;
    flex-shrink: 0;
    font-size: 12px;
    background: rgba(255,255,255,0.05);
    transition: background 0.2s ease;
  }
  .kky-footer .footer-contact-item:hover i {
    background: rgba(43,91,255,0.15);
  }

  /* ===== 菜单列：手风琴折叠式 ===== */
  .kky-footer .footer-col:not(:first-child) {
    margin-bottom: 0;
    padding: 0;
    border-bottom: none;
    position: relative;
  }
  .kky-footer .footer-col:not(:first-child):last-child {
    border-bottom: none;
  }

  /* 标题栏：可点击，带箭头 */
  .kky-footer .footer-col h4 {
    font-size: 14px;
    font-weight: 600;
    color: #9ca3af;
    margin-bottom: 0;
    padding: 16px 30px 16px 0;
    cursor: pointer;
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    letter-spacing: 0.2px;
  }

  /* 右侧箭头 - 更精致 */
  .kky-footer .footer-col h4::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -3px;
    border-right: 1.5px solid #4a5260;
    border-bottom: 1.5px solid #4a5260;
    transform: rotate(45deg);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
    border-radius: 1px;
  }

  /* 展开态 */
  .kky-footer .footer-col.expanded h4 {
    color: #fff;
  }
  .kky-footer .footer-col.expanded h4::after {
    transform: rotate(-135deg);
    border-color: #2B5BFF;
    margin-top: 1px;
  }

  /* 菜单列表：默认隐藏，展开时显示 */
  .kky-footer .footer-col ul {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
    opacity: 0;
    padding-left: 0;
  }

  .kky-footer .footer-col.expanded ul {
    max-height: 280px;
    opacity: 1;
    padding: 4px 0 14px 0;
  }

  .kky-footer .footer-col ul li {
    margin-bottom: 0;
  }
  .kky-footer .footer-col ul li a {
    font-size: 13px;
    color: #6b7385;
    padding: 10px 14px 10px 18px;
    display: block;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
    margin: 2px 0;
  }

  /* 链接前的小圆点装饰 */
  .kky-footer .footer-col ul li a::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #3a4255;
    transition: all 0.25s ease;
    transform: translateY(-50%) scale(0.8);
    opacity: 0.6;
  }

  .kky-footer .footer-col ul li a:hover {
    color: #e4e7ed;
    background: rgba(43,91,255,0.06);
    padding-left: 22px;
  }
  .kky-footer .footer-col ul li a:hover::before {
    background: #2B5BFF;
    transform: translateY(-50%) scale(1.4);
    opacity: 1;
    box-shadow: 0 0 6px rgba(43,91,255,0.4);
  }

  /* ===== 友情链接 ===== */
  .kky-footer .friend-links {
    width: 100%;
    margin-top: 0;
    padding: 18px 16px;
    flex-direction: column;
    align-items: flex-start;
    border-top: 1px solid rgba(255,255,255,0.04);
    gap: 2px;
  }
  .kky-footer .friend-links-title {
    font-size: 11px;
    font-weight: 600;
    color: #4a5260;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 0;
    margin-bottom: 10px;
  }
  .kky-footer .friend-links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 14px;
  }
  .kky-footer .friend-links-list a {
    font-size: 12px;
    color: #5a6270;
    margin-right: 0;
    margin-bottom: 0;
    transition: all 0.2s ease;
    padding: 2px 0;
  }
  .kky-footer .friend-links-list a:hover {
    color: #8892a6;
  }

  /* ===== 版权信息 ===== */
  .kky-footer .footer-copyright {
    padding: 16px 16px 24px;
    font-size: 10.5px;
    line-height: 2;
    margin-top: 0;
    color: #3a4255;
    text-align: center;
    letter-spacing: 0.3px;
  }
}
@media (max-width: 768px) {
  .mega-close {
    width: 36px;
    height: 36px;
    top: 10px;
    right: 12px;
  }
  .mega-close svg {
    width: 16px;
    height: 16px;
  }
}
