/* MSN Gallery Generator - Frontend Styles */

.msn-gallery-frontend {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Header */
.msn-gallery-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.msn-gallery-header h2 {
    margin: 0 0 10px 0;
    font-size: 2.2em;
    font-weight: 600;
}

.msn-gallery-header p {
    margin: 0;
    font-size: 1.1em;
    opacity: 0.9;
}

.dashboard-actions {
    margin-top: 20px;
}

.header-actions {
    margin-top: 20px;
}

.header-actions .btn {
    background: #ffffff !important;
    color: #2c3e50 !important;
    border: 3px solid #ffffff !important;
    backdrop-filter: none;
    transition: all 0.3s ease;
    font-weight: 700 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
    text-shadow: none !important;
    font-size: 16px !important;
}

.header-actions .btn:hover {
    background: #f8f9fa !important;
    color: #1a202c !important;
    border-color: #f8f9fa !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
}

/* Form Styling */
.msn-gallery-form {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.form-section {
    padding: 30px;
    border-bottom: 1px solid #f0f0f0;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    margin: 0 0 25px 0;
    color: #2c3e50;
    font-size: 1.3em;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* URL Input Group */
.url-input-group {
    display: flex;
    gap: 10px;
}

.url-input-group input {
    flex: 1;
}

.fetch-data-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.fetch-data-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.fetch-data-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

/* Recipe Items */
.recipe-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.recipe-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.recipe-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.recipe-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1em;
}

.remove-recipe {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.remove-recipe:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3), transparent);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.remove-recipe:hover {
    background: linear-gradient(135deg, #ff5252, #dc3545);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

.remove-recipe:hover:before {
    opacity: 1;
}

.remove-recipe:active {
    transform: scale(0.95) rotate(90deg);
    transition: transform 0.1s ease;
}

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

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

/* Premium Bulk Generator Button */
.btn-premium {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    text-decoration: none;
    color: white;
}

.btn-premium:hover::before {
    left: 100%;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 18px;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: rgba(0,0,0,0.1);
    transform: scale(1.1);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    margin: 20px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Result Container */
.result-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    padding: 30px;
    margin: 20px 0;
}

.result-container h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
}

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

#generatedHTML {
    width: 100%;
    min-height: 300px;
    padding: 20px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    background: #f8f9fa;
    box-sizing: border-box;
    resize: vertical;
}

/* Messages */
.message-container {
    margin: 20px 0;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px 20px;
    border-radius: 8px;
    margin: 10px 0;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 20px;
    border-radius: 8px;
    margin: 10px 0;
    border: 1px solid #f5c6cb;
}

/* Dashboard Specific */
.galleries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.gallery-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.gallery-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gallery-card-header h4 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
}

.gallery-actions {
    display: flex;
    gap: 8px;
}

.gallery-actions .btn-icon {
    background: rgba(255,255,255,0.2);
    color: white;
    border-radius: 6px;
}

.gallery-actions .btn-icon:hover {
    background: rgba(255,255,255,0.3);
}

.gallery-card-body {
    padding: 20px;
}

.gallery-topic {
    margin: 0 0 15px 0;
    color: #2c3e50;
}

.gallery-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.9em;
    color: #6c757d;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.empty-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
}

.empty-state p {
    margin: 0 0 25px 0;
    color: #6c757d;
}

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

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    max-width: 90%;
    max-height: 90%;
    width: 800px;
    overflow: hidden;
}

.modal-small {
    width: 400px;
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.modal-close {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    color: white;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
    position: relative;
    overflow: hidden;
}

.modal-close:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3), transparent);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-close:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

.modal-close:hover:before {
    opacity: 1;
}

.modal-close:active {
    transform: scale(0.95) rotate(90deg);
    transition: transform 0.1s ease;
}

.modal-body {
    padding: 30px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

#galleryHTMLContent {
    width: 100%;
    height: 300px;
    padding: 20px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    background: #f8f9fa;
    box-sizing: border-box;
    resize: vertical;
}

/* Auto-save indicator */
.auto-save-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 1000;
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; transform: translateY(-10px); }
    20%, 80% { opacity: 1; transform: translateY(0); }
}

/* Login Required */
.msn-gallery-login-required {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.msn-gallery-login-required p {
    margin: 0;
    font-size: 1.1em;
    color: #2c3e50;
}

.msn-gallery-login-required a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.msn-gallery-login-required a:hover {
    text-decoration: underline;
}

.msn-gallery-error {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    text-align: center;
}

/* Fetch Status */
.fetch-status {
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
}

.fetch-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.fetch-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.fetch-status.loading {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Bulk Import Section */
.bulk-import-section {
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

.bulk-import-section h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 1.2em;
    font-weight: 600;
}

.bulk-import-section p {
    margin: 0 0 20px 0;
    color: #6c757d;
    font-size: 0.95em;
    line-height: 1.5;
}

.bulk-import-panel {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bulk-import-panel textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    box-sizing: border-box;
}

.bulk-import-panel textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.bulk-import-actions {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.bulk-import-progress {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    font-size: 14px;
    color: #495057;
    text-align: center;
    font-weight: 500;
}

.bulk-import-panel.processing {
    pointer-events: none;
    opacity: 0.8;
}

.bulk-import-panel.processing .btn {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Bulk Results Stats */
.bulk-results-stats {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #6c757d;
}

/* Premium Callout - REMOVED OLD CONFLICTING RULES */

.premium-callout::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(102, 126, 234, 0.05), transparent);
    animation: shimmer 4s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.premium-content {
    position: relative;
    z-index: 1;
}

/* OLD CONFLICTING RULES REMOVED */

/* Responsive Design */
@media (max-width: 768px) {
    .msn-gallery-frontend {
        padding: 15px;
    }
    
    .msn-gallery-header {
        padding: 20px 15px;
    }
    
    .msn-gallery-header h2 {
        font-size: 1.8em;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .url-input-group {
        flex-direction: column;
    }
    
    .form-actions {
        justify-content: stretch;
    }
    
    .form-actions .btn {
        flex: 1;
        text-align: center;
    }
    
    .result-actions {
        justify-content: stretch;
    }
    
    .result-actions .btn {
        flex: 1;
        text-align: center;
    }
    
    .galleries-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .modal-content {
        margin: 20px;
        max-width: calc(100% - 40px);
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-actions {
        justify-content: stretch;
    }
    
    .modal-actions .btn {
        flex: 1;
        text-align: center;
    }

    .premium-callout {
        padding: 25px 20px;
        margin-bottom: 25px;
    }

    .premium-callout h4 {
        font-size: 1.4em;
    }

    .premium-callout p {
        font-size: 1.1em;
        margin-bottom: 20px;
    }

    .premium-callout .btn-premium {
        padding: 12px 25px !important;
        font-size: 16px !important;
        letter-spacing: 0.5px !important;
    }
}

/* Bulk Archive Generator Styles */
#msn-bulk-archive-generator {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.msn-progress-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.msn-progress-header h3 {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    text-align: center;
}

.msn-progress-bar {
    background: rgba(255, 255, 255, 0.2);
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin: 15px 0;
    backdrop-filter: blur(10px);
}

.msn-progress-fill {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(79, 172, 254, 0.5);
}

.msn-progress-text {
    text-align: center;
    font-size: 0.9em;
    opacity: 0.9;
    margin-top: 10px;
}

.msn-results-section {
    background: #f8f9ff;
    border: 2px solid #e1e8ff;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
}

.msn-results-header {
    margin-bottom: 20px;
}

.msn-results-header h3 {
    margin: 0 0 15px 0;
    color: #4a5568;
    font-size: 1.3em;
}

.msn-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.msn-stat {
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 0.9em;
    color: #4a5568;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.msn-button-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.msn-button-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

.msn-button-secondary {
    background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(113, 128, 150, 0.3);
}

.msn-button-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(113, 128, 150, 0.4);
}

.msn-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

.msn-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.msn-help-text {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
    color: #718096;
    font-style: italic;
}

.msn-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.msn-loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.msn-loading-text {
    color: white;
    font-size: 1.1em;
    text-align: center;
}

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

/* Message Container */
.msn-message-container {
    margin: 20px 0;
}

.msn-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 10px 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.msn-message-success {
    background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.msn-message-error {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    color: #742a2a;
    border: 1px solid #feb2b2;
}

/* Responsive Design */
@media (max-width: 768px) {
    .msn-stats {
        flex-direction: column;
    }
    
    .msn-stat {
        text-align: center;
    }
    
    .msn-form-actions {
        flex-direction: column;
    }
    
    .msn-button-success,
    .msn-button-secondary {
        width: 100%;
        margin-right: 0;
    }
}

/* Review Interface Styles */
.review-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    padding: 30px;
    margin-top: 20px;
}

.review-container h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.5em;
    font-weight: 600;
}

.review-instructions {
    background: #e8f4fd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    color: #2c3e50;
    border-left: 4px solid #667eea;
}

.found-recipes-list {
    margin-bottom: 30px !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 20px !important;
}

.recipe-review-card {
    display: flex !important;
    flex-direction: column !important;
    background: #f8f9fa !important;
    border: 2px solid #e9ecef !important;
    border-radius: 12px !important;
    padding: 20px !important;
    transition: all 0.3s ease !important;
    height: fit-content !important;
    margin-bottom: 0 !important;
}

.recipe-review-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.recipe-preview {
    width: 100%;
    margin-bottom: 15px;
}

.recipe-preview-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.recipe-no-image {
    width: 100%;
    height: 150px;
    background: #e9ecef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 32px;
}

.recipe-info {
    flex: 1;
    margin-bottom: 15px;
}

.recipe-title {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 600;
}

.recipe-description {
    margin: 0 0 8px 0;
    color: #495057;
    font-size: 0.9em;
    line-height: 1.4;
}

.recipe-url {
    margin: 0 0 5px 0;
    font-size: 0.85em;
    color: #6c757d;
}

.recipe-url a {
    color: #667eea;
    text-decoration: none;
    word-break: break-all;
}

.recipe-url a:hover {
    text-decoration: underline;
}

.recipe-site {
    margin: 0;
    font-size: 0.85em;
    color: #6c757d;
}

.recipe-actions {
    display: flex;
    justify-content: center;
    margin-top: auto;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.85em;
}

/* Fix for delete buttons in review cards */
.recipe-review-card .btn-sm {
    padding: 10px 16px !important;
    font-size: 0.9em !important;
    min-width: 80px !important;
    white-space: nowrap !important;
}

.add-manual-section {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    text-align: center;
}

.add-manual-section h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.1em;
}

.manual-recipe-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.manual-recipe-form input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
}

.manual-recipe-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.review-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Mobile responsiveness for review interface */
@media (max-width: 768px) {
    .found-recipes-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .recipe-preview-image,
    .recipe-no-image {
        height: 120px;
    }
    
    .manual-recipe-form {
        flex-direction: column;
    }
    
    .review-actions {
        flex-direction: column;
    }
    
    .review-actions .btn {
        width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .found-recipes-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .found-recipes-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1400px) {
    .found-recipes-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Specific styles for bulk archive generator */
#msn-bulk-archive-generator .found-recipes-list {
    margin-bottom: 30px !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 20px !important;
}

#msn-bulk-archive-generator .recipe-review-card {
    display: flex !important;
    flex-direction: column !important;
    background: #f8f9fa !important;
    border: 2px solid #e9ecef !important;
    border-radius: 12px !important;
    padding: 20px !important;
    transition: all 0.3s ease !important;
    height: fit-content !important;
    margin-bottom: 0 !important;
    width: auto !important;
}

#msn-bulk-archive-generator .recipe-review-card .btn-sm {
    padding: 10px 16px !important;
    font-size: 0.9em !important;
    min-width: 80px !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    overflow: visible !important;
}

/* Responsive grid for bulk archive */
@media (max-width: 768px) {
    #msn-bulk-archive-generator .found-recipes-list {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #msn-bulk-archive-generator .found-recipes-list {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (min-width: 1025px) {
    #msn-bulk-archive-generator .found-recipes-list {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (min-width: 1400px) {
    #msn-bulk-archive-generator .found-recipes-list {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* FORCE premium callout styling - highest specificity */
html body .msn-gallery-frontend .form-section .premium-callout,
html body #msn-gallery-frontend-container .premium-callout,
html body div.premium-callout {
    background: #ffffff !important;
    border: 3px solid #667eea !important;
    color: #2c3e50 !important;
    border-radius: 12px !important;
    padding: 30px !important;
    margin-bottom: 30px !important;
    text-align: center !important;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2) !important;
}

html body .msn-gallery-frontend .form-section .premium-callout h4,
html body #msn-gallery-frontend-container .premium-callout h4,
html body div.premium-callout h4 {
    color: #667eea !important;
    font-size: 1.6em !important;
    font-weight: 700 !important;
    margin: 0 0 15px 0 !important;
    text-shadow: none !important;
}

html body .msn-gallery-frontend .form-section .premium-callout p,
html body #msn-gallery-frontend-container .premium-callout p,
html body div.premium-callout p {
    color: #2c3e50 !important;
    font-size: 1.2em !important;
    font-weight: 500 !important;
    margin: 0 0 25px 0 !important;
    line-height: 1.6 !important;
}

html body .msn-gallery-frontend .form-section .premium-callout .btn-premium,
html body #msn-gallery-frontend-container .premium-callout .btn-premium,
html body div.premium-callout .btn-premium {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    border: 3px solid #667eea !important;
    font-weight: 700 !important;
    padding: 15px 35px !important;
    font-size: 18px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    text-shadow: none !important;
    border-radius: 8px !important;
} 