/* Custom CSS for URLFlash */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Header Styles */
.navbar-brand {
    font-size: 1.5rem;
}

.navbar-brand i {
    color: #ffc107;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Hero Section */
.hero-section {
    background: #FFF;
    color: #555;
    border-radius: 15px;
    margin-top: 2rem;
    box-shadow: var(--shadow-lg);
}

.hero-section h1 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Feature Highlights */
.feature-highlight {
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.feature-highlight:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
}

/* Cards */
.minisite-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.minisite-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.minisite-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.avatar-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.ai-summary {
    background: rgba(13, 110, 253, 0.1);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    font-style: italic;
    position: relative;
}

.ai-summary::before {
    content: '🤖';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.2rem;
}

/* AI-Optimized Cards */
.minisite-card.ai-optimized {
    border: 2px solid var(--success-color);
    position: relative;
}

.minisite-card.ai-optimized::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #198754, #20c997, #0dcaf0);
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* AI Features */
.ai-features {
    background: rgba(25, 135, 84, 0.1);
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid rgba(25, 135, 84, 0.2);
}

.ai-features small {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Category Badges */
.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(108, 117, 125, 0.1);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Location Badge */
.location-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
}

/* ========================================
   VISUAL GALLERY STYLES
   ======================================== */

.minisites-gallery {
    padding: 2rem 0;
}

.minisite-gallery-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    position: relative;
    border: 2px solid transparent;
}

.minisite-gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.minisite-gallery-item.ai-optimized {
    border-color: var(--success-color);
    position: relative;
}

.minisite-gallery-item.ai-optimized::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #198754, #20c997, #0dcaf0);
    animation: shimmer 2s ease-in-out infinite;
    z-index: 5;
}

.preview-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    min-height: 200px;
}

.minisite-info {
    padding: 1rem;
    background: white;
    position: relative;
    z-index: 2;
}

.minisite-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.minisite-meta {
    margin-bottom: 0.5rem;
}

.minisite-stats {
    border-top: 1px solid #e9ecef;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 123, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.minisite-gallery-item:hover .hover-overlay {
    opacity: 1;
}

.hover-content {
    text-align: center;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.minisite-gallery-item:hover .hover-content {
    transform: translateY(0);
}

/* Gallery Grid Responsiveness */
@media (max-width: 768px) {
    .minisite-gallery-item {
        margin-bottom: 1.5rem;
    }
    
    .preview-container {
        min-height: 160px;
        padding: 0.75rem;
    }
}

/* Badges in Gallery */
.badges .badge {
    margin-right: 0.25rem;
}

/* Template Preview Specific Styles */
.template-preview-container {
    transition: all 0.3s ease;
}

.minisite-gallery-item:hover .template-preview-container {
    transform: scale(1.05);
}

/* Preview Element Styles */
.preview-element {
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.preview-element-text {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    word-wrap: break-word;
}

.preview-element-button a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.preview-element-image {
    overflow: hidden;
    border-radius: 4px;
}

.preview-element-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-element-divider {
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-element-social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex-wrap: wrap;
}

.preview-social-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 8px;
}

/* Legacy Preview Specific Styles */
.legacy-preview-container {
    transition: all 0.3s ease;
}

.minisite-gallery-item:hover .legacy-preview-container {
    transform: scale(1.05);
}
    background: var(--light-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-top: 10px;
}

.location-badge i {
    margin-right: 5px;
}

/* Search Form */
.search-form {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
}

/* Authentication Pages */
.auth-page {
    background: var(--gradient-primary);
}

.auth-page .card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.auth-page .card-header {
    border: none;
}

/* Dashboard */
.dashboard-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Social Links */
.social-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.social-link:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.social-link i {
    margin-right: 8px;
    font-size: 1.1rem;
}

/* Platform specific colors */
.social-link.facebook { background: #1877f2; color: white; }
.social-link.instagram { background: linear-gradient(45deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d); color: white; }
.social-link.twitter { background: #1da1f2; color: white; }
.social-link.linkedin { background: #0077b5; color: white; }
.social-link.youtube { background: #ff0000; color: white; }
.social-link.whatsapp { background: #25d366; color: white; }
.social-link.website { background: #6c757d; color: white; }

/* URL Shortener */
.short-url-result {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
}

.copy-button {
    transition: all 0.3s ease;
}

.copy-button:hover {
    transform: scale(1.05);
}

/* Tables */
.table-custom {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-custom thead {
    background: var(--gradient-primary);
    color: white;
}

/* Form Styles */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    opacity: .65;
    transform: scale(.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Buttons */
.btn {
    border-radius: 25px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    box-shadow: var(--shadow-md);
}

/* Alerts */
.alert {
    border-radius: 15px;
    border: none;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f1aeb5 100%);
}

/* Footer */
footer {
    margin-top: auto;
}

footer .social-links a {
    transition: all 0.3s ease;
}

footer .social-links a:hover {
    transform: translateY(-2px);
    color: var(--primary-color) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem !important;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .social-links-container {
        justify-content: center;
    }
    
    .minisite-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    .social-link {
        flex: 1;
        justify-content: center;
        min-width: calc(50% - 5px);
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Tooltip Customization */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background: var(--dark-color);
    border-radius: 8px;
}

/* Badge Styles */
.badge {
    border-radius: 15px;
    font-weight: 500;
}

/* Progress Bars */
.progress {
    height: 8px;
    border-radius: 10px;
    background: rgba(0,0,0,0.1);
}

.progress-bar {
    border-radius: 10px;
}

/* Pagination */
.page-link {
    border-radius: 50%;
    margin: 0 2px;
    border: none;
    color: var(--primary-color);
}

.page-link:hover {
    background: var(--primary-color);
    color: white;
}

.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Modal Customization */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-radius: 15px 15px 0 0;
    border-bottom: none;
    background: var(--gradient-primary);
    color: white;
}

/* Form Validation */
.is-invalid {
    border-color: var(--danger-color);
}

.is-valid {
    border-color: var(--success-color);
}

/* Utilities */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: var(--shadow-md);
}

.border-radius-custom {
    border-radius: 15px;
}