/* Custom styles for Sinduk - Social Media Marketing Platform */
/* Built to complement Bootstrap 5 with Replit dark theme */

:root {
    --gradient-primary: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-info) 100%);
    --gradient-success: linear-gradient(135deg, var(--bs-success) 0%, var(--bs-success-rgb) 100%);
    --gradient-danger: linear-gradient(135deg, var(--bs-danger) 0%, var(--bs-warning) 100%);
}

/* Hero section gradient background */
.hero-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Card gradients */
.bg-gradient-primary {
    background: var(--gradient-primary) !important;
}

.bg-gradient-success {
    background: var(--gradient-success) !important;
}

.bg-gradient-danger {
    background: var(--gradient-danger) !important;
}

/* Enhanced card hover effects */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

/* File upload area styling */
.form-control[type="file"] {
    border: 2px dashed var(--bs-border-color);
    background: var(--bs-dark);
    padding: 1rem;
    transition: border-color 0.3s ease;
}

.form-control[type="file"]:hover {
    border-color: var(--bs-primary);
}

.form-control[type="file"]:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Wallet balance display */
.wallet-balance {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Transaction history styling */
.transaction-item {
    border-left: 4px solid var(--bs-secondary);
    padding-left: 1rem;
    margin-bottom: 1rem;
    transition: border-color 0.3s ease;
}

.transaction-item.positive {
    border-left-color: var(--bs-success);
}

.transaction-item.negative {
    border-left-color: var(--bs-danger);
}

/* Content preview styling */
.content-preview {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    background: var(--bs-dark);
}

.content-preview img {
    transition: transform 0.3s ease;
}

.content-preview:hover img {
    transform: scale(1.05);
}

/* Status badges with animations */
.badge {
    animation: fadeIn 0.5s ease-in-out;
}

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

/* Modal enhancements */
.modal-content {
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Loading states */
.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

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

/* Notification animations */
.alert {
    animation: slideDown 0.5s ease-out;
}

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

/* Table enhancements */
.table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Progress indicators */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
}

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

/* Profile image styling */
.profile-image {
    border: 2px solid var(--bs-border-color);
    transition: border-color 0.3s ease;
}

.profile-image:hover {
    border-color: var(--bs-primary);
}

/* Navigation enhancements */
.navbar-brand {
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.nav-link {
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--bs-primary) !important;
}

/* Footer styling */
footer {
    background: linear-gradient(to right, var(--bs-dark), #1a1a2e) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive utilities */
@media (max-width: 768px) {
    .hero-section {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        border-radius: 0.375rem !important;
        margin-bottom: 0.25rem;
    }
}

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

.border-gradient {
    border: 2px solid;
    border-image: var(--gradient-primary) 1;
}

.shadow-soft {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Content type indicators */
.content-type-video {
    background: linear-gradient(45deg, var(--bs-primary), var(--bs-info));
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: bold;
}

.content-type-image {
    background: linear-gradient(45deg, var(--bs-success), var(--bs-success));
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

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

::-webkit-scrollbar-track {
    background: var(--bs-dark);
}

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

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

/* Facebook-style post styling */
.post-card {
    border-radius: 15px !important;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.profile-pic {
    transition: transform 0.2s ease;
}

.profile-pic:hover {
    transform: scale(1.05);
}

.post-media img {
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.post-media:hover img {
    transform: scale(1.02);
}

.video-thumbnail {
    border-radius: 12px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    transition: all 0.3s ease;
}

.video-thumbnail:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

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

.video-thumbnail:hover .play-button {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(106, 90, 205, 0.5);
}

.stat-item {
    transition: transform 0.2s ease;
}

.stat-item:hover {
    transform: scale(1.05);
}

.empty-state {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Enhanced button styles */
.btn-outline-primary, .btn-outline-success, .btn-outline-info {
    border-radius: 20px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover, .btn-outline-success:hover, .btn-outline-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}


/* PWA Specific Styles */
@media (display-mode: standalone) {
    body {
        /* Add top padding when in standalone mode to account for status bar */
        padding-top: env(safe-area-inset-top, 0);
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    
    .navbar {
        /* Account for notches and status bars */
        padding-left: env(safe-area-inset-left, 15px);
        padding-right: env(safe-area-inset-right, 15px);
    }
}

/* Mobile-specific PWA styles */
@media (max-width: 768px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    /* Make buttons touch-friendly */
    .btn {
        min-height: 44px;
        padding: 12px 16px;
    }
    
    /* Improve form inputs for mobile */
    .form-control, .form-select {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Better modal experience on mobile */
    .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100vh;
    }
    
    .modal-content {
        height: 100vh;
        border-radius: 0;
    }
}

/* Install button styles */
.install-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
}

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

/* Fullscreen loading for PWA */
.pwa-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.pwa-loading.hidden {
    display: none;
}
