/* === ARTIST BROWSER STYLES === */
.artist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    padding: 4px 1rem; /* Changed from 0 1rem to 4px 1rem to show glow */
    margin: 4px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.artist-card {
    background-color: #181818;
    border-radius: 8px;
    box-shadow: 0 0 12px rgba(217, 168, 50, 0.3);
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 4px; /* Add margin to ensure glow is visible */
}

    .artist-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 6px 20px rgba(217, 168, 50, 0.5);
    }
    
    /* Horizontal card override */
    .artist-card.horizontal {
        flex-direction: row;
        align-items: flex-start;
        padding: 1rem;
        gap: 1rem;
        height: auto;
        min-height: 120px;
        margin: 4px; /* Ensure glow margin for horizontal cards */
    }

        .artist-card.horizontal .artist-image.square {
            width: 100px;
            height: 100px;
            border-radius: 8px;
            object-fit: cover;
            flex-shrink: 0;
            margin-bottom: 0;
        }

        .artist-card.horizontal .artist-info {
            padding: 0;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            flex: 1;
            min-width: 0;
            overflow: hidden;
        }

.artist-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

.artist-info {
    padding: 1rem;
    color: #e0e0e0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.artist-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(217, 168, 50, 1);
    margin-bottom: 0.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}

.artist-bio {
    font-size: 0.95rem;
    color: #e8e8e8;
    margin-bottom: 0.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

    .artist-bio.collapsed {
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        max-height: 4.5em;
    }

    .artist-bio.expanded {
        overflow: visible;
    }

.bio-toggle {
    background: none;
    border: none;
    color: rgba(217, 168, 50, 1);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
    margin-top: 0.25rem;
    text-decoration: underline;
    align-self: flex-start;
}

    .bio-toggle:hover {
        color: rgba(217, 168, 50, 0.5);
    }

.artist-album-count {
    font-size: 0.9rem;
    color: #d0d0d0;
    margin-bottom: 0.5rem;
}

.artist-socials {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
    box-sizing: border-box;
    margin-top: auto;
}

    .artist-socials a {
        color: rgba(217, 168, 50, 1);
        font-size: 0.85rem;
        text-decoration: underline;
        word-break: break-word;
        overflow-wrap: break-word;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
        max-width: 100%;
    }

        .artist-socials a:hover {
            color: rgba(217, 168, 50, 0.5);
            text-decoration: none;
        }

/* === ARTIST DETAIL PAGE === */
.artist-detail-container {
    padding: 1rem;
    color: #e0e0e0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.artist-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.artist-detail-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 0 12px rgba(217, 168, 50, 0.3);
    flex-shrink: 0;
}

.artist-detail-info {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
}

.artist-detail-name {
    font-size: 2rem;
    color: rgba(217, 168, 50, 1);
    margin-bottom: 0.5rem;
    text-align: inherit;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.artist-detail-bio {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #e8e8e8;
    text-align: inherit;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.artist-detail-socials {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.5rem;
    list-style: none;
    padding-left: 0;
    width: 100%;
    box-sizing: border-box;
}

a.link-primary {
    text-decoration: none;
    transition: color 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

    a.link-primary:hover, a.link-primary:focus {
        color: rgba(217, 168, 50, 0.5) !important;
        text-decoration: none;
    }

    /* Artist detail mobile styles */
    .artist-detail-image {
        width: 100%;
        height: auto;
        max-width: 200px;
        max-height: 200px;
    }

/* === ARTIST PROFILE CARD === */
.artist-profile-card {
    background-color: rgba(20, 20, 20, 0.8);
    border-left: 5px solid rgba(217, 168, 50, 1);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 14px rgba(217, 168, 50, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

    .artist-profile-card:hover {
        transform: scale(1.02);
        box-shadow: 0 6px 20px rgba(217, 168, 50, 0.5);
    }

/* === ARTIST MERCH AND LEGACY PRODUCT SECTIONS === */
.artist-merch-section {
    background: #181818;
    border: 1px solid rgba(217, 168, 50, 0.25);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(217, 168, 50, 0.25);
    margin-top: 2rem;
}

.artist-merch-section h3 {
    color: rgba(217, 168, 50, 1);
    margin-bottom: .75rem;
}

.legacy-product-section {
    background: #181818;
    border: 1px solid rgba(217, 168, 50, 0.25);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(217, 168, 50, 0.2);
}

.legacy-product-section h4 {
    color: rgba(217, 168, 50, 1);
    margin-bottom: .5rem;
}

@media (max-width: 768px) {
    .artist-merch-section, .legacy-product-section {
        padding: 1.25rem;
    }
}

/* === LARGE TABLET === */
@media (max-width: 1024px) {
    .artist-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.25rem;
        padding: 4px 0.75rem; /* Maintain glow padding */
    }

    .artist-card.horizontal .artist-image.square {
        width: 90px;
        height: 90px;
    }

    .artist-name {
        font-size: 1.1rem;
    }

    .artist-bio {
        font-size: 0.9rem;
    }
}

/* === TABLET === */
@media (max-width: 768px) {
    .artist-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
        padding: 4px 0.5rem; /* Maintain glow padding */
    }

    .artist-card.horizontal {
        padding: 0.75rem;
        gap: 0.75rem;
        min-height: 100px;
        margin: 4px; /* Ensure glow margin */
    }

    .artist-card.horizontal .artist-image.square {
        width: 80px;
        height: 80px;
    }

    .artist-name {
        font-size: 1.05rem;
        margin-bottom: 0.3rem;
    }

    .artist-bio {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }

    .artist-album-count {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }

    .artist-socials a {
        font-size: 0.8rem;
    }

    .bio-toggle {
        font-size: 0.8rem;
    }

    /* Artist detail page tablet styles */
    .artist-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .artist-detail-info {
        align-items: center;
        max-width: 100%;
    }

    .artist-detail-name,
    .artist-detail-bio {
        text-align: center;
    }

    .artist-detail-image {
        width: 160px;
        height: 160px;
    }

    .artist-detail-name {
        font-size: 1.6rem;
    }

    .artist-detail-bio {
        font-size: 0.95rem;
    }
}

/* === MOBILE === */
@media (max-width: 480px) {
    .artist-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 4px 12px; /* Increased horizontal padding for better balance */
        margin: 0; /* Remove grid margin on mobile */
    }

    .artist-card.horizontal {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1rem;
        gap: 0.75rem;
        min-height: auto;
        margin: 4px 0; /* Remove left/right margin, keep top/bottom */
    }

    .artist-card.horizontal .artist-image.square {
        width: 120px;
        height: 120px;
        border-radius: 50%;
    }

    .artist-card.horizontal .artist-info {
        align-items: center;
        text-align: center;
    }

    .artist-name {
        font-size: 1.1rem;
        text-align: center;
    }

    .artist-bio {
        font-size: 0.9rem;
        text-align: center;
    }

    .artist-album-count {
        font-size: 0.85rem;
        text-align: center;
    }

    .artist-socials {
        align-items: center;
    }

    .artist-socials a {
        font-size: 0.8rem;
        text-align: center;
        white-space: normal;
        text-overflow: initial;
        overflow: visible;
    }

    /* Artist detail page mobile styles */
    .artist-detail-image {
        width: 140px;
        height: 140px;
    }

    .artist-detail-name {
        font-size: 1.4rem;
    }

    .artist-detail-bio {
        font-size: 0.9rem;
    }
}

/* === EXTRA SMALL MOBILE === */
@media (max-width: 320px) {
    .artist-grid {
        padding: 4px 10px; /* Better balanced padding for very small screens */
        gap: 0.5rem;
        margin: 0; /* Remove grid margin */
    }

    .artist-card.horizontal {
        padding: 0.75rem;
        margin: 4px 0; /* Remove left/right margin, keep top/bottom */
    }

    .artist-card.horizontal .artist-image.square {
        width: 100px;
        height: 100px;
    }

    .artist-name {
        font-size: 1rem;
    }

    .artist-bio {
        font-size: 0.85rem;
    }

    .artist-album-count {
        font-size: 0.8rem;
    }
}

/* === ARTIST SONG UPLOAD === */
.artist-upload-container {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    max-width: 600px;
    margin: 2rem auto;
}
.artist-upload-container h5 {
    color: #d9a832;
    font-weight: 600;
}
.artist-upload-container .input-group {
    margin-bottom: 1rem;
}
.artist-upload-container .form-label {
    font-weight: 500;
    color: #444;
}
.artist-upload-container .form-control {
    border-radius: 0.5rem;
}
.artist-upload-container .btn.base-primary {
    background: #d9a832;
    color: #fff;
    border-radius: 0.5rem;
    font-weight: 600;
}
.artist-upload-container .alert-info {
    background: #f8f9fa;
    color: #333;
    border-radius: 0.5rem;
}