/* Profile-only old-web customization layer. No forum/category/thread styles live here. */
.profile-page.profile-oldweb {
  --profile-accent: #d653a6;
  position: relative;
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 16px;
  border: 2px solid color-mix(in srgb, var(--profile-accent) 72%, #4a3254);
  border-radius: 3px;
  overflow: hidden;
  color: #302436;
  font-family: Tahoma, Verdana, Arial, sans-serif;
  background-color: #d8c7e4;
  background-position: center top;
  background-repeat: repeat;
  box-shadow: 0 0 0 4px #18131d, 0 18px 45px rgba(0,0,0,.42);
}

.profile-page.profile-oldweb > * { position: relative; z-index: 1; }

.profile-page.profile-bg-default, .theme-screenshot.profile-bg-default {
  background-color: #d5e8de;
  background-image:
    linear-gradient(45deg, rgba(245,124,202,.18) 25%, transparent 25% 75%, rgba(130,105,215,.16) 75%),
    linear-gradient(-45deg, rgba(134,219,182,.18) 25%, transparent 25% 75%, rgba(255,255,255,.22) 75%);
  background-size: 54px 54px;
}

.profile-page.profile-bg-stars, .theme-screenshot.profile-bg-stars {
  background-color: #090614;
  background-image:
    radial-gradient(circle at 18px 16px, #fff 0 1px, transparent 1.7px),
    radial-gradient(circle at 57px 43px, #ff71ca 0 1.3px, transparent 2px),
    radial-gradient(circle at 92px 12px, #b784ff 0 1px, transparent 1.8px),
    linear-gradient(145deg, rgba(112,62,141,.25), transparent 42%);
  background-size: 110px 64px,110px 64px,110px 64px,100% 100%;
}

.profile-page.profile-bg-checker, .theme-screenshot.profile-bg-checker {
  background-color: #231126;
  background-image:
    linear-gradient(45deg, rgba(255,111,195,.2) 25%, transparent 25% 75%, rgba(255,111,195,.2) 75%),
    linear-gradient(45deg, rgba(172,117,255,.17) 25%, transparent 25% 75%, rgba(172,117,255,.17) 75%);
  background-position: 0 0, 18px 18px;
  background-size: 36px 36px;
}

.profile-page.profile-bg-grid, .theme-screenshot.profile-bg-grid {
  background-color: #0d1120;
  background-image:
    linear-gradient(rgba(83,225,255,.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,84,192,.16) 1px, transparent 1px),
    radial-gradient(circle at 50% -20%, rgba(190,121,255,.34), transparent 50%);
  background-size: 22px 22px,22px 22px,100% 100%;
}

.profile-page.profile-bg-rays, .theme-screenshot.profile-bg-rays {
  background-color: #9fe1bd;
  background-image:
    repeating-conic-gradient(from 202deg at 50% -5%, rgba(255,126,208,.38) 0 11deg, rgba(255,255,255,.12) 11deg 22deg, rgba(125,223,190,.36) 22deg 34deg),
    linear-gradient(180deg, rgba(255,255,255,.45), rgba(180,126,209,.22));
}

.profile-page.profile-bg-static, .theme-screenshot.profile-bg-static {
  background-color: #18121c;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255,70,190,.05) 0 1px, transparent 1px 5px),
    radial-gradient(circle at 20% 0, rgba(255,88,199,.25), transparent 32%),
    radial-gradient(circle at 80% 0, rgba(166,109,255,.23), transparent 36%);
}

.profile-page.profile-bg-custom { background-color: #171119; background-repeat: repeat; background-position: left top; }

.oldweb-marquee {
  overflow: hidden;
  margin: -4px -4px 12px;
  border: 1px solid rgba(0,0,0,.28);
  background: #160d1d;
  color: #fff6ff;
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.oldweb-marquee div { width: max-content; padding: 6px 0; animation: shardspace-scroll 18s linear infinite; }
@keyframes shardspace-scroll { from { transform: translateX(70%); } to { transform: translateX(-100%); } }

.oldweb-grid { display: grid; grid-template-columns: minmax(240px, .86fr) minmax(0, 1.35fr); gap: 12px; align-items: start; }
.oldweb-column { display: grid; gap: 12px; }

.oldweb-box {
  border: 1px solid color-mix(in srgb, var(--profile-accent) 72%, #763c68);
  background: rgba(255,248,252,.91);
  box-shadow: 3px 3px 0 rgba(58,31,62,.14);
}
.oldweb-box-title {
  padding: 5px 8px;
  background: var(--profile-accent);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .025em;
  text-transform: uppercase;
  text-shadow: 1px 1px 0 rgba(0,0,0,.22);
}

.oldweb-profile-body { padding: 12px; text-align: center; }
.oldweb-avatar { min-height: 102px; display: grid; place-items: center; margin-bottom: 9px; }
.oldweb-avatar .mc-head.large { width: 86px; height: 86px; }
.oldweb-name { color: #211826; font-family: Georgia, "Times New Roman", serif; font-size: 21px; font-weight: 800; }
.oldweb-headline { margin: 7px auto 5px; max-width: 240px; color: #4e324e; font-family: Georgia, serif; font-size: 13px; font-style: italic; line-height: 1.38; }
.oldweb-online { margin: 8px 0 5px; color: #20a461; font-size: 11px; font-weight: 900; }
.oldweb-mood { color: #4c3e50; font-size: 11px; }
.oldweb-stats { margin-top: 10px; padding-top: 8px; border-top: 1px dotted #b99dbc; color: #715f75; font-size: 10px; line-height: 1.45; }

.profile-customize-btn {
  margin-top: 11px;
  min-height: 30px;
  padding: 0 11px;
  border: 2px outset #f5d3eb;
  border-radius: 0;
  background: linear-gradient(#fff3fc,#eab2d5);
  color: #5b2850;
  font-family: Tahoma,Verdana,sans-serif;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}
.profile-customize-btn:active { border-style: inset; }

.oldweb-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; padding: 7px; background: #fff; }
.oldweb-contact-grid button {
  min-height: 28px;
  border: 0;
  background: transparent;
  color: #4f3154;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
.oldweb-contact-grid button:hover { color: var(--profile-accent); text-decoration: underline; }

.oldweb-copy { padding: 11px; min-height: 75px; color: #3f3144; font-family: Georgia,"Times New Roman",serif; font-size: 12px; font-weight: 600; line-height: 1.48; white-space: pre-wrap; }
.oldweb-about { min-height: 135px; }
.oldweb-interests { font-size: 11px; }
.oldweb-friend-count { padding: 10px 11px 2px; color: #533b59; font-size: 10px; }
.oldweb-friend-count b { color: var(--profile-accent); }
.oldweb-friends { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; padding: 9px 11px 12px; }
.oldweb-friend { min-width: 0; display: grid; justify-items: center; gap: 4px; color: #4b3450; text-decoration: none; font-size: 9px; font-weight: 800; }
.oldweb-friend:hover { color: var(--profile-accent); text-decoration: underline; }
.mc-head.oldweb-friend-head { width: 52px; height: 52px; border-radius: 0; }

.oldweb-signature-stage {
  min-height: 140px;
  padding: 12px;
  color: #f5ecf8;
  background:
    radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--profile-accent) 32%, transparent), transparent 35%),
    #120e16;
  text-align: center;
  overflow: hidden;
}
.oldweb-signature-image { display: block; max-width: 100%; max-height: 210px; object-fit: contain; margin: 0 auto 9px; border: 1px solid #5d475e; }
.oldweb-signature-text { margin: 4px 0 11px; color: #f7e9f6; font-family: Georgia,"Times New Roman",serif; font-size: 17px; font-style: italic; text-shadow: 0 0 8px color-mix(in srgb,var(--profile-accent) 60%, transparent); }
.oldweb-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; max-width: 560px; margin: 0 auto; }
.oldweb-sigbar {
  display: block;
  min-height: 18px;
  padding: 2px 6px;
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  font: 900 9px/14px Tahoma,Verdana,sans-serif;
  letter-spacing: .05em;
  text-align: right;
  text-shadow: 1px 1px #000;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.35);
}
.oldweb-sigbar-cpvp { background: linear-gradient(90deg,#111936,#4856a8,#e45ab9); }
.oldweb-sigbar-night { background: linear-gradient(90deg,#03050d,#28225d,#6d46a4); }
.oldweb-sigbar-retro { background: repeating-linear-gradient(90deg,#54315f 0 12px,#df67b9 12px 24px,#31223c 24px 36px); }
.oldweb-sigbar-anchor { background: linear-gradient(90deg,#292929,#686868,#bd4d7d); }
.oldweb-sigbar-theme { background: linear-gradient(90deg,#356f69,#7e4f98,#e15aaf); }
.oldweb-sigbar-forum { background: linear-gradient(90deg,#4a311f,#8b5834,#d78b5a); }

.oldweb-activity-box { margin-top: 12px; }
.oldweb-activity-box .profile-activity { border: 0; border-radius: 0; background: rgba(255,248,252,.94); box-shadow: none; }
.oldweb-activity-box .profile-activity-row { color: #49364e; border-color: #e3cbdc; }
.oldweb-activity-box .profile-activity-row a { color: color-mix(in srgb,var(--profile-accent) 80%,#5b2451); }

/* Minecraft avatar frame choices */
.mc-head.large.profile-frame-none { box-shadow: inset 0 0 0 2px rgba(255,255,255,.08),0 0 0 1px #0c0a0e; }
.mc-head.large.profile-frame-pixel { border-radius: 0; outline: 4px solid #382a42; box-shadow: 0 0 0 7px var(--profile-accent),0 0 0 10px #5b3a72,0 7px 18px rgba(0,0,0,.35); }
.mc-head.large.profile-frame-neon { outline: 2px solid #ff78cf; box-shadow: 0 0 0 5px rgba(190,121,255,.65),0 0 18px #ff6dc8,0 0 35px rgba(190,121,255,.72); }
.mc-head.large.profile-frame-chrome { outline: 4px ridge #d8c6df; box-shadow: 0 0 0 2px #5d4b66,0 0 0 7px #b68ec1,inset 0 0 10px rgba(255,255,255,.35); }
.mc-head.large.profile-frame-arcade { border-radius: 2px; outline: 3px solid #2bd8d0; box-shadow: 0 0 0 6px #21263f,0 0 0 9px #ff58bb,7px 7px 0 #7348a8; }
.mc-head.large.profile-frame-gem { outline: 3px solid #c875ff; box-shadow: 0 0 0 6px #563169,0 0 0 9px #f06ac5,0 0 22px rgba(240,106,197,.42); transform: rotate(-1deg); }

/* Editor: intentionally looks more like an old profile/layout editor than a SaaS settings panel. */
.profile-editor-backdrop { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 18px; background: rgba(7,5,9,.82); }
.profile-editor { width: min(730px,100%); max-height: calc(100vh - 36px); overflow: auto; border: 2px solid #d36aaf; border-radius: 2px; background: #efe4ef; color: #37283c; box-shadow: 8px 8px 0 #120d16,0 30px 100px rgba(0,0,0,.65); font-family: Tahoma,Verdana,Arial,sans-serif; }
.profile-editor-head { display: flex; align-items: center; justify-content: space-between; padding: 7px 9px; border-bottom: 1px solid #9d4d84; background: linear-gradient(#e66bbb,#b7438d); color: #fff; }
.profile-editor-head strong { font-size: 12px; letter-spacing: .04em; text-shadow: 1px 1px #6f2c5a; }
.profile-editor-close { width: 24px; height: 22px; border: 2px outset #f6cae7; border-radius: 0; background: #edd5e7; color: #6d3158; cursor: pointer; font-weight: 900; }
.profile-editor-body { padding: 12px; }
.profile-editor-note { margin: 0 0 14px; padding: 7px 8px; border: 1px dashed #a98aa4; background: #fff8fd; color: #765d75; font: 11px/1.45 "Courier New",monospace; }
.profile-editor-section + .profile-editor-section { margin-top: 15px; }
.profile-editor-label { margin-bottom: 7px; padding: 4px 6px; background: #c75098; color: #fff; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.profile-editor-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.profile-editor-fields label { display: grid; gap: 4px; color: #655165; font-size: 10px; font-weight: 800; }
.profile-editor-fields label:nth-child(3),.profile-editor-fields label:nth-child(4),.profile-editor-fields label:nth-child(5) { grid-column: 1 / -1; }
.profile-editor-fields input,.profile-editor-fields textarea { width: 100%; border: 2px inset #e3d0df; border-radius: 0; background: #fff; color: #2d2031; padding: 6px; outline: 0; font: 11px Tahoma,Verdana,sans-serif; }
.profile-editor-fields textarea { min-height: 78px; resize: vertical; }
.profile-color-row { display: flex; align-items: center; gap: 10px; color: #6e596d; font-size: 10px; }
.profile-color-row input { width: 48px; height: 32px; padding: 0; border: 2px inset #e4d0df; background: #fff; }

.profile-choice-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
.profile-choice { min-height: 67px; padding: 6px; border: 2px outset #ead6e4; border-radius: 0; background: #fff9fd; color: #554155; text-align: left; cursor: pointer; }
.profile-choice:hover { background: #fff; }
.profile-choice.selected { border-style: inset; outline: 2px solid #db5cac; background: #f7ddec; }
.profile-choice-preview { display: block; height: 31px; margin-bottom: 5px; border: 1px solid #9c819a; overflow: hidden; }
.profile-choice-name { display: block; font-size: 9px; font-weight: 900; }
.profile-bg-preview-default { background: linear-gradient(45deg,#cae9d9,#e5b0d5,#c8b4e1); }
.profile-bg-preview-stars { background: #0e0a18 radial-gradient(circle,#ff8ed4 0 1px,transparent 1.5px); background-size: 13px 13px; }
.profile-bg-preview-checker { background: conic-gradient(#55215a 25%,#1a1220 0 50%,#55215a 0 75%,#1a1220 0); background-size: 16px 16px; }
.profile-bg-preview-grid { background: #10121d linear-gradient(#6c5599 1px,transparent 1px); background-size: 8px 8px; }
.profile-bg-preview-rays { background: repeating-conic-gradient(from 200deg,#6fcf9f 0 12deg,#e772bd 12deg 24deg,#d6c3e7 24deg 36deg); }
.profile-bg-preview-static { background: repeating-linear-gradient(0deg,#281d2d 0 2px,#151018 2px 4px); }
.profile-bg-preview-custom { background: linear-gradient(135deg,#2b2131,#68426e); }
.profile-frame-preview { display: grid; place-items: center; height: 31px; margin-bottom: 5px; }
.profile-frame-dot { width: 22px; height: 22px; background: #c9987c; border: 3px solid #2a2130; }
.profile-frame-dot.pixel { box-shadow: 0 0 0 3px #e06ac2,0 0 0 5px #5b3a72; }
.profile-frame-dot.neon { box-shadow: 0 0 0 2px #ff78cf,0 0 10px #c875ff; }
.profile-frame-dot.chrome { box-shadow: 0 0 0 3px #d8c6df,0 0 0 5px #69556f; }
.profile-frame-dot.arcade { box-shadow: 0 0 0 2px #2bd8d0,0 0 0 4px #ff58bb,4px 4px 0 #7348a8; }
.profile-frame-dot.gem { box-shadow: 0 0 0 2px #c875ff,0 0 0 4px #563169,0 0 0 6px #f06ac5; }

.profile-badge-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.profile-badge-choice { display: grid; grid-template-columns: 18px 1fr; gap: 5px; align-items: center; cursor: pointer; }
.profile-badge-choice input { accent-color: #ce4f9f; }
.profile-upload-row { display: flex; align-items: center; gap: 9px; margin-top: 8px; }
.profile-upload-label { display: inline-flex; align-items: center; min-height: 28px; padding: 0 8px; border: 2px outset #ead6e4; background: #fff9fd; color: #5c435a; font-size: 9px; font-weight: 900; cursor: pointer; }
.profile-upload-label:active { border-style: inset; }
.profile-upload-label input { display: none; }
.profile-upload-status { color: #786777; font-size: 9px; }
.profile-editor-actions { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-top: 1px solid #b993ad; background: #dfcddd; }
.profile-editor-actions-right { display: flex; gap: 6px; margin-left: auto; }
.profile-editor-btn { min-height: 28px; padding: 0 9px; border: 2px outset #ead6e4; border-radius: 0; background: #fff9fd; color: #5c435a; font-size: 9px; font-weight: 900; cursor: pointer; }
.profile-editor-btn:active { border-style: inset; }
.profile-editor-btn.primary { background: #df67b3; color: #fff; border-color: #f0add8; }
.profile-editor-btn.danger { color: #8d3d68; }

@media (max-width: 760px) {
  .profile-page.profile-oldweb { padding: 10px; }
  .oldweb-grid { grid-template-columns: 1fr; }
  .oldweb-friends { grid-template-columns: repeat(3,1fr); }
  .profile-choice-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .profile-editor-fields { grid-template-columns: 1fr; }
  .profile-editor-fields label { grid-column: auto !important; }
}

@media (prefers-reduced-motion: reduce) {
  .oldweb-marquee div { animation: none; padding-left: 8px; }
}
