/* /public/css/render_profile.css */

.render-page{
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 12px 32px;
  min-height: calc(100vh - 140px);
}

.render-hero{
  position: relative;
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  padding: 22px 24px;
  background: var(--bg-card);
  color: #0f172a;
  box-shadow: var(--shadow-card);
}

.render-hero-copy{
  position: relative;
  z-index: 1;
}

.render-title{
  margin: 0 0 8px;
  max-width: 720px;
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: -.02em;
}

.render-sub{
  margin: 0;
  max-width: 720px;
  color: var(--text-sub);
  line-height: 1.75;
  font-size: 14px;
}

.render-layout{
  display: grid;
  grid-template-columns: minmax(290px, 420px) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.render-card{
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
}

.render-control{
  padding: 18px;
  align-self: start;
}

.render-form{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.render-account-box{
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(14,165,233,.22);
  background: rgba(14,165,233,.06);
}

.render-account-head{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.render-account-title{
  font-size: 12px;
  font-weight: 1000;
  color: var(--text-main);
}

.render-account-status,
.render-account-note{
  margin: 0;
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.55;
}

.render-account-candidates{
  display: grid;
  gap: 8px;
}

.render-account-candidate{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,.72);
  color: var(--text-main);
  font-weight: 900;
  cursor: pointer;
  text-align: left;
}

.render-account-candidate:hover{
  filter: brightness(.99);
}

.render-account-player{
  justify-content: flex-start;
  align-items: center;
  min-height: 58px;
  padding: 8px 10px;
}

.render-account-avatar{
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(15,23,42,.06);
}

.render-account-avatar img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.render-account-main{
  min-width: 0;
  display: grid;
  gap: 2px;
  flex: 1 1 auto;
}

.render-account-topline{
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.render-account-name{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 1000;
}

.render-account-badge{
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(245,158,11,.14);
  color: #b45309;
  font-size: 10px;
  font-weight: 1000;
}

.render-account-club{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 800;
}

.render-account-candidate-tag{
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 800;
}

.render-account-login{
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 14px;
  background: #0f172a;
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}

.render-account-login:hover{
  text-decoration: none;
}

.render-search-box{
  display: grid;
  gap: 8px;
}

.render-search-row{
  display: flex;
  gap: 10px;
}

.render-search-row .ui-input{
  min-width: 0;
  flex: 1 1 auto;
}

.render-search-submit{
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid #0f172a;
  background: #0f172a;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.render-search-results{
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,.72);
}

.render-search-results[hidden]{
  display: none;
}

.render-search-results-title{
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 1000;
}

.render-search-results-list{
  display: grid;
  gap: 8px;
}

.render-search-message,
.render-search-meta{
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 800;
}

.render-search-error{
  color: #dc2626;
}

.render-player-result{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: rgba(248,250,252,.86);
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
}

.render-player-result-account-main{
  border-color: #93c5fd;
  background: #eff6ff;
}

.render-player-result-account-favorite{
  border-color: #fbbf24;
  background: #fffbeb;
}

.render-player-result-account-saved{
  border-color: #d1d5db;
  background: #f9fafb;
}

.render-player-result:hover{
  filter: brightness(.99);
}

.render-player-result-avatar{
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(15,23,42,.06);
}

.render-player-result-avatar img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.render-player-result-main{
  min-width: 0;
  display: grid;
  gap: 2px;
  flex: 1 1 auto;
}

.render-player-result-top{
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.render-player-result-name{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 1000;
}

.render-player-result-badge{
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(14,165,233,.12);
  color: #0369a1;
  font-size: 10px;
  font-weight: 1000;
}

.render-player-result-account-main .render-player-result-badge{
  background: #dbeafe;
  color: #1e40af;
}

.render-player-result-account-favorite .render-player-result-badge{
  background: #fef3c7;
  color: #b45309;
}

.render-player-result-club,
.render-player-result-tag{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 800;
}

.render-player-result-stats{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.render-player-result-stat{
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--text-main);
  font-size: 11px;
  font-weight: 900;
}

.render-player-result-stat img{
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex: 0 0 14px;
}

.render-input-row{
  display: flex;
  gap: 10px;
}

.render-input-row .ui-input{
  min-width: 0;
  flex: 1 1 auto;
  text-transform: uppercase;
}

.render-submit,
.render-copy,
.render-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  transition: transform .08s ease, filter .12s ease, opacity .12s ease;
}

.render-submit{
  flex: 0 0 auto;
  padding: 0 18px;
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

.render-copy,
.render-link{
  width: 100%;
  padding: 0 14px;
  color: var(--text-main);
  background: rgba(255,255,255,.62);
}

.render-download{
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: #fff;
}

.render-submit:hover,
.render-copy:hover,
.render-link:hover{
  transform: translateY(-1px);
  filter: brightness(.99);
  text-decoration: none;
}

.render-submit:disabled,
.render-copy:disabled,
.render-link.is-disabled{
  opacity: .5;
  cursor: default;
  pointer-events: none;
}

.render-lang-label{
  margin-top: 8px;
}

.render-lang{
  width: 100%;
}

.render-help{
  margin: 4px 0 0;
  color: var(--text-sub);
  line-height: 1.7;
  font-size: 12.5px;
}

.render-actions{
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.render-preview-card{
  padding: 18px;
  min-width: 0;
}

.render-preview-head{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.render-preview-title{
  font-size: 16px;
  font-weight: 1000;
  letter-spacing: -.01em;
}

.render-status{
  margin-top: 4px;
  color: var(--text-sub);
  font-size: 12.5px;
  line-height: 1.5;
}

.render-preview-box{
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  overflow: hidden;
  border-radius: 0;
  border: 1px solid rgba(148,163,184,.45);
  background: rgba(255,255,255,.72);
}

.render-placeholder,
.render-loading{
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-sub);
  text-align: center;
  font-weight: 800;
}

.render-placeholder i{
  font-size: 42px;
  opacity: .7;
}

.render-spinner{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 4px solid rgba(148,163,184,.35);
  border-top-color: #0ea5e9;
  animation: render-spin .9s linear infinite;
}

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

.render-preview-image{
  display: block;
  max-width: 100%;
  max-height: 76vh;
  width: auto;
  height: auto;
  border-radius: 0;
  box-shadow: 0 18px 60px rgba(15,23,42,.24);
}

.render-preview-image[hidden],
.render-placeholder[hidden],
.render-loading[hidden]{
  display: none !important;
}

.render-history-toggle.is-active{
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.render-history-panel{
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-soft);
}

.render-history-panel[hidden]{
  display: none !important;
}

.render-history-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.render-history-title{
  font-size: 15px;
  font-weight: 1000;
}

.render-history-status{
  margin-top: 3px;
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.5;
}

.render-history-empty{
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed var(--border-soft);
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.render-history-empty[hidden]{
  display: none !important;
}

.render-history-list{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.render-history-item{
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 9px;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  background: rgba(248,250,252,.78);
}

.render-history-thumb{
  display: grid;
  place-items: center;
  width: 92px;
  height: 58px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,.35);
  background: #fff;
}

.render-history-thumb img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.render-history-main{
  display: grid;
  gap: 5px;
  min-width: 0;
}

.render-history-date{
  overflow: hidden;
  color: var(--text-main);
  font-size: 12px;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.render-history-meta{
  overflow: hidden;
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.render-history-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.render-history-actions a,
.render-history-actions button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: #fff;
  color: var(--text-main);
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.render-history-actions a:hover,
.render-history-actions button:hover{
  background: #f8fafc;
  text-decoration: none;
}

@media (max-width: 900px){
  .render-layout{
    grid-template-columns: 1fr;
  }
  .render-preview-box{
    min-height: 320px;
  }
}

@media (max-width: 560px){
  .render-page{
    padding: 14px 10px 24px;
  }
  .render-hero{
    padding: 18px;
    border-radius: 20px;
  }
  .render-title{
    font-size: 23px;
  }
  .render-control,
  .render-preview-card{
    padding: 14px;
    border-radius: 20px;
  }
  .render-input-row,
  .render-search-row{
    flex-direction: column;
  }
  .render-submit,
  .render-search-submit{
    width: 100%;
  }
  .render-history-list{
    grid-template-columns: 1fr;
  }
}
