/* Photo Slideshow Maker Styles */

.psm-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.psm-form {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.psm-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.psm-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.psm-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.psm-description {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Photo Upload Section */
.psm-photo-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.psm-photo-item {
    position: relative;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 15px;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.psm-photo-item:hover {
    border-color: #4CAF50;
    background: #f0f8f0;
}

.psm-photo-item.has-image {
    border-style: solid;
    border-color: #4CAF50;
    padding: 0;
    overflow: hidden;
}

.psm-photo-input {
    width: 100%;
    font-size: 14px;
}

.psm-remove-photo {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease;
}

.psm-remove-photo:hover {
    background: #d32f2f;
}

.psm-photo-preview {
    display: none;
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
}

.psm-photo-item.has-image .psm-photo-preview {
    display: block;
}

.psm-photo-item.has-image .psm-photo-input {
    display: none;
}

/* Music Section */
.psm-music-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.psm-radio-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.psm-radio-option:hover {
    border-color: #4CAF50;
    background: #f0f8f0;
}

.psm-radio-option input[type="radio"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.psm-radio-option input[type="radio"]:checked + span {
    font-weight: 600;
    color: #4CAF50;
}

.psm-music-choice {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

#psm-music-upload {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.psm-library-list {
    max-height: 400px;
    overflow-y: auto;
}

.psm-library-item {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 10px;
    background: white;
}

.psm-library-item label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
}

.psm-library-item input[type="radio"] {
    margin-right: 10px;
}

.psm-song-title {
    font-weight: 500;
    color: #333;
}

.psm-library-item audio {
    width: 100%;
    height: 35px;
}

.psm-no-songs {
    text-align: center;
    color: #999;
    padding: 20px;
}

#psm-vibe-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    margin-top: 10px;
}

/* Buttons */
.psm-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.psm-btn-primary {
    background: #4CAF50;
    color: white;
}

.psm-btn-primary:hover {
    background: #45a049;
}

.psm-btn-secondary {
    background: #2196F3;
    color: white;
}

.psm-btn-secondary:hover {
    background: #0b7dda;
}

.psm-btn-link {
    background: transparent;
    color: #2196F3;
    text-decoration: underline;
}

.psm-btn-link:hover {
    color: #0b7dda;
}

.psm-btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.psm-submit-section {
    text-align: center;
}

#psm-submit {
    min-width: 250px;
    padding: 15px 30px;
    font-size: 18px;
}

/* Loading Screen */
.psm-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.psm-loading-content {
    text-align: center;
    color: white;
}

.psm-spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #4CAF50;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.psm-loading-content h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

.psm-loading-content p {
    margin: 0;
    font-size: 16px;
    opacity: 0.8;
}

/* Result Screen */
.psm-result {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
}

.psm-result h3 {
    color: #4CAF50;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
}

.psm-video-container {
    margin-bottom: 30px;
}

.psm-video-container video {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.psm-result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.psm-share-links {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.psm-share-links p {
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: 600;
}

#psm-share-url {
    width: 100%;
    max-width: 500px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .psm-container {
        padding: 10px;
    }
    
    .psm-form {
        padding: 20px;
    }
    
    .psm-photo-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .psm-result-actions {
        flex-direction: column;
    }
    
    .psm-btn {
        width: 100%;
    }
}
