/**
 * SkillFlu - Custom CSS Styles
 */

/* Global Styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Card Styles */
.card {
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

.card-header {
    border-top-left-radius: 0.5rem !important;
    border-top-right-radius: 0.5rem !important;
}

/* Dashboard Cards */
.bg-primary, .bg-success, .bg-info, .bg-warning, .bg-danger {
    position: relative;
    overflow: hidden;
}

.bg-primary i.opacity-50, 
.bg-success i.opacity-50, 
.bg-info i.opacity-50, 
.bg-warning i.opacity-50,
.bg-danger i.opacity-50 {
    position: absolute;
    right: 15px;
    bottom: 10px;
    opacity: 0.2 !important;
}

/* Button Styles */
.btn {
    border-radius: 0.25rem;
}

.btn-primary {
    background-color: #4e73df;
    border-color: #4e73df;
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

.btn-success {
    background-color: #1cc88a;
    border-color: #1cc88a;
}

.btn-success:hover {
    background-color: #17a673;
    border-color: #169b6b;
}

.btn-info {
    background-color: #36b9cc;
    border-color: #36b9cc;
    color: #fff;
}

.btn-info:hover {
    background-color: #2c9faf;
    border-color: #2a96a5;
    color: #fff;
}

.btn-warning {
    background-color: #f6c23e;
    border-color: #f6c23e;
}

.btn-warning:hover {
    background-color: #f4b619;
    border-color: #f4b30d;
}

.btn-danger {
    background-color: #e74a3b;
    border-color: #e74a3b;
}

.btn-danger:hover {
    background-color: #e02d1b;
    border-color: #d52a1a;
}

/* Table Styles */
.table th {
    font-weight: 600;
    background-color: #f8f9fc;
}

.table-hover tbody tr:hover {
    background-color: rgba(78, 115, 223, 0.05);
}

/* Profile Card */
.profile-card {
    overflow: hidden;
}

.profile-card .profile-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Activity Cards */
.activity-card {
    height: 100%;
}

.activity-card .badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

/* Coin Balance Display */
.coin-display {
    background: #f8f9fc;
    padding: 10px;
    border-radius: 0.5rem;
    text-align: center;
}

.coin-display .positive {
    color: #1cc88a;
    font-weight: bold;
}

.coin-display .negative {
    color: #e74a3b;
    font-weight: bold;
}

.coin-display .total {
    color: #4e73df;
    font-weight: bold;
    font-size: 1.5rem;
}

/* Form Styles */
.form-control, .form-select {
    border-radius: 0.25rem;
}

.form-control:focus, .form-select:focus {
    border-color: #bac8f3;
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.25);
}

/* Alert Styles */
.alert {
    border-radius: 0.5rem;
    border: none;
}

.alert-success {
    background-color: #eaffef;
    color: #1cc88a;
}

.alert-danger {
    background-color: #ffeded;
    color: #e74a3b;
}

.alert-warning {
    background-color: #fff8e8;
    color: #f6c23e;
}

.alert-info {
    background-color: #e8f4ff;
    color: #36b9cc;
}

/* Badge Styles */
.badge {
    padding: 0.5em 0.75em;
}

/* Navbar Styles */
.navbar-dark.bg-primary {
    background-color: #4e73df !important;
}

.navbar-dark.bg-dark {
    background-color: #3a3b45 !important;
}

/* Footer Styles */
.footer {
    padding: 1rem 0;
    font-size: 0.85rem;
}

/* Animation for cards */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .profile-card .profile-img {
        width: 80px;
        height: 80px;
    }
}

/* Leaderboard Rankings */
.rank-1 .badge {
    background-color: #ffd700 !important; /* Gold */
}

.rank-2 .badge {
    background-color: #c0c0c0 !important; /* Silver */
}

.rank-3 .badge {
    background-color: #cd7f32 !important; /* Bronze */
}

/* Custom tooltip styling */
.tooltip {
    font-size: 0.8rem;
}

.tooltip-inner {
    padding: 8px 12px;
    background-color: #3a3b45;
}

/* Date picker custom styling */
input[type="date"] {
    min-height: 38px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Accessibility focus styles */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid #4e73df;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    body {
        font-size: 12pt;
    }
}