/* Modern Instagram Non-Followers Analyzer Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-instagram: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-warning: linear-gradient(135deg, #fc4a1a 0%, #f7b733 100%);
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.15);
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
}

/* Glassmorphism effects */
.card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-soft);
}

/* Remove hover animation for the main results card */
.results-card:hover {
    transform: none;
    box-shadow: var(--shadow-soft);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Keep hover for other cards */
.card:not(.results-card):hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Modern button styles */
.btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 12px 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::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:hover::before {
    left: 100%;
}

.btn-info {
    background: var(--gradient-primary);
    color: white;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-outline-info {
    background: transparent;
    border: 2px solid var(--bs-info);
    color: var(--bs-info);
}

.btn-outline-info:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
}

/* File input modern styling */
.form-control {
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--bs-info);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

/* Enhanced statistics cards */
.stats-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.stats-card.success::before {
    background: var(--gradient-success);
}

.stats-card.warning::before {
    background: var(--gradient-warning);
}

.stats-card.instagram::before {
    background: var(--gradient-instagram);
}

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

/* Modern search styling */
.input-group {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.input-group-text {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-right: none;
    color: var(--bs-info);
    backdrop-filter: blur(10px);
}

#searchInput {
    border-left: none;
}

/* Results grid modern styling */
.result-item .card {
    background: rgba(255, 255, 255, 0.08);
    border-left: 4px solid;
    border-image: var(--gradient-instagram) 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.result-item .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-instagram);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.result-item .card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px) scale(1.02);
    border-left-width: 6px;
}

.result-item .card:hover::before {
    opacity: 0.1;
}

/* Instagram brand icon animation */
.fab.fa-instagram {
    background: var(--gradient-instagram);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(240, 148, 51, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(240, 148, 51, 0.6));
    }
}

/* Header improvements */
.display-4, .display-5 {
    font-weight: 700;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lead {
    font-weight: 400;
    opacity: 0.9;
}

/* Alert modern styling */
.alert {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    box-shadow: var(--shadow-soft);
}

.alert-info {
    border-left: 4px solid var(--bs-info);
}

.alert-danger {
    border-left: 4px solid var(--bs-danger);
}

/* Form label improvements */
.form-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
}

.form-text {
    font-size: 0.875rem;
    opacity: 0.8;
    transition: all 0.3s ease;
}

/* Loading animation improvements */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

.loading {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    background-size: 468px 100%;
    animation: shimmer 1.5s infinite;
}

/* Success state enhancements */
.text-success {
    color: #38ef7d !important;
    font-weight: 600;
}

/* No results message modern styling */
#noResultsMessage {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-lg);
    border: 2px dashed rgba(255, 255, 255, 0.2);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        border-radius: 12px !important;
        margin-bottom: 8px;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .stats-card:hover {
        transform: translateY(-4px);
    }
}

/* Smooth page transitions */
.container {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Letter group styling */
.letter-heading {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 700;
    letter-spacing: 0.1em;
    position: sticky;
    top: 20px;
    z-index: 10;
    transition: all 0.3s ease;
}

.letter-heading:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}

.letter-group {
    margin-bottom: 2rem;
}

/* Checkbox styling */
.user-checkbox {
    transform: scale(1.2);
    margin-right: 0.5rem;
}

.user-checkbox:checked {
    background-color: var(--bs-success);
    border-color: var(--bs-success);
}

/* Batch action buttons */
.btn-outline-warning {
    border-color: var(--bs-warning);
    color: var(--bs-warning);
}

.btn-outline-warning:hover {
    background-color: var(--bs-warning);
    border-color: var(--bs-warning);
    color: var(--bs-dark);
}

.btn-outline-warning:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Table styling */
.table-dark {
    --bs-table-bg: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

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

.table-responsive {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

/* Sticky elements */
.sticky-top {
    position: sticky;
    top: 20px;
    z-index: 10;
}

/* Enhanced form controls */
.form-check-input {
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: var(--bs-success);
    border-color: var(--bs-success);
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25);
}

/* Privacy badge styling */
.alert-info {
    background: rgba(13, 202, 240, 0.1);
    border: 1px solid rgba(13, 202, 240, 0.3);
    color: var(--bs-info);
}

/* Enhanced button groups */
.btn-group .btn {
    margin-right: 0.5rem;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .letter-heading {
        font-size: 1.2rem;
        top: 10px;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .d-flex.gap-2 {
        flex-direction: column;
        gap: 0.5rem !important;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Selection feedback */
.result-item:has(.user-checkbox:checked) .card {
    border-color: var(--bs-success);
    background: rgba(40, 167, 69, 0.1);
}

.table-row-item:has(.user-checkbox:checked) {
    background-color: rgba(40, 167, 69, 0.1);
}

/* Smooth transitions for view switching */
#cardView, #compactView {
    transition: opacity 0.3s ease;
}

/* Enhanced badges */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

/* Custom Scrollbar for List Container */
.list-scroll-container {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.list-scroll-container::-webkit-scrollbar {
    width: 8px;
}

.list-scroll-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.list-scroll-container::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.list-scroll-container::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

/* Index Scroller Styling - Compact Design */
#indexScroller {
    /* Remove scrollbar since we're making it compact enough */
    overflow: visible !important;
}

/* Compact letter items */
.index-letter {
    font-size: 9px !important;
    padding: 2px 4px !important;
    margin: 0 !important;
    line-height: 1.1 !important;
    min-width: 18px !important;
    height: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Hide index scroller on mobile */
@media (max-width: 768px) {
    #indexScroller {
        display: none !important;
    }
}

/* Search input styling */
#searchInput {
    transition: box-shadow 0.2s ease-in-out;
}

#searchInput:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 202, 240, 0.25);
}

/* Statistics cards */
.card-body i {
    opacity: 0.8;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        border-radius: 0.375rem !important;
        margin-bottom: 0.25rem;
    }
}

/* Loading animation */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Instagram brand color accents */
.fab.fa-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Success state for file selection */
.text-success {
    color: var(--bs-success) !important;
}

/* No results message styling */
#noResultsMessage {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Smooth transitions for search results */
.result-item {
    transition: opacity 0.3s ease-in-out;
}
