/* Mobile-first responsive styles for link preview */

/* General Styles */
body {
    background: #ffffff;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 20px 0;
    color: #333333;
}

.container-fluid {
    padding: 0 15px;
}

/* Preview Container */
.preview-container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    margin: 20px 0;
    animation: slideUp 0.5s ease-out;
}

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

/* Header */
.preview-header {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
    padding: 24px;
    text-align: center;
}

.preview-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #111827;
}

.preview-warning {
    font-size: 0.85rem;
    margin: 0;
    background: #fef3c7;
    color: #92400e;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid #fbbf24;
}

/* Preview Card */
.preview-card {
    padding: 32px;
    border-bottom: 1px solid #f3f4f6;
}

.preview-image, #previewImage {
    margin-bottom: 24px;
    border-radius: 16px;
    overflow: hidden;
    background: #f9fafb;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.preview-image img, #previewImage img {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 16px;
}

.preview-image img:hover {
    transform: scale(1.02);
}

.preview-site-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.preview-description {
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.preview-url {
    background: #f3f4f6;
    padding: 16px 20px;
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
    margin: 20px 0;
    word-break: break-all;
    font-size: 0.9rem;
}

.url-text {
    color: #374151;
    font-weight: 500;
}

.preview-provider {
    margin-top: 12px;
}

/* Advertisement Space */
.advertisement-space {
   
}

.ad-placeholder {
    background: #ffffff;
    padding: 20px;
    text-align: center;
    color: #374151;
    font-size: 0.9rem;
    min-height: 250px;
    min-width: 300px;
    width: 100%;
    display: block;
}

.adsbygoogle {
    min-height: 250px !important;
    min-width: 300px !important;
    width: 100% !important;
    display: block !important;
}

/* Action Buttons */
.preview-actions {
    padding: 32px;
    display: flex;
    gap: 16px;
    flex-direction: column;
    background: #ffffff;
}

.preview-actions .btn {
    border-radius: 14px;
    padding: 16px 32px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.btn-primary {
    background: #3b82f6;
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* External Link Indicators */
.external-link {
    position: relative;
}

.external-link-icon {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.external-link:hover .external-link-icon {
    opacity: 1;
}

/* Alert Styles */
.alert {
    border-radius: 12px;
    border: none;
    font-size: 0.9rem;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

/* Responsive Design */

/* Tablet */
@media (min-width: 768px) {
    body {
        padding: 40px 0;
    }
    
    .preview-container {
        margin: 40px 0;
    }
    
    .preview-header {
        padding: 32px;
    }
    
    .preview-title {
        font-size: 1.75rem;
    }
    
    .preview-card {
        padding: 32px;
    }
    
    .preview-site-title {
        font-size: 1.5rem;
    }
    
    .preview-actions {
        flex-direction: row;
        justify-content: center;
        padding: 40px 32px;
        gap: 20px;
    }
    
    .preview-actions .btn {
        flex: 1;
        max-width: 200px;
    }
    
}

/* Desktop */
@media (min-width: 1024px) {
    .preview-image img {
        max-height: 300px;
    }
    

}

/* Large Desktop */
@media (min-width: 1200px) {
    .preview-container {
        max-width: 800px;
        margin: 60px auto;
        border-radius: 24px;
    }
    
    .preview-image, #previewImage {
        border-radius: 20px;
    }
    
    .preview-image img, #previewImage img {
        border-radius: 16px;
    }
    
    .preview-actions .btn {
        border-radius: 16px;
        padding: 18px 36px;
    }
}



/* Loading Animation */
.spinner-border {
    border-radius: 50%;
    border-width: 3px;
}

/* Loading State */
#loadingState {
    background: #f8fafc;
    border-radius: 16px;
    padding: 32px;
    margin: 20px 0;
    text-align: center;
}

/* Error Message */
#errorMessage {
    border-radius: 12px;
    border: 1px solid #fbbf24;
    background: #fef3c7;
    color: #92400e;
    padding: 16px;
    margin: 20px 0;
}

/* Badge styles */
.badge {
    border-radius: 12px;
    padding: 6px 12px;
    font-size: 0.75rem;
}



/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus states */
.btn:focus,
.btn:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .preview-container {
        border: 2px solid #000;
    }
    
    .btn-primary {
        background: #000;
        color: #fff;
    }
    
    .btn-secondary {
        background: #666;
        color: #fff;
    }
}
