/* Basic Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

h1, h2 {
    text-align: center;
    color: #2c3e50;
}

h1 {
    margin-bottom: 30px;
}

h2 {
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

/* Form Styles */
.form-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.form-control {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* Button Styles */
.btn {
    display: block;
    width: 100%;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 30px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0056b3;
}

/* Output Styles */
#output-container {
    margin-top: 40px;
}

.code-output {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    background-color: #e9ecef;
    white-space: pre;
    overflow-x: auto;
}

/* Banner Base Styles (for live preview) */
.ytm-banner-base {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Helvetica Neue', sans-serif;
    width: 100%;
    max-width: 500px;
    box-sizing: border-box;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: background-color 0.3s, color 0.3s, border 0.3s;
}
.ytm-album-art {
    width: 80px;
    height: 80px;
    min-width: 80px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background-color: #ccc;
    overflow: hidden; /* Added for image containment */
}

.ytm-album-art-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the area nicely */
}
.ytm-music-icon {
    width: 40px;
    height: 40px;
    color: #fff;
}
.ytm-song-info {
    flex-grow: 1;
    overflow: hidden;
}
.ytm-song-title, .ytm-artist-name, .ytm-album-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ytm-song-title {
    font-size: 18px;
    font-weight: bold;
}
.ytm-artist-name, .ytm-album-name {
    font-size: 14px;
}
.ytm-play-button-link {
    text-decoration: none;
}
.ytm-play-button {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 20px;
    transition: background-color 0.3s;
}
.ytm-play-button span {
    margin-left: 8px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}
.ytm-play-icon {
    width: 20px;
    height: 20px;
}

/* Dark Skin */
.ytm-banner-dark {
    background-color: #1e1e1e;
    color: #fff;
}
.ytm-banner-dark .ytm-album-art {
    background-color: #333;
}
.ytm-banner-dark .ytm-music-icon {
    color: #fff;
}
.ytm-banner-dark .ytm-artist-name, .ytm-banner-dark .ytm-album-name {
    color: #b3b3b3;
}
.ytm-banner-dark .ytm-play-button {
    background-color: #fff;
    color: #000;
}
.ytm-banner-dark .ytm-play-button:hover {
    background-color: #e6e6e6;
}

/* Light Skin */
.ytm-banner-light {
    background-color: #f5f5f5;
    color: #000;
    border: 1px solid #e0e0e0;
}
.ytm-banner-light .ytm-album-art {
    background-color: #e0e0e0;
}
.ytm-banner-light .ytm-music-icon {
    color: #333;
}
.ytm-banner-light .ytm-artist-name, .ytm-banner-light .ytm-album-name {
    color: #555;
}
.ytm-banner-light .ytm-play-button {
    background-color: #1e1e1e;
    color: #fff;
}
.ytm-banner-light .ytm-play-button:hover {
    background-color: #333;
}

/* Retro Skin */
.ytm-banner-retro {
    background-color: #fdf6e3;
    color: #657b83;
    border: 2px solid #93a1a1;
    font-family: 'Courier New', monospace;
}
.ytm-banner-retro .ytm-album-art {
    background-color: #eee8d5;
    border: 1px solid #93a1a1;
}
.ytm-banner-retro .ytm-music-icon {
    color: #657b83;
}
.ytm-banner-retro .ytm-song-title {
    color: #268bd2;
}
.ytm-banner-retro .ytm-artist-name, .ytm-banner-retro .ytm-album-name {
    color: #859900;
}
.ytm-banner-retro .ytm-play-button {
    background-color: #2aa198;
    color: #fdf6e3;
    border-radius: 0;
}
.ytm-banner-retro .ytm-play-button:hover {
    background-color: #268bd2;
}

/* YouTube Skin */
.ytm-banner-youtube {
    background-color: #f9f9f9;
    color: #282828;
    border: 1px solid #ddd;
}
.ytm-banner-youtube .ytm-album-art {
    background-color: #e9e9e9;
}
.ytm-banner-youtube .ytm-music-icon {
    color: #282828;
}
.ytm-banner-youtube .ytm-artist-name, .ytm-banner-youtube .ytm-album-name {
    color: #606060;
}
.ytm-banner-youtube .ytm-play-button {
    background-color: #ff0000;
    color: #fff;
}
.ytm-banner-youtube .ytm-play-button:hover {
    background-color: #cc0000;
}

/* Spotify Skin */
.ytm-banner-spotify {
    background-color: #191414;
    color: #fff;
}
.ytm-banner-spotify .ytm-album-art {
    background-color: #333;
}
.ytm-banner-spotify .ytm-music-icon {
    color: #fff;
}
.ytm-banner-spotify .ytm-artist-name, .ytm-banner-spotify .ytm-album-name {
    color: #b3b3b3;
}
.ytm-banner-spotify .ytm-play-button {
    background-color: #1db954;
    color: #fff;
    border-radius: 500px; /* Spotify-like rounded button */
}
.ytm-banner-spotify .ytm-play-button:hover {
    background-color: #1ed760;
}

/* --- Responsive Design --- */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .ytm-banner-base {
        padding: 10px;
    }

    .ytm-album-art {
        width: 60px;
        height: 60px;
        min-width: 60px;
        margin-right: 10px;
    }

    .ytm-song-title {
        font-size: 16px;
    }

    .ytm-artist-name, .ytm-album-name {
        font-size: 12px;
    }

    .ytm-play-button {
        padding: 8px;
    }
    
    /* Hide the text label for the play button to save space */
    .ytm-play-button span {
        display: none;
    }

    .ytm-play-icon {
        margin-right: 0;
    }
}

/* Preview Styles */
#preview-container, #final-preview-container {
    padding: 20px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}
