/* ============================================
   MySpace Throwback Theme (2005 Aesthetic)
   For BOTB performer and audience profiles
   ============================================ */

/* Base MySpace container — applies user-chosen CSS custom properties */
.myspace-profile {
    font-family: 'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', Arial, sans-serif;
    position: relative;
    overflow: hidden;
    background-color: var(--myspace-bg, #000);
    color: var(--myspace-text, #fff);
}

/* Glitter overlay effect — child div */
.myspace-glitter {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Ccircle cx='10' cy='10' r='1' fill='%23fff' opacity='0.5'/%3E%3Ccircle cx='30' cy='20' r='0.5' fill='%23fff' opacity='0.3'/%3E%3Ccircle cx='50' cy='15' r='1' fill='%23fff' opacity='0.4'/%3E%3Ccircle cx='70' cy='25' r='0.5' fill='%23fff' opacity='0.5'/%3E%3Ccircle cx='90' cy='10' r='1' fill='%23fff' opacity='0.3'/%3E%3Ccircle cx='20' cy='40' r='0.5' fill='%23fff' opacity='0.4'/%3E%3Ccircle cx='40' cy='35' r='1' fill='%23fff' opacity='0.5'/%3E%3Ccircle cx='60' cy='45' r='0.5' fill='%23fff' opacity='0.3'/%3E%3Ccircle cx='80' cy='40' r='1' fill='%23fff' opacity='0.4'/%3E%3Ccircle cx='15' cy='60' r='1' fill='%23fff' opacity='0.5'/%3E%3Ccircle cx='35' cy='55' r='0.5' fill='%23fff' opacity='0.3'/%3E%3Ccircle cx='55' cy='65' r='1' fill='%23fff' opacity='0.4'/%3E%3Ccircle cx='75' cy='60' r='0.5' fill='%23fff' opacity='0.5'/%3E%3Ccircle cx='95' cy='55' r='1' fill='%23fff' opacity='0.3'/%3E%3Ccircle cx='25' cy='80' r='0.5' fill='%23fff' opacity='0.4'/%3E%3Ccircle cx='45' cy='75' r='1' fill='%23fff' opacity='0.5'/%3E%3Ccircle cx='65' cy='85' r='0.5' fill='%23fff' opacity='0.3'/%3E%3Ccircle cx='85' cy='80' r='1' fill='%23fff' opacity='0.4'/%3E%3Ccircle cx='5' cy='95' r='0.5' fill='%23fff' opacity='0.5'/%3E%3C/svg%3E");
    animation: glitterMove 3s linear infinite;
    opacity: 0.6;
}

/* Legacy glitter class (modifier on parent) */
.myspace-profile.glitter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1000;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Ccircle cx='10' cy='10' r='1' fill='%23fff' opacity='0.5'/%3E%3Ccircle cx='30' cy='20' r='0.5' fill='%23fff' opacity='0.3'/%3E%3Ccircle cx='50' cy='15' r='1' fill='%23fff' opacity='0.4'/%3E%3Ccircle cx='70' cy='25' r='0.5' fill='%23fff' opacity='0.5'/%3E%3Ccircle cx='90' cy='10' r='1' fill='%23fff' opacity='0.3'/%3E%3Ccircle cx='20' cy='40' r='0.5' fill='%23fff' opacity='0.4'/%3E%3Ccircle cx='40' cy='35' r='1' fill='%23fff' opacity='0.5'/%3E%3Ccircle cx='60' cy='45' r='0.5' fill='%23fff' opacity='0.3'/%3E%3Ccircle cx='80' cy='40' r='1' fill='%23fff' opacity='0.4'/%3E%3Ccircle cx='15' cy='60' r='1' fill='%23fff' opacity='0.5'/%3E%3Ccircle cx='35' cy='55' r='0.5' fill='%23fff' opacity='0.3'/%3E%3Ccircle cx='55' cy='65' r='1' fill='%23fff' opacity='0.4'/%3E%3Ccircle cx='75' cy='60' r='0.5' fill='%23fff' opacity='0.5'/%3E%3Ccircle cx='95' cy='55' r='1' fill='%23fff' opacity='0.3'/%3E%3Ccircle cx='25' cy='80' r='0.5' fill='%23fff' opacity='0.4'/%3E%3Ccircle cx='45' cy='75' r='1' fill='%23fff' opacity='0.5'/%3E%3Ccircle cx='65' cy='85' r='0.5' fill='%23fff' opacity='0.3'/%3E%3Ccircle cx='85' cy='80' r='1' fill='%23fff' opacity='0.4'/%3E%3Ccircle cx='5' cy='95' r='0.5' fill='%23fff' opacity='0.5'/%3E%3C/svg%3E");
    animation: glitterMove 3s linear infinite;
    opacity: 0.6;
}

@keyframes glitterMove {
    0% { background-position: 0 0; }
    100% { background-position: 100px 100px; }
}

/* Classic MySpace header */
.myspace-header {
    background: linear-gradient(135deg, #003366 0%, #006699 100%);
    padding: 1rem;
    border: 3px solid #ff6600;
    border-radius: 0;
}

.myspace-header h1 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff6600;
    text-shadow: 1px 1px 0 #000;
    margin: 0;
}

/* Profile picture with classic border */
.myspace-profile-pic {
    border: 3px solid #ff6600;
    padding: 3px;
    background: #000;
}

.myspace-profile-pic img {
    display: block;
    width: 100%;
    height: auto;
}

/* Classic table-based layout look */
.myspace-section {
    border: 2px solid #336699;
    margin-bottom: 10px;
    background: #000;
}

.myspace-section-header {
    background: linear-gradient(180deg, #336699 0%, #003366 100%);
    padding: 4px 8px;
    font-weight: bold;
    color: #fff;
    font-size: 12px;
    text-transform: uppercase;
}

.myspace-section-body {
    padding: 10px;
    font-size: 12px;
    line-height: 1.5;
}

/* Scrolling marquee text */
.myspace-marquee {
    overflow: hidden;
    white-space: nowrap;
    background: #000;
    padding: 5px 0;
    border-top: 1px solid #ff6600;
    border-bottom: 1px solid #ff6600;
}

.myspace-marquee-text {
    display: inline-block;
    animation: marqueeScroll 15s linear infinite;
    font-size: 14px;
    font-weight: bold;
    color: #ff6600;
}

@keyframes marqueeScroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* "Now Playing" widget */
.myspace-now-playing {
    background: linear-gradient(180deg, #1a1a1a 0%, #000 100%);
    border: 2px solid #336699;
    padding: 10px;
    margin-bottom: 10px;
}

.myspace-now-playing-header {
    font-size: 10px;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 5px;
}

.myspace-now-playing-title {
    font-weight: bold;
    color: #ff6600;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.myspace-now-playing-visualizer {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 20px;
    margin-top: 5px;
}

.myspace-now-playing-bar {
    width: 4px;
    background: #ff6600;
    animation: barBounce 0.5s ease-in-out infinite alternate;
}

.myspace-now-playing-bar:nth-child(1) { height: 8px; animation-delay: 0s; }
.myspace-now-playing-bar:nth-child(2) { height: 16px; animation-delay: 0.1s; }
.myspace-now-playing-bar:nth-child(3) { height: 12px; animation-delay: 0.2s; }
.myspace-now-playing-bar:nth-child(4) { height: 20px; animation-delay: 0.3s; }
.myspace-now-playing-bar:nth-child(5) { height: 10px; animation-delay: 0.4s; }
.myspace-now-playing-bar:nth-child(6) { height: 14px; animation-delay: 0.1s; }
.myspace-now-playing-bar:nth-child(7) { height: 18px; animation-delay: 0.2s; }
.myspace-now-playing-bar:nth-child(8) { height: 6px; animation-delay: 0.3s; }

@keyframes barBounce {
    0% { transform: scaleY(0.5); }
    100% { transform: scaleY(1); }
}

/* Classic MySpace comments/kudos */
.myspace-comments {
    border: 2px solid #336699;
}

.myspace-comment {
    padding: 10px;
    border-bottom: 1px solid #333;
    font-size: 12px;
}

.myspace-comment:last-child {
    border-bottom: none;
}

.myspace-comment-author {
    color: #ff6600;
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
}

.myspace-comment-date {
    font-size: 10px;
    color: #666;
}

/* Friends/Top 8 grid */
.myspace-friends-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.myspace-friend {
    text-align: center;
}

.myspace-friend img {
    width: 75px;
    height: 75px;
    object-fit: cover;
    border: 2px solid #ff6600;
}

.myspace-friend-name {
    font-size: 10px;
    color: #ff6600;
    text-decoration: underline;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Classic link styling — uses CSS variables for user-chosen colors */
.myspace-profile a {
    color: var(--myspace-link, #ff6600);
    text-decoration: underline;
}

.myspace-profile a:hover {
    opacity: 0.85;
}

/* Blinkies and badges */
.myspace-blinkie {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Classic button styling */
.myspace-btn {
    background: linear-gradient(180deg, #4a90d9 0%, #336699 50%, #264d73 100%);
    border: 1px solid #1a3d5c;
    color: #fff;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
}

.myspace-btn:hover {
    background: linear-gradient(180deg, #5aa0e9 0%, #4477aa 50%, #336699 100%);
}

.myspace-btn-orange {
    background: linear-gradient(180deg, #ff9933 0%, #ff6600 50%, #cc5200 100%);
    border-color: #993d00;
}

.myspace-btn-orange:hover {
    background: linear-gradient(180deg, #ffaa44 0%, #ff7711 50%, #dd6311 100%);
}

/* Contact box */
.myspace-contact-box {
    background: #1a1a1a;
    border: 2px solid #336699;
    padding: 10px;
}

.myspace-contact-box a {
    display: block;
    padding: 5px;
    margin: 3px 0;
    background: #003366;
    text-align: center;
    font-size: 11px;
    color: #fff;
    text-decoration: none;
}

.myspace-contact-box a:hover {
    background: #004d99;
    color: #ff6600;
}

/* Status/mood indicator */
.myspace-status {
    font-size: 11px;
    padding: 5px;
    background: #1a1a1a;
    border: 1px solid #333;
}

.myspace-status-mood {
    color: #ff6600;
    font-weight: bold;
}

/* Hit counter */
.myspace-hit-counter {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    background: #000;
    color: #0f0;
    padding: 2px 8px;
    border: 1px solid #333;
    display: inline-block;
}

/* Under construction gif text (no actual gif) */
.myspace-under-construction {
    color: #ff0;
    font-weight: bold;
    font-size: 12px;
    animation: constructionBlink 0.8s infinite;
    text-align: center;
    padding: 10px;
    background: repeating-linear-gradient(
        45deg,
        #ff0,
        #ff0 10px,
        #000 10px,
        #000 20px
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes constructionBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Audience profile specific */
.myspace-audience-card {
    max-width: 400px;
    margin: 0 auto;
    background: #000;
    padding: 15px;
    border: 3px solid #ff6600;
}

.myspace-audience-card .myspace-profile-pic {
    width: 100px;
    height: 100px;
    margin: 0 auto 10px;
    border-radius: 0;
}

.myspace-audience-headline {
    text-align: center;
    font-size: 14px;
    font-style: italic;
    color: #999;
    margin: 10px 0;
    padding: 10px;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
}

/* Color scheme presets */
.myspace-theme-classic {
    --myspace-bg: #000000;
    --myspace-text: #ffffff;
    --myspace-link: #ff6600;
    --myspace-accent: #336699;
}

.myspace-theme-pink {
    --myspace-bg: #ffccff;
    --myspace-text: #660066;
    --myspace-link: #ff00ff;
    --myspace-accent: #ff66ff;
}

.myspace-theme-emo {
    --myspace-bg: #000000;
    --myspace-text: #ff0000;
    --myspace-link: #ff0066;
    --myspace-accent: #330000;
}

.myspace-theme-scene {
    --myspace-bg: #000000;
    --myspace-text: #00ff00;
    --myspace-link: #ff00ff;
    --myspace-accent: #00ffff;
}

/* Apply theme variables (legacy data-theme selector) */
.myspace-profile[data-theme] {
    background-color: var(--myspace-bg);
    color: var(--myspace-text);
}

.myspace-profile[data-theme] a {
    color: var(--myspace-link);
}

.myspace-profile[data-theme] .myspace-section {
    border-color: var(--myspace-accent);
}

.myspace-profile[data-theme] .myspace-section-header {
    background: var(--myspace-accent);
}

/* ============================================
   MySpace Profile Layout Boxes
   ============================================ */

/* Profile avatar — constrained size */
.myspace-avatar {
    display: block;
    width: 180px;
    max-width: 100%;
    height: auto;
    border: 3px solid var(--myspace-link, #ff6600);
    padding: 3px;
    background: #000;
    margin-bottom: 12px;
}

/* Content boxes */
.myspace-box {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--myspace-link, #ff6600);
    padding: 15px;
}

.myspace-box-title {
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--myspace-link, #ff6600);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

/* Display name */
.myspace-name {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--myspace-link, #ff6600);
    text-shadow: 1px 1px 0 #000;
    margin: 0 0 4px 0;
}

/* Username / subtitle */
.myspace-tagline {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* Stats row */
.myspace-stats {
    display: flex;
    gap: 10px;
}

.myspace-stat {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.myspace-stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--myspace-link, #ff6600);
}

.myspace-stat-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

/* Social links row */
.myspace-social {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.myspace-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--myspace-link, #ff6600);
    color: var(--myspace-link, #ff6600);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.myspace-social-link:hover {
    background: var(--myspace-link, #ff6600);
    color: #000;
    text-decoration: none;
}

/* Now Playing — alias classes used in profile HTML */
.myspace-now-playing-label {
    font-size: 10px;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 5px;
}

.myspace-now-playing-song {
    font-weight: bold;
    color: var(--myspace-link, #ff6600);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* MySpace comments box inside profile */
.myspace-box.myspace-comments {
    padding: 0;
}

.myspace-box.myspace-comments > .myspace-box-title {
    padding: 10px 15px 8px;
    margin-bottom: 0;
    border-bottom: 2px solid var(--myspace-link, #ff6600);
}

.myspace-box.myspace-comments .wall-post-composer {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.myspace-box.myspace-comments #wall-posts-list {
    padding: 0 15px 15px;
}

/* Top 8 Friends Grid */
.myspace-top8 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.myspace-friend {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: var(--myspace-text, #fff);
    transition: transform 0.2s;
}

.myspace-friend:hover {
    transform: scale(1.05);
}

.myspace-friend img {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    border: 2px solid var(--myspace-link, #ff6600);
    object-fit: cover;
    margin-bottom: 5px;
}

.myspace-friend-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    border: 2px solid var(--myspace-link, #ff6600);
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    color: #666;
}

.myspace-friend span {
    font-size: 10px;
    line-height: 1.2;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 575px) {
    .myspace-top8 {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    .myspace-friend img,
    .myspace-friend-placeholder {
        width: 40px;
        height: 40px;
    }
}
