/* My Profile page (Phase 3 sub-step 2). Relies on the :root CSS variables
   and header.site styles already defined in player.css, loaded first. */

.profile-wrap{max-width:920px; margin:0 auto; padding:32px 24px 80px;}
.profile-wrap h1{font-size:26px; margin:0 0 6px;}
.profile-wrap .sub{color:var(--muted); font-size:13.5px; margin:0 0 28px;}

.signin-card{
  background:var(--card); border:1px solid #1f1f1f; border-radius:14px;
  padding:36px; text-align:center; max-width:440px; margin:40px auto;
}
.signin-card p{color:var(--muted); font-size:13.5px; margin:0 0 20px;}
.btn-accent{
  background:var(--accent); color:#fff; border:none; border-radius:999px;
  padding:11px 24px; font-weight:700; font-size:13px; cursor:pointer;
}
.btn-accent:hover{opacity:.9;}

.profile-layout{
  display:grid; grid-template-columns:220px 1fr; gap:28px; align-items:start;
}
@media(max-width:760px){ .profile-layout{grid-template-columns:1fr;} }

.profile-avatar-card{
  background:var(--card); border:1px solid #1f1f1f; border-radius:14px;
  padding:22px 18px; text-align:center;
}
.avatar-circle{
  width:140px; height:140px; border-radius:50%; margin:0 auto 14px;
  background:#1c1c1c; border:2px solid #262626; overflow:hidden;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
}
.avatar-circle img{width:100%; height:100%; object-fit:cover; display:block;}
.avatar-circle #avatar-placeholder{font-size:34px; color:var(--muted);}
.profile-avatar-card button{
  display:block; width:100%; margin:6px 0 0; padding:9px 12px; border-radius:8px;
  border:1px solid #2a2a2a; background:#181818; color:var(--fg); font-size:12.5px;
  font-weight:600; cursor:pointer;
}
.profile-avatar-card button:hover{border-color:var(--accent);}
#avatar-remove-btn{background:transparent; color:var(--muted); border-color:transparent;}
.avatar-hint{color:var(--muted); font-size:11px; margin:12px 0 0; line-height:1.5;}

.profile-form-card, .profile-favorites-card{
  background:var(--card); border:1px solid #1f1f1f; border-radius:14px;
  padding:22px 24px; margin-bottom:20px;
}
.profile-form-card label{display:block; font-size:12px; font-weight:700; color:var(--muted); margin:0 0 16px; text-transform:uppercase; letter-spacing:.03em;}
.profile-form-card input[type=text], .profile-form-card textarea{
  display:block; width:100%; margin-top:8px; background:#111; border:1px solid #262626;
  border-radius:8px; color:var(--fg); font-size:14px; padding:10px 12px; font-family:inherit;
  text-transform:none; letter-spacing:normal; font-weight:400; resize:vertical;
}
.profile-form-card input[type=text]:focus, .profile-form-card textarea:focus{outline:none; border-color:var(--accent);}
.word-count{display:block; text-align:right; font-size:11px; color:var(--muted); font-weight:600; margin-top:6px; text-transform:none;}
.word-count.at-limit{color:#e0a13a;}
#save-profile-btn{
  padding:11px 22px; border-radius:8px; border:none; background:var(--accent); color:#fff;
  font-size:13px; font-weight:700; cursor:pointer;
}
#save-profile-btn:hover{opacity:.9;}
.status-msg{font-size:12px; margin:10px 0 0; min-height:14px;}
.status-msg.ok{color:#4caf7d;}
.status-msg.error{color:#e05a5a;}

.favorites-header{display:flex; align-items:center; justify-content:space-between; margin-bottom:14px;}
.favorites-header h2{font-size:15px; margin:0;}
#add-favorite-btn{
  padding:7px 14px; border-radius:999px; border:1px solid var(--accent); background:transparent;
  color:var(--accent); font-size:12px; font-weight:700; cursor:pointer;
}
#add-favorite-btn:disabled{opacity:.4; cursor:not-allowed;}
.favorites-list{display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:14px;}
.favorite-card{position:relative; text-align:left;}
.favorite-card .art{width:100%; aspect-ratio:1; border-radius:8px; background:#1c1c1c #262626 center/cover; overflow:hidden;}
.favorite-card .art img{width:100%; height:100%; object-fit:cover; display:block;}
.favorite-card .title{font-size:12px; font-weight:700; margin:8px 0 2px; line-height:1.3;}
.favorite-card .artist{font-size:11px; color:var(--muted);}
.favorite-card .remove-fav{
  position:absolute; top:6px; right:6px; width:22px; height:22px; border-radius:50%;
  background:rgba(0,0,0,.65); color:#fff; border:none; font-size:12px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
.favorites-hint{color:var(--muted); font-size:11.5px; margin:14px 0 0;}

.modal-overlay{
  position:fixed; inset:0; background:rgba(0,0,0,.6); z-index:2000;
  display:flex; align-items:center; justify-content:center; padding:20px;
}
.modal-box{
  background:var(--card); border:1px solid #262626; border-radius:14px;
  width:100%; max-width:460px; max-height:78vh; display:flex; flex-direction:column;
  padding:20px;
}
.modal-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:14px;}
.modal-head h3{margin:0; font-size:16px;}
.modal-head button{background:none; border:none; color:var(--muted); font-size:16px; cursor:pointer;}
#picker-search{
  background:#111; border:1px solid #262626; border-radius:8px; color:var(--fg);
  font-size:13px; padding:9px 12px; margin-bottom:14px; width:100%;
}
#picker-search:focus{outline:none; border-color:var(--accent);}
.picker-results{overflow-y:auto; flex:1;}
.picker-row{
  display:flex; align-items:center; gap:10px; padding:8px 6px; border-radius:8px; cursor:pointer;
}
.picker-row:hover{background:#1c1c1c;}
.picker-row .art{width:38px; height:38px; border-radius:6px; background:#1c1c1c; overflow:hidden; flex:none;}
.picker-row .art img{width:100%; height:100%; object-fit:cover; display:block;}
.picker-row .meta{min-width:0;}
.picker-row .t{font-size:13px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.picker-row .a{font-size:11px; color:var(--muted);}
.picker-empty{color:var(--muted); font-size:12.5px; padding:16px 6px; text-align:center;}
