/* Additional styles to fix current issues */

/* Platform Select Dropdown */
.platform-select {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius);
    font-size: 1rem;
    background: white;
    color: var(--dark);
    font-weight: 500;
    transition: var(--transition);
}

.platform-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Input and Select Styles */
.input-group {
    position: relative;
}

input[type="text"],
select {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius);
    font-size: 1rem;
    background: white;
    color: var(--dark);
    font-weight: 500;
    transition: var(--transition);
}

input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

input[type="text"]::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.button-group .btn {
    flex: 1;
}

/* Loading Spinner */
.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: relative;
}

.loading-spinner::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 3px solid transparent;
    border-top: 3px solid var(--secondary);
    border-radius: 50%;
    animation: spin 1.5s linear infinite reverse;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Music result layout */
.music-content {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.music-cover-container {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.music-cover:hover {
    transform: scale(1.05);
}

.music-cover-placeholder {
    font-size: 3rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
}

.music-info {
    flex: 1;
    min-width: 0;
}

.music-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.music-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.music-artist {
    font-size: 1.125rem;
    color: var(--gray);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.music-artist::before {
    content: '🎵';
    font-size: 1rem;
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.platform-kugou {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
}

.platform-qq {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    color: white;
}

.platform-netease {
    background: linear-gradient(135deg, #c084fc, #a855f7);
    color: white;
}

.platform-apple {
    background: linear-gradient(135deg, #6b7280, #374151);
    color: white;
}

.music-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 0;
}

.detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.detail-value {
    font-size: 0.95rem;
    color: var(--dark);
    font-weight: 500;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Icons for detail labels */
.detail-item:nth-child(1) .detail-label::before { content: '💿'; }
.detail-item:nth-child(2) .detail-label::before { content: '🏢'; }
.detail-item:nth-child(3) .detail-label::before { content: '📅'; }
.detail-item:nth-child(4) .detail-label::before { content: '⏱️'; }
.detail-item:nth-child(5) .detail-label::before { content: '🎼'; }

.music-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-small {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
}

.close-modal {
    color: var(--gray);
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--dark);
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

.changelog-version {
    margin-bottom: 2rem;
}

.changelog-version:last-child {
    margin-bottom: 0;
}

.changelog-version h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.changelog-version ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.changelog-version li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.875rem;
}

.changelog-version li:last-child {
    border-bottom: none;
}

.version-info {
    color: var(--gray);
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.8rem;
    transition: var(--transition);
}

.version-info:hover {
    color: var(--primary);
}

/* Modal Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .music-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .music-cover-container {
        width: 100%;
        height: 200px;
    }
    
    .music-details {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}