/* Custom styles for TikFollowers API Interface */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.1);
    background-color: #f8f9fa;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 2px 12px;
}

.sidebar .nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(0, 123, 255, 0.1);
}

.sidebar .nav-link.active {
    color: var(--primary-color);
    background-color: rgba(0, 123, 255, 0.15);
}

.sidebar .nav-link i {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

.sidebar-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Main Content */
main {
    margin-left: 240px;
    padding-top: 20px;
}

@media (max-width: 767.98px) {
    .sidebar {
        position: relative;
        height: auto;
        padding: 20px 0;
    }
    
    main {
        margin-left: 0;
    }
}

/* Card Styles */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-radius: 12px;
    margin-bottom: 24px;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px 12px 0 0 !important;
    padding: 1rem 1.25rem;
}

.card-header h5 {
    font-weight: 600;
    color: #333;
}

.card-header h5 i {
    margin-right: 8px;
    color: var(--primary-color);
}

/* Form Styles */
.form-control {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.btn i {
    margin-right: 6px;
    width: 16px;
    height: 16px;
}

/* Result Container */
.result-container {
    max-height: 600px;
    overflow-y: auto;
    border-radius: 8px;
}

.result-container pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    font-size: 0.875rem;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.result-container code {
    color: #333;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 8px;
    font-weight: 500;
}

.alert-heading {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Loading Spinner */
#loadingSpinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1050;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Health Check Button */
#healthCheck {
    transition: all 0.3s ease;
}

#healthCheck:hover {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .container-fluid {
        padding: 0;
    }
    
    .card {
        margin: 12px;
        border-radius: 8px;
    }
    
    main {
        padding: 12px;
    }
}

/* JSON Syntax Highlighting */
.result-container pre code .key {
    color: #0066cc;
    font-weight: 600;
}

.result-container pre code .string {
    color: #0d8043;
}

.result-container pre code .number {
    color: #d14;
}

.result-container pre code .boolean {
    color: #0066cc;
}

.result-container pre code .null {
    color: #999;
}

/* Custom scrollbar */
.result-container::-webkit-scrollbar {
    width: 8px;
}

.result-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.result-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.result-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Animation for section transitions */
.content-section {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Improved form layout */
.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-text {
    font-size: 0.825rem;
    color: #6c757d;
}

/* Badge styles */
.badge {
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Table styles for documentation */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
    color: #333;
    padding: 1rem;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
}

/* Success state indicators */
.text-success {
    color: var(--success-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-info {
    color: var(--info-color) !important;
}

/* Header improvements */
.border-bottom {
    border-color: rgba(0, 0, 0, 0.05) !important;
}

h1.h2 {
    font-weight: 600;
    color: #333;
}

/* Button group improvements */
.btn-group .btn {
    border-radius: 8px;
}

.btn-outline-secondary {
    border-color: #e0e0e0;
    color: #6c757d;
}

.btn-outline-secondary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}
