/**
 * Hero Planet Styles
 *
 * Styles for the interactive hero planet with song overlay.
 */

/* Wrapper - circular container */
.hero-planet-wrapper {
    position: relative;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    max-width: 100%;
    aspect-ratio: 1 / 1;
}

/* Canvas container for Three.js */
.hero-planet-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
}

.hero-planet-canvas canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Overlay positioned over the planet */
.hero-planet-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    border-radius: 50%;
}

/* Loading state */
.hero-planet-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-planet-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #FF7350;
    border-radius: 50%;
    animation: hero-planet-spin 1s linear infinite;
}

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

/* Content container */
.hero-planet-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
}

/* Song info with album art */
.hero-planet-song-info {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 70%;
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Album art */
.hero-planet-album-art {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

/* Metadata section */
.hero-planet-metadata {
    text-align: left;
    flex: 1;
    min-width: 0;
}

.hero-planet-title {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-planet-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hero-planet-title a:hover {
    color: #FF7350;
}

.hero-planet-artist {
    margin: 0 0 6px 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-planet-artist a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.2s ease;
}

.hero-planet-artist a:hover {
    color: #FF4D80;
}

/* Tags with glassmorphism */
.hero-planet-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.hero-planet-tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.hero-planet-tag-genre {
    background: rgba(255, 77, 128, 0.3);
}

.hero-planet-tag-mood {
    background: rgba(140, 51, 179, 0.3);
}

.hero-planet-tag-bpm {
    background: rgba(51, 64, 166, 0.3);
}

.hero-planet-tag a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.hero-planet-tag a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Play button - large gradient */
.hero-planet-play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF7350 0%, #FF4D80 50%, #D933A0 100%);
    color: #fff;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 77, 128, 0.4);
}

.hero-planet-play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 30px rgba(255, 77, 128, 0.6);
}

.hero-planet-play-btn:active {
    transform: scale(0.98);
}

.hero-planet-play-btn svg {
    width: 36px;
    height: 36px;
    margin-left: 4px; /* Visual centering for play icon */
}

/* Refresh button - subtle, bottom-right */
.hero-planet-refresh-btn {
    position: absolute;
    bottom: 15%;
    right: 15%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s ease;
}

.hero-planet-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    transform: rotate(90deg);
}

.hero-planet-refresh-btn:active {
    transform: rotate(180deg);
}

.hero-planet-refresh-btn svg {
    width: 20px;
    height: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-planet-wrapper {
        max-width: 90vw;
        height: auto !important;
        width: 90vw !important;
    }

    .hero-planet-song-info {
        gap: 10px;
        padding: 10px 12px;
    }

    .hero-planet-album-art {
        width: 48px;
        height: 48px;
    }

    .hero-planet-title {
        font-size: 14px;
    }

    .hero-planet-artist {
        font-size: 11px;
    }

    .hero-planet-play-btn {
        width: 60px;
        height: 60px;
    }

    .hero-planet-play-btn svg {
        width: 28px;
        height: 28px;
    }

    .hero-planet-refresh-btn {
        width: 32px;
        height: 32px;
        bottom: 12%;
        right: 12%;
    }

    .hero-planet-refresh-btn svg {
        width: 16px;
        height: 16px;
    }

    .hero-planet-tag {
        font-size: 9px;
        padding: 2px 6px;
    }
}

@media (max-width: 480px) {
    .hero-planet-song-info {
        gap: 8px;
        padding: 8px 10px;
    }

    .hero-planet-album-art {
        width: 40px;
        height: 40px;
    }

    .hero-planet-title {
        font-size: 13px;
    }

    .hero-planet-artist {
        font-size: 10px;
        margin-bottom: 4px;
    }

    .hero-planet-play-btn {
        width: 50px;
        height: 50px;
    }

    .hero-planet-play-btn svg {
        width: 22px;
        height: 22px;
    }

    .hero-planet-tags {
        gap: 3px;
    }

    .hero-planet-tag {
        font-size: 8px;
        padding: 2px 5px;
    }
}
