/**
 * Billboard Historical Charts - Frontend Styles
 */

/* Birthday Widget */
.bhc-birthday-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 600px;
    margin: 0 auto;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.bhc-birthday-header {
    text-align: center;
    padding: 30px 20px 20px;
    color: #fff;
}

.bhc-birthday-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.bhc-birthday-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

.bhc-birthday-header p {
    margin: 10px 0 0;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

/* Search Form */
.bhc-birthday-search-form {
    padding: 0 25px 25px;
}

.bhc-birthday-fields {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.bhc-birthday-field {
    flex: 1;
}

.bhc-birthday-field label {
    display: block;
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.bhc-birthday-field select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.bhc-birthday-field select:hover,
.bhc-birthday-field select:focus {
    border-color: #e4002b;
    outline: none;
}

.bhc-birthday-field select option {
    background: #1a1a1a;
    color: #fff;
}

.bhc-birthday-submit {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #e4002b 0%, #ff4757 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.bhc-birthday-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(228, 0, 43, 0.4);
}

.bhc-birthday-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Results */
.bhc-birthday-results {
    padding: 0 25px 25px;
}

.bhc-birthday-loading {
    text-align: center;
    padding: 40px;
}

.bhc-birthday-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #e4002b;
    border-radius: 50%;
    animation: bhc-spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes bhc-spin {
    to { transform: rotate(360deg); }
}

.bhc-birthday-empty {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255,255,255,0.6);
}

.bhc-birthday-empty-icon {
    font-size: 48px;
    opacity: 0.5;
    margin-bottom: 15px;
}

.bhc-birthday-empty h4 {
    margin: 0 0 10px;
    color: #fff;
}

.bhc-birthday-error {
    background: rgba(228, 0, 43, 0.2);
    border: 1px solid rgba(228, 0, 43, 0.3);
    color: #ff6b7a;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

/* Year Card */
.bhc-birthday-year-card {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.bhc-birthday-year-card:last-child {
    margin-bottom: 0;
}

.bhc-birthday-year-header {
    background: rgba(255,255,255,0.1);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bhc-birthday-year {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

.bhc-birthday-date {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

/* Number One */
.bhc-birthday-number-one {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.05) 100%);
}

.bhc-birthday-rank {
    font-size: 48px;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.bhc-birthday-song-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.bhc-birthday-cover {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.bhc-birthday-song-details {
    flex: 1;
}

.bhc-birthday-song-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.bhc-birthday-song-artist {
    margin: 5px 0 0;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

.bhc-birthday-weeks {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    font-size: 12px;
    color: rgba(255,255,255,0.8);
}

/* Top List */
.bhc-birthday-top-list {
    padding: 20px;
}

.bhc-birthday-top-list h4 {
    margin: 0 0 15px;
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bhc-birthday-top-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bhc-birthday-top-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.bhc-birthday-top-list li:last-child {
    border-bottom: none;
}

.bhc-birthday-top-list .pos {
    width: 30px;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
}

.bhc-birthday-top-list .song {
    flex: 1;
    font-weight: 600;
    color: #fff;
}

.bhc-birthday-top-list .artist {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
}

/* Song History */
.bhc-song-history {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 800px;
    margin: 0 auto;
}

.bhc-song-header {
    display: flex;
    gap: 25px;
    padding: 30px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 16px;
    color: #fff;
    margin-bottom: 25px;
}

.bhc-song-cover {
    width: 150px;
    height: 150px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.bhc-song-info {
    flex: 1;
}

.bhc-song-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.bhc-song-artist {
    margin: 8px 0 0;
    font-size: 18px;
    color: rgba(255,255,255,0.7);
}

.bhc-song-stats {
    display: flex;
    gap: 25px;
    margin-top: 20px;
}

.bhc-song-stat {
    text-align: center;
}

.bhc-song-stat .value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

.bhc-song-stat .label {
    display: block;
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.bhc-song-stat.highlight .value {
    color: #ffd700;
}

.bhc-song-links {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

.bhc-song-links a {
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: transform 0.2s;
}

.bhc-song-links a:hover {
    transform: translateY(-2px);
}

.bhc-link-spotify {
    background: #1DB954;
    color: #fff;
}

.bhc-link-youtube {
    background: #FF0000;
    color: #fff;
}

/* Timeline */
.bhc-song-timeline {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.bhc-song-timeline h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: #1a1a1a;
}

/* Position Chart */
.bhc-chart-graph {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.bhc-position-chart {
    flex: 1;
    height: 100px;
    display: flex;
    align-items: flex-end;
    gap: 1px;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 10px;
}

.bhc-bar {
    background: linear-gradient(to top, #e4002b, #ff6b7a);
    border-radius: 2px 2px 0 0;
    min-width: 3px;
    transition: background 0.2s;
}

.bhc-bar.is-one {
    background: linear-gradient(to top, #ffd700, #ffed4a);
}

.bhc-chart-labels {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 10px;
    color: #999;
    padding: 10px 0;
}

/* History Table */
.bhc-history-table {
    width: 100%;
    border-collapse: collapse;
}

.bhc-history-table th {
    text-align: left;
    padding: 12px;
    background: #f8f9fa;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    border-bottom: 2px solid #e0e0e0;
}

.bhc-history-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.bhc-history-table tr:hover td {
    background: #fafafa;
}

.bhc-history-table tr.is-one td {
    background: rgba(255, 215, 0, 0.1);
}

.bhc-history-table .position {
    font-weight: 700;
}

.bhc-history-table .number-one {
    background: #ffd700;
    color: #1a1a1a;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 700;
}

.bhc-history-table .movement .new {
    background: #007bff;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

.bhc-history-table .movement .up {
    color: #28a745;
    font-weight: 600;
}

.bhc-history-table .movement .down {
    color: #dc3545;
    font-weight: 600;
}

.bhc-history-table .movement .same {
    color: #999;
}

.bhc-more-entries {
    text-align: center;
    color: #999;
    font-size: 13px;
    margin-top: 15px;
}

/* Responsive */
@media (max-width: 600px) {
    .bhc-birthday-fields {
        flex-direction: column;
    }
    
    .bhc-birthday-number-one {
        flex-direction: column;
        text-align: center;
    }
    
    .bhc-birthday-song-info {
        flex-direction: column;
    }
    
    .bhc-song-header {
        flex-direction: column;
        text-align: center;
    }
    
    .bhc-song-cover {
        margin: 0 auto;
    }
    
    .bhc-song-stats {
        justify-content: center;
    }
    
    .bhc-song-links {
        justify-content: center;
    }
}

