/* RP Email Validation System Styles - Bootstrap Enhanced */

/* Custom gradient for headers */
.bg-gradient {
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%) !important;
}

/* Card enhancements */
.card {
    border: none;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15) !important;
}

/* Custom form controls */
.form-control:focus {
    border-color: #6610f2;
    box-shadow: 0 0 0 0.25rem rgba(102, 16, 242, 0.25);
}

.form-select:focus {
    border-color: #6610f2;
    box-shadow: 0 0 0 0.25rem rgba(102, 16, 242, 0.25);
}

/* Enhanced buttons */
.btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.btn-success {
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
}

.btn-success:hover {
    background: linear-gradient(135deg, #157347 0%, #1aa179 100%);
}

.btn-outline-success:hover {
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
}

/* Progress bar enhancements */
.progress {
    border-radius: 50px;
    overflow: hidden;
    background-color: #e9ecef;
}

.progress-bar {
    background: linear-gradient(90deg, #0d6efd 0%, #6610f2 100%);
    border-radius: 50px;
    transition: width 0.6s ease;
}

/* Status badges */
.status-badge {
    padding: 0.4em 0.8em;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    min-width: 60px;
    text-align: center;
    display: inline-block;
}

.status-badge.valid {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-badge.invalid {
    background-color: #f8d7da;
    color: #842029;
}

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

.table-hover tbody tr:hover {
    background-color: rgba(102, 16, 242, 0.05);
}

.table th {
    border-top: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* 状态列宽度调整 */
.table th:nth-child(2),
.table td:nth-child(2) {
    min-width: 100px;
    width: 100px;
    text-align: center;
}

/* 邮箱地址列宽度调整 */
.table th:nth-child(1),
.table td:nth-child(1) {
    min-width: 200px;
    max-width: 300px;
}

/* 原因列宽度调整 */
.table th:nth-child(3),
.table td:nth-child(3) {
    min-width: 250px;
    max-width: 400px;
}

/* MX服务器列宽度调整 */
.table th:nth-child(4),
.table td:nth-child(4) {
    min-width: 150px;
    max-width: 200px;
}

/* 响应时间列宽度调整 */
.table th:nth-child(5),
.table td:nth-child(5) {
    min-width: 80px;
    width: 80px;
    text-align: center;
}

/* Alert enhancements */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c2c7 100%);
}

.alert-info {
    background: linear-gradient(135deg, #cfe2ff 0%, #9ec5fe 100%);
}

/* Summary cards */
.card.bg-light {
    border-left: 4px solid #0d6efd !important;
}

.card.bg-success.bg-opacity-10 {
    border-left: 4px solid #198754 !important;
}

.card.bg-danger.bg-opacity-10 {
    border-left: 4px solid #dc3545 !important;
}

/* Navbar enhancements */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: loading-shimmer 2s infinite;
}

@keyframes loading-shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Fade in animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }

    .btn-group .btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }

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

    #summary-cards .card-body h2 {
        font-size: 1.5rem;
    }
}

/* Custom tooltips */
[data-bs-toggle="tooltip"] {
    cursor: help;
}

/* Enhanced form validation styles */
.form-control.is-valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
}

.form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Enhanced focus states */
.btn:focus, .form-control:focus, .form-select:focus {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(102, 16, 242, 0.25);
}

/* Copy button hover effect */
.copy-btn:hover {
    background-color: rgba(102, 16, 242, 0.1);
    color: #6610f2;
}

/* Toast notifications custom styles */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
}

.toast {
    border-radius: 12px;
    border: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

/* Custom scrollbar */
.table-responsive::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Status text colors */
.text-valid {
    color: #198754 !important;
    font-weight: 600;
}

.text-invalid {
    color: #dc3545 !important;
    font-weight: 600;
}

/* Pulse animation for important elements */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 16, 242, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(102, 16, 242, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(102, 16, 242, 0);
    }
}