/* Admin Blog Manager Custom CSS */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

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

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

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

.navbar-nav .nav-link:hover {
    color: var(--info-color) !important;
    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;
    border-radius: 0.5rem;
}

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

.card-header {
    background-color: rgba(13, 110, 253, 0.1);
    border-bottom: 1px solid rgba(13, 110, 253, 0.2);
    font-weight: 600;
}

/* Status Cards */
.card.bg-primary,
.card.bg-success,
.card.bg-info,
.card.bg-warning {
    border: none;
    overflow: hidden;
    position: relative;
}

.card.bg-primary::before,
.card.bg-success::before,
.card.bg-info::before,
.card.bg-warning::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

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

.btn-group .btn {
    transform: none;
}

.btn-group .btn:hover {
    transform: none;
}

/* Trends and Content Items */
.trend-item,
.post-item,
.content-item {
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.trend-item:hover,
.post-item:hover,
.content-item:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.trend-checkbox,
.post-checkbox {
    transform: scale(1.2);
}

/* News Items */
.news-items .news-item {
    border-left: 3px solid var(--primary-color);
    padding-left: 0.5rem;
    margin-bottom: 0.25rem;
}

.news-preview .news-item {
    border-left: 2px solid var(--info-color);
    padding-left: 0.5rem;
}

/* Activity Timeline */
.activity-item {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Forms */
.form-control,
.form-select {
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Content Generation */
.content-preview {
    line-height: 1.8;
}

.content-preview h1,
.content-preview h2,
.content-preview h3 {
    color: var(--dark-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.content-preview p {
    margin-bottom: 1.2rem;
    text-align: justify;
}

/* Tables */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table thead th {
    background-color: var(--light-color);
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

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

/* Pagination */
.pagination .page-link {
    border-radius: 0.375rem;
    margin: 0 0.1rem;
    border: 1px solid #dee2e6;
    color: var(--primary-color);
    font-weight: 500;
    background-color: white;
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Modals */
.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    background-color: var(--light-color);
    border-bottom: 1px solid #dee2e6;
}

.modal-title {
    font-weight: 600;
    color: var(--dark-color);
}

/* Toast */
.toast {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

/* Badges */
.badge {
    font-weight: 500;
    border-radius: 0.375rem;
}

/* Loading States */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom Scrollbar */
.content-preview::-webkit-scrollbar,
textarea::-webkit-scrollbar {
    width: 6px;
}

.content-preview::-webkit-scrollbar-track,
textarea::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.content-preview::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.content-preview::-webkit-scrollbar-thumb:hover,
textarea::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Country Selector */
.btn-group .btn-check:checked + .btn {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Advanced Options */
.accordion-button {
    font-weight: 500;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
}

/* Range Slider */
.form-range::-webkit-slider-thumb {
    background-color: var(--primary-color);
}

.form-range::-moz-range-thumb {
    background-color: var(--primary-color);
    border: none;
}

/* History Items */
.history-item {
    border-left: 3px solid var(--success-color);
    transition: all 0.3s ease;
}

.history-item:hover {
    background-color: rgba(25, 135, 84, 0.1) !important;
    transform: translateX(2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        border-radius: 0.375rem !important;
        margin-bottom: 0.25rem;
    }
    
    .trend-item,
    .post-item {
        padding: 1rem;
    }
    
    .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .d-flex.justify-content-between > div:last-child {
        margin-top: 1rem;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    .btn-sm {
        font-size: 0.8rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

/* Status Indicators */
.status-online {
    color: var(--success-color);
}

.status-offline {
    color: var(--danger-color);
}

.status-warning {
    color: var(--warning-color);
}

/* Code Blocks */
.font-monospace {
    font-family: 'Courier New', Courier, monospace;
}

pre {
    background-color: #2d3748;
    color: #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
}

/* Highlight */
.highlight {
    background-color: rgba(255, 255, 0, 0.3);
    padding: 0.1rem 0.2rem;
    border-radius: 0.2rem;
}

/* Success States */
.success-animation {
    animation: successPulse 0.6s ease-in-out;
}

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