* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: transparent;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: hidden;
}

/*
 * Widget sizing based on Amuse (6K Labs):
 * - Width: 405px with cover
 * - Album art: 112x112px
 * - Container uses flexbox with gap
 * - Padding: 12px
 * - Border radius: 16px (rounded-2xl)
 */

.widget {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 16px;
    min-width: 405px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.widget.hidden {
    opacity: 0;
    transform: translateY(10px);
}

.widget.visible {
    opacity: 1;
    transform: translateY(0);
}

.artwork-container {
    flex-shrink: 0;
    width: 112px;
    height: 112px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
}

.artwork {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.artwork.loading {
    opacity: 0.5;
}

.track-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    flex: 1;
    max-width: 269px; /* 405 - 112 - 12 - 12 = 269px for text area */
}

.title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    line-height: 1.3;
}

.artist {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* Fade transition for track changes */
.widget.transitioning .track-info {
    opacity: 0;
    transition: opacity 0.15s ease;
}

/* Configuration overlay */
.config-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.config-overlay.hidden {
    display: none;
}

.config-panel {
    background: #1a1a1a;
    padding: 24px;
    border-radius: 12px;
    color: white;
    max-width: 500px;
    text-align: center;
}

.config-panel h2 {
    margin-bottom: 16px;
}

.config-panel code {
    background: #333;
    padding: 8px 12px;
    border-radius: 4px;
    display: inline-block;
    font-size: 14px;
}

.config-panel button {
    margin-top: 16px;
    padding: 8px 24px;
    background: #0066ff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.config-panel button:hover {
    background: #0055dd;
}
