body {
    font-family: "Poppins", sans-serif;
}

/* Prevent table cell content from wrapping */
.table td,
.table th {
    white-space: nowrap;
}

/* Ensure table-responsive allows horizontal scrolling */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Horizontal scrollable tabs for mobile */
.nav-tabs-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar for cleaner look */
    scrollbar-width: thin;
}

.nav-tabs-scroll-container::-webkit-scrollbar {
    height: 4px;
}

.nav-tabs-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.nav-tabs-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.nav-tabs-scroll-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.nav-tabs-scrollable {
    flex-wrap: nowrap;
    white-space: nowrap;
    border-bottom: 1px solid #dee2e6;
}

.nav-tabs-scrollable .nav-item {
    flex-shrink: 0;
}

.nav-tabs-scrollable .nav-link {
    white-space: nowrap;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3d8bfd 0%, #0d6efd 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.scroll-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.5);
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
}

.scroll-to-top:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.4);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top svg {
    transition: transform 0.2s ease;
}

.scroll-to-top:hover svg {
    transform: translateY(-2px);
}

/* Page Header Mobile Responsive */
@media (max-width: 575.98px) {
    /* Small spacing between breadcrumbs and title on mobile */
    .breadcrumb {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }

    /* Slightly reduce title size on very small screens */
    h2 {
        font-size: 1.5rem;
    }
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .scroll-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }

    .scroll-to-top svg {
        width: 18px;
        height: 18px;
    }
}

/* Site Cards Styling */
.site-card {
    background: linear-gradient(135deg, #1a1d29 0%, #2a2d3a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.site-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.site-card-screenshot {
    background: #000;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.site-card-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.site-card:hover .site-card-screenshot img {
    transform: scale(1.05);
}

.site-card-screenshot-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2a2d3a 0%, #1a1d29 100%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 48px;
}

.site-card-details {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.site-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.site-card-url {
    color: #6ea8fe;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    display: inline-block;
    word-break: break-all;
    transition: color 0.2s ease;
}

.site-card-url:hover {
    color: #9ec5fe;
    text-decoration: underline;
}

.site-card-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.site-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.site-card-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

.site-card-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Large screens: horizontal layout */
@media (min-width: 992px) {
    .site-card {
        flex-direction: row;
    }

    .site-card-screenshot {
        width: 320px;
        min-height: 250px;
        flex-shrink: 0;
    }

    .site-card-details {
        flex: 1;
    }
}

/* Small screens: vertical layout */
@media (max-width: 991.98px) {
    .site-card {
        flex-direction: column;
    }

    .site-card-screenshot {
        width: 100%;
        min-height: 200px;
    }
}

/* Empty state styling */
.sites-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(255, 255, 255, 0.6);
}

.sites-empty-state i {
    font-size: 4rem;
    opacity: 0.25;
    display: block;
    margin-bottom: 1rem;
}

.sites-empty-state p {
    margin-top: 1rem;
    font-size: 1.1rem;
}

/* Affiliate fields smooth transition */
#affiliateFields {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Enhanced form labels with icons */
#userModal .form-label i {
    margin-right: 0.25rem;
    opacity: 0.8;
}

/* Approval status card styling */
#userModal #affiliate_is_approved:checked + label {
    color: #198754;
}

#userModal #affiliate_is_approved:not(:checked) + label {
    color: #dc3545;
}

/* Better input group styling */
#userModal .input-group-text {
    border: 1px solid #dee2e6;
}

/* Statistics card improvements */
#affiliateStats .card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

#affiliateStats .fs-4 {
    font-family: 'Courier New', monospace;
    letter-spacing: -0.5px;
}

/* Form text (help text) improvements */
.form-text {
    font-size: 0.825rem;
    color: #6c757d;
}

/* Required field asterisk */
.text-danger {
    font-weight: 600;
}

/* Modal scrollbar styling */
#userModal .modal-dialog-scrollable .modal-body::-webkit-scrollbar {
    width: 8px;
}

#userModal .modal-dialog-scrollable .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#userModal .modal-dialog-scrollable .modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#userModal .modal-dialog-scrollable .modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive modal adjustments */
@media (max-width: 991.98px) {
    #userModal .modal-lg {
        max-width: 95%;
    }

    #userModal .card-body {
        padding: 1rem;
    }
}

/* Button icon spacing */
#userModal button i:not(:last-child) {
    margin-right: 0.5rem;
}
