:root {
    --primary-color: #0d6efd;
    --gradient-start: #e0eaff;
    --gradient-end: #f0f4ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}

.hero-section {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}

.hover-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #0a58ca;
    border-color: #0a58ca;
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(13, 110, 253, 0.3);
}

.btn-outline-primary {
    border-width: 2px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.duration-btn {
    min-width: 120px;
    transition: all 0.3s ease;
}

.duration-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.table-hover tbody tr {
    transition: background-color 0.2s ease;
}

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

.priority-row {
    background-color: rgba(13, 110, 253, 0.05);
}

.card {
    border-radius: 1rem;
    overflow: hidden;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

footer a:hover {
    color: white !important;
    text-decoration: underline !important;
}

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

.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1020;
}

@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 3rem 0;
    }

    .display-4 {
        font-size: 2rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }
}

.badge {
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.alert {
    border-radius: 0.75rem;
}

.modal-content {
    border-radius: 1rem;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

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

.bg-light {
    background-color: #f8f9fa !important;
}

.text-muted {
    color: #6c757d !important;
}

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

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.rates-table {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.1);
}

.rates-table thead {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}

.rates-table thead th {
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1.25rem 1rem;
    border: none;
    vertical-align: middle;
}

.rates-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.rates-table tbody tr:last-child {
    border-bottom: none;
}

.rates-table tbody tr:hover {
    background: linear-gradient(to right, rgba(13, 110, 253, 0.03) 0%, rgba(13, 110, 253, 0.06) 100%);
    transform: scale(1.01);
    box-shadow: 0 0.25rem 1rem rgba(13, 110, 253, 0.15);
}

.rates-table tbody td {
    padding: 1.25rem 1rem;
    vertical-align: middle;
    border: none;
}

.bank-name-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bank-logo {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.25rem;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
}

.bank-info {
    display: flex;
    flex-direction: column;
}

.bank-name {
    font-weight: 600;
    font-size: 1rem;
    color: #212529;
    margin-bottom: 0.125rem;
}

.bank-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #6c757d;
}

.rating-stars {
    display: flex;
    gap: 0.125rem;
}

.rating-stars i {
    font-size: 1rem;
    color: #ffc107;
}

.country-flag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    font-weight: 500;
}

.interest-rate-box {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #d1f2eb 0%, #d4edda 100%);
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    border: 2px solid #198754;
}

.interest-rate-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #198754;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.interest-rate-label {
    font-size: 0.75rem;
    color: #198754;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.duration-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    color: #495057;
}

.amount-value {
    font-weight: 600;
    color: #212529;
    font-size: 1rem;
}

.priority-row {
    background: linear-gradient(to right, rgba(255, 193, 7, 0.05) 0%, rgba(255, 193, 7, 0.08) 100%);
    border-left: 4px solid #ffc107;
}

.priority-row:hover {
    background: linear-gradient(to right, rgba(255, 193, 7, 0.08) 0%, rgba(255, 193, 7, 0.12) 100%);
}

.action-btn {
    padding: 0.625rem 1.5rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(13, 110, 253, 0.25);
}

@media (max-width: 992px) {
    .rates-table {
        font-size: 0.875rem;
    }

    .rates-table thead th {
        padding: 1rem 0.75rem;
        font-size: 0.75rem;
    }

    .rates-table tbody td {
        padding: 1rem 0.75rem;
    }

    .bank-logo {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .interest-rate-value {
        font-size: 1.5rem;
    }

    .interest-rate-box {
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 768px) {
    .rating-column,
    .country-column,
    .duration-column {
        display: none;
    }

    .bank-logo {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }

    .interest-rate-value {
        font-size: 1.25rem;
    }
}
