/* SERP Tracker Custom Styles */

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

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    transform: translateY(-1px);
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

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

.card-header {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

/* Buttons */
.btn {
    font-weight: 500;
    transition: all 0.3s ease;
}

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

/* Tables */
.table th {
    font-weight: 600;
    border-top: none;
    background-color: rgba(0, 0, 0, 0.02);
}

.table-responsive {
    border-radius: 0.375rem;
}

/* Badges */
.badge {
    font-weight: 500;
}

/* Position badges */
.position-badge-1 { background-color: #198754 !important; }
.position-badge-2-3 { background-color: #20c997 !important; }
.position-badge-4-10 { background-color: #0dcaf0 !important; }
.position-badge-11-20 { background-color: #ffc107 !important; color: #000; }
.position-badge-21-50 { background-color: #fd7e14 !important; }
.position-badge-50-plus { background-color: #6c757d !important; }

/* Forms */
.form-control, .form-select {
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
    transform: translateY(-1px);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alert Animations */
.alert {
    border: none;
    border-radius: 0.5rem;
    animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
    from {
        transform: translate3d(0, -100%, 0);
        visibility: visible;
    }
    to {
        transform: translate3d(0, 0, 0);
    }
}

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
}

/* Status Icons */
.status-icon {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.status-icon.success { background-color: #198754; }
.status-icon.warning { background-color: #ffc107; }
.status-icon.danger { background-color: #dc3545; }
.status-icon.info { background-color: #0dcaf0; }

/* Custom Scrollbar */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(155, 155, 155, 0.5) transparent;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(155, 155, 155, 0.5);
    border-radius: 20px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(155, 155, 155, 0.7);
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-group-vertical .btn {
        margin-bottom: 0.25rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #212529;
        color: #ffffff;
    }
    
    .card {
        background-color: #343a40;
        color: #ffffff;
    }
    
    .table {
        color: #ffffff;
    }
    
    .form-control, .form-select {
        background-color: #495057;
        border-color: #6c757d;
        color: #ffffff;
    }
    
    .form-control:focus, .form-select:focus {
        background-color: #495057;
        border-color: #86b7fe;
        color: #ffffff;
    }
}

/* Utility Classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

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

/* Position Trend Indicators */
.trend-up {
    color: #198754;
}

.trend-down {
    color: #dc3545;
}

.trend-neutral {
    color: #6c757d;
}

/* Performance Indicators */
.performance-excellent { color: #198754; font-weight: bold; }
.performance-good { color: #20c997; font-weight: 600; }
.performance-average { color: #ffc107; font-weight: 500; }
.performance-poor { color: #fd7e14; font-weight: 500; }
.performance-bad { color: #dc3545; font-weight: 600; }