/* Member profile — game_tgn_0035 Compact account dashboard */

.g35-profile-page {
  --g35-ink: var(--text-main, #333);
  --g35-paper: var(--bg-main, #fff);
  --g35-paper-deep: var(--bg-secondary, #f8f9fa);
  flex: 1;
  min-width: 0;
  padding: 20px 0 40px;
}

.g35-profile-page button,
.g35-profile-page .g35-stat-badge,
.g35-profile-page .g35-profile-form label,
.g35-profile-page .g35-profile-nav-item,
.g35-profile-page .g35-btn-secondary {
  text-transform: none;
}

/* One shell: aside + content */
.g35-profile-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

@media (min-width: 900px) {
  .g35-profile-shell {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 16px;
  }
}

.g35-profile-aside {
  background: #fff;
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 16px;
  min-width: 0;
}

@media (min-width: 900px) {
  .g35-profile-aside {
    position: sticky;
    top: 16px;
  }
}

.g35-profile-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border, #e5e5e5);
}

.g35-profile-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #00a8e1, #0077b3);
}

.g35-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.g35-profile-identity {
  min-width: 0;
}

.g35-profile-name {
  margin: 0 0 2px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main, #333);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.g35-profile-email {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-secondary, #666);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.g35-profile-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.g35-profile-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary, #666);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.g35-profile-nav-item:hover {
  background: #f3f8fb;
  color: #0077b3;
}

.g35-profile-nav-item.active {
  background: rgba(0, 168, 225, 0.12);
  color: #0077b3;
}

.g35-profile-nav-item .g35-nav-icon {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.g35-profile-nav-item .g35-nav-icon--heart {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E");
}
.g35-profile-nav-item .g35-nav-icon--clock {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2a10 10 0 100 20 10 10 0 000-20zm0 2a8 8 0 110 16 8 8 0 010-16zm-.5 4v4.25l3.5 2.1.75-1.23-3-1.8V8H11.5z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2a10 10 0 100 20 10 10 0 000-20zm0 2a8 8 0 110 16 8 8 0 010-16zm-.5 4v4.25l3.5 2.1.75-1.23-3-1.8V8H11.5z'/%3E%3C/svg%3E");
}
.g35-profile-nav-item .g35-nav-icon--user {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 12a4 4 0 100-8 4 4 0 000 8zm-6 8a6 6 0 0112 0H6z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 12a4 4 0 100-8 4 4 0 000 8zm-6 8a6 6 0 0112 0H6z'/%3E%3C/svg%3E");
}
.g35-profile-nav-item .g35-nav-icon--lock {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M17 9h-1V7a4 4 0 00-8 0v2H7a2 2 0 00-2 2v8a2 2 0 002 2h10a2 2 0 002-2v-8a2 2 0 00-2-2zm-3 0h-4V7a2 2 0 114 0v2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M17 9h-1V7a4 4 0 00-8 0v2H7a2 2 0 00-2 2v8a2 2 0 002 2h10a2 2 0 002-2v-8a2 2 0 00-2-2zm-3 0h-4V7a2 2 0 114 0v2z'/%3E%3C/svg%3E");
}

/* Mobile: identity + horizontal chips */
@media (max-width: 899px) {
  .g35-profile-aside {
    padding: 12px;
  }
  .g35-profile-user {
    padding-bottom: 12px;
    margin-bottom: 8px;
  }
  .g35-profile-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding: 0 4px 2px;
  }
  .g35-profile-nav::-webkit-scrollbar { display: none; }
  .g35-profile-nav-item {
    flex: 0 0 auto;
    width: auto;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f3f4f6;
    font-size: 0.8125rem;
  }
  .g35-profile-nav-item.active {
    background: #00a8e1;
    color: #fff;
  }
}

/* Main pane */
.g35-profile-main {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 18px 18px 20px;
}

.g35-profile-panel { display: none; }
.g35-profile-panel.active { display: block; width: 100%; }

.g35-profile-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.g35-profile-card-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-main, #333);
}

.g35-stat-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0077b3;
  background: rgba(0, 168, 225, 0.12);
  border-radius: 999px;
}

/* Game grid — match homepage density */
.g35-profile-page .g35-game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 640px) {
  .g35-profile-page .g35-ranked-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .g35-profile-page .g35-ranked-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }
}

.g35-profile-page .g35-game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.g35-profile-page .g35-game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 168, 225, 0.14);
}

.g35-profile-page .g35-card-index { display: none; }

.g35-profile-page .g35-ranked-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f3f4f6;
  text-decoration: none;
}

.g35-profile-page .g35-ranked-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.g35-profile-page .g35-ranked-body,
.g35-profile-page .article-list .special-card-content {
  padding: 10px 10px 12px;
  min-width: 0;
}

.g35-profile-page .g35-game-card .game-title {
  display: block;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.g35-profile-page .g35-game-card .game-title a {
  color: var(--text-main, #333);
  text-decoration: none;
}

.g35-profile-page .g35-game-card .game-title a:hover {
  color: #0077b3;
}

.g35-profile-page .g35-game-card .game-star {
  margin: 0;
}

.g35-profile-page .g35-game-card .g35-card-tags,
.g35-profile-page .g35-game-card .brief-comment-game {
  display: none;
}

.g35-profile-page .g35-game-card .g35-btn-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  width: 100%;
  min-height: 30px;
  padding: 0 10px;
  align-self: stretch;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0077b3;
  background: rgba(0, 168, 225, 0.08);
  border: 1px solid rgba(0, 119, 179, 0.28);
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.g35-profile-page .g35-game-card .g35-btn-remove:hover {
  color: #fff;
  background: #00a8e1;
  border-color: #00a8e1;
  text-decoration: none;
}

/* Buttons */
.g35-btn-clear,
.g35-btn-load-more,
.g35-btn-secondary,
.g35-btn-remove--inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid var(--border, #e5e5e5);
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.g35-btn-clear {
  color: #0077b3;
  background: #fff;
}

.g35-btn-clear:hover {
  border-color: #00a8e1;
  color: #00a8e1;
}

.g35-btn-load-more {
  position: relative;
  width: 100%;
  margin-top: 16px;
  color: #0077b3;
  background: #fff;
}

.g35-btn-load-more:hover {
  border-color: #00a8e1;
}

.g35-btn-load-more.is-loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.g35-btn-load-more:disabled {
  cursor: not-allowed;
  opacity: 0.85;
  filter: none;
}

.g35-btn-load-more.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: profile-load-more-spin 0.7s linear infinite;
}

@keyframes profile-load-more-spin {
  to { transform: rotate(360deg); }
}


.g35-btn-secondary {
  color: #0077b3;
  background: #fff;
  cursor: pointer;
}

.g35-btn-remove--inline {
  width: auto;
  color: #666;
  background: #f3f4f6;
}

.g35-btn-remove--inline:hover {
  color: #0077b3;
  border-color: #00a8e1;
}

.g35-loading[hidden],
.g35-empty-state[hidden],
.g35-btn-load-more[hidden] {
  display: none !important;
}

.g35-empty-state {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-secondary, #666);
}

.g35-empty-state p {
  margin: 0 0 14px;
}

.g35-empty-ico {
  display: block;
  width: 36px;
  height: 36px;
  margin: 0 auto 10px;
  background-color: #00a8e1;
  opacity: 0.4;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.g35-empty-ico--heart {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E");
}
.g35-empty-ico--clock {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2a10 10 0 100 20 10 10 0 000-20zm0 2a8 8 0 110 16 8 8 0 010-16zm-.5 4v4.25l3.5 2.1.75-1.23-3-1.8V8H11.5z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2a10 10 0 100 20 10 10 0 000-20zm0 2a8 8 0 110 16 8 8 0 010-16zm-.5 4v4.25l3.5 2.1.75-1.23-3-1.8V8H11.5z'/%3E%3C/svg%3E");
}
.g35-empty-ico--trash {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M6 7h12v14a1 1 0 01-1 1H7a1 1 0 01-1-1V7zm3-4h6l1 2H8l1-2zM4 7h16v2H4V7z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M6 7h12v14a1 1 0 01-1 1H7a1 1 0 01-1-1V7zm3-4h6l1 2H8l1-2zM4 7h16v2H4V7z'/%3E%3C/svg%3E");
}

.g35-loading {
  text-align: center;
  padding: 36px 12px;
  color: var(--text-secondary, #666);
}

.g35-loading-spinner {
  display: inline-block;
  width: 26px;
  height: 26px;
  border: 3px solid rgba(0, 168, 225, 0.2);
  border-top-color: #00a8e1;
  border-radius: 50%;
  animation: g35-profile-spin 0.7s linear infinite;
  margin-bottom: 8px;
}

@keyframes g35-profile-spin {
  to { transform: rotate(360deg); }
}

/* Forms */
.g35-profile-form-block {
  max-width: 480px;
}

.g35-avatar-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border, #e5e5e5);
}

.g35-avatar-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #00a8e1, #0077b3);
}

.g35-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.g35-avatar-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.g35-avatar-hint {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted, #999);
}

.g35-form-row {
  display: grid;
  gap: 12px;
}

@media (min-width: 560px) {
  .g35-form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.g35-profile-form .g35-form-group { margin-bottom: 14px; }

.g35-profile-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary, #666);
}

.g35-profile-form .g35-form-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--text-main, #333);
  background: #fff;
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
}

.g35-profile-form .g35-form-input:focus {
  border-color: #00a8e1;
}

.g35-profile-form .g35-form-input[disabled] {
  background: #f3f4f6;
  color: #666;
  cursor: not-allowed;
}

/* Toast */
.g35-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 40000;
  max-width: min(420px, 90vw);
  padding: 12px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  border-radius: 8px;
  border: 1px solid transparent;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transition: transform 0.28s ease;
  pointer-events: none;
}

.g35-toast.show { transform: translateX(-50%) translateY(0); }
.g35-toast.success { color: #1e5631; background: #e8f5e9; border-color: #27ae60; }
.g35-toast.error { color: #7b1e1e; background: #fdecea; border-color: #e57373; }
.g35-toast.warning { color: #7a5c00; background: #fff8e1; border-color: #f9a825; }

/* Confirm */
.g35-confirm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 30000;
  background: rgba(0, 40, 70, 0.45);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.g35-confirm-overlay.show { display: flex; }

.g35-confirm-modal {
  width: 100%;
  max-width: 360px;
  padding: 24px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 80, 120, 0.18);
  text-align: center;
}

.g35-confirm-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 168, 225, 0.12);
  color: #0077b3;
}

.g35-confirm-icon .g35-empty-ico {
  margin: 0;
  width: 20px;
  height: 20px;
  opacity: 1;
  background-color: currentColor;
}

.g35-confirm-title {
  margin: 0 0 6px;
  font-size: 1.0625rem;
}

.g35-confirm-desc {
  margin: 0 0 18px;
  font-size: 0.875rem;
  color: var(--text-secondary, #666);
}

.g35-confirm-actions {
  display: flex;
  gap: 10px;
}

.g35-confirm-cancel,
.g35-confirm-ok {
  flex: 1;
  min-height: 42px;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid var(--border, #e5e5e5);
}

.g35-confirm-cancel {
  background: #f3f4f6;
  color: var(--text-main, #333);
}

.g35-confirm-ok {
  background: #00a8e1;
  color: #fff;
  border-color: #00a8e1;
}

.g35-confirm-ok:hover { background: #0077b3; border-color: #0077b3; }

@media (max-width: 767px) {
  .g35-profile-page { padding: 12px 0 24px; }
  .g35-profile-main { padding: 14px; }
  .g35-profile-page .g35-game-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .g35-loading-spinner { animation: none; }
  .g35-toast { transition: none; }
  .g35-profile-page .g35-game-card { transition: none; }
}


.g35-confirm-ok {
  position: relative;
}

.g35-confirm-ok:disabled,
.g35-confirm-cancel:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.g35-confirm-ok.is-loading {
  color: transparent;
  pointer-events: none;
}

.g35-confirm-ok.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: g35-confirm-spin 0.7s linear infinite;
}

@keyframes g35-confirm-spin {
  to { transform: rotate(360deg); }
}
