/* Thiết lập font chữ và màu nền tổng thể */
body {
    font-family: 'Be Vietnam Pro', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #D2E3FC 0%, #E8F0FE 100%);
    /* Nền gradient xanh nhạt, tươi sáng */
    min-height: 100vh;
    margin: 0;
    position: relative;
    /* Để tạo các hiệu ứng nền */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1;
    font-kerning: normal;
}

/* Các hình tròn làm nền Glassmorphism */
body::before,
body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    /* Làm mờ để tạo hiệu ứng ánh sáng */
    opacity: 0.6;
    z-index: -1;
}

body::before {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #A7D9FD 0%, #8AB4F8 99%);
    /* Tông xanh dương nhẹ */
    top: 10%;
    left: 15%;
    animation: moveCircle1 15s infinite alternate;
}

body::after {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #4285F4 0%, #66B2FF 99%);
    /* Tông xanh dương đậm hơn */
    bottom: 10%;
    right: 15%;
    animation: moveCircle2 18s infinite alternate;
}

/* Keyframes cho các hình tròn nền */
@keyframes moveCircle1 {
    0% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(50px, 80px);
    }

    100% {
        transform: translate(0, 0);
    }
}

@keyframes moveCircle2 {
    0% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-60px, -40px);
    }

    100% {
        transform: translate(0, 0);
    }
}

/* Container chính */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Card style cho trang tra cứu - giống phiên bản cũ */
.search-card {
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(66, 133, 244, 0.3);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease-in-out;
    padding: 2.5rem;
    max-width: 550px;
    width: 100%;
    color: #333;
    position: relative;
}

/* Logo và phần chào mừng hoành tráng */
.logo-container {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

.logo-saincert {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: contain;
    box-shadow: 0 10px 30px rgba(66, 133, 244, 0.3);
    animation: logoFloat 3s ease-in-out infinite;
    border: 4px solid rgba(255, 255, 255, 0.8);
    background-color: white;
    position: relative;
    z-index: 2;
}

/* Hiệu ứng hào quang xung quanh logo */
.logo-saincert::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: linear-gradient(45deg, #4285F4, #A7D9FD, #4285F4);
    animation: rotate 4s linear infinite;
    z-index: -1;
    opacity: 0.7;
}

.logo-saincert::after {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(66, 133, 244, 0.2), rgba(167, 217, 253, 0.2));
    animation: rotate 6s linear infinite reverse;
    z-index: -2;
}

/* Phần chào mừng hoành tráng */
.welcome-section {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.main-title {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #4285F4, #1A73E8, #0F4DA8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    animation: titleGlow 2s ease-in-out infinite alternate;
    text-shadow: 0 0 20px rgba(66, 133, 244, 0.3);
    letter-spacing: 0.5px;
    line-height: 1.2;
    font-family: 'Be Vietnam Pro', sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-feature-settings: "kern" 1;
    font-feature-settings: "kern" 1;
    unicode-bidi: normal;
    direction: ltr;
}

.welcome-text {
    font-size: 1rem;
    color: #1A73E8;
    font-weight: 600;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
    letter-spacing: 0.3px;
    font-family: 'Be Vietnam Pro', sans-serif;
}

/* Các ngôi sao trang trí */
.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    top: 0;
    left: 0;
}

.star {
    position: absolute;
    color: #4285F4;
    animation: starTwinkle 2s ease-in-out infinite;
    font-size: 1.2rem;
    cursor: pointer;
    pointer-events: auto;
}

.star:nth-child(1) { top: 10%; left: 15%; animation-delay: 0s; }
.star:nth-child(2) { top: 20%; right: 20%; animation-delay: 0.5s; }
.star:nth-child(3) { bottom: 30%; left: 10%; animation-delay: 1s; }
.star:nth-child(4) { bottom: 15%; right: 15%; animation-delay: 1.5s; }
.star:nth-child(5) { top: 50%; left: 5%; animation-delay: 0.3s; }
.star:nth-child(6) { top: 40%; right: 8%; animation-delay: 0.8s; }

/* Form container */
.form-container {
    width: 100%;
}

/* Tiêu đề form */
.form-title {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #1A73E8;
    font-weight: 700;
    font-size: 1.3rem;
    font-family: 'Be Vietnam Pro', sans-serif;
    letter-spacing: 0.3px;
}

/* Input field */
.form-control {
    border-radius: 0.75rem;
    border: 1px solid rgba(66, 133, 244, 0.4);
    /* Viền mờ hơn, màu xanh */
    background: rgba(255, 255, 255, 0.25);
    /* Nền trong suốt */
    padding: 0.75rem 1rem;
    color: #333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-control::placeholder {
    color: rgba(51, 51, 51, 0.7);
    /* Màu placeholder */
    font-weight: 400;
}

.form-control:focus {
    border-color: rgba(66, 133, 244, 0.7);
    box-shadow: 0 0 0 0.25rem rgba(66, 133, 244, 0.25);
    background: rgba(255, 255, 255, 0.35);
    /* Nền sáng hơn khi focus */
    outline: none;
}

.form-floating > label {
    color: #6c757d;
    font-weight: 600;
}

/* Buttons */
.btn-search {
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: none;
    background: linear-gradient(45deg, #4285F4, #1A73E8);
    /* Gradient xanh đậm */
    color: white;
    width: 100%;
    font-size: 1rem;
    font-family: 'Be Vietnam Pro', sans-serif;
    letter-spacing: 0.3px;
}

.btn-search:hover {
    background: linear-gradient(45deg, #1A73E8, #0F4DA8);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    color: white;
}

/* Security info */
.security-info {
    text-align: center;
    margin-top: 1rem;
}

.security-text {
    color: #6c757d;
    font-size: 0.875rem;
    margin: 0;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 500;
}

/* Error messages */
.error-container {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 0.5rem;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.error-text {
    color: #dc3545;
    font-size: 0.875rem;
    margin: 0;
}

/* Hiệu ứng particles bay */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    top: 0;
    left: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, #4285F4, #A7D9FD);
    border-radius: 50%;
    animation: floatUp 8s linear infinite;
    opacity: 0;
}

.particle:nth-child(odd) {
    animation-duration: 6s;
}

.particle:nth-child(even) {
    animation-duration: 10s;
}

/* Keyframe animations */
@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.02);
    }
}

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

@keyframes titleGlow {
    0% {
        text-shadow: 0 0 20px rgba(66, 133, 244, 0.3);
    }
    100% {
        text-shadow: 0 0 30px rgba(66, 133, 244, 0.6), 0 0 40px rgba(26, 115, 232, 0.4);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes starTwinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 1;
        transform: translateY(90vh) scale(1);
    }
    90% {
        opacity: 1;
        transform: translateY(-10vh) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-20vh) scale(0);
    }
}

/* Styles cho trang kết quả */
.results-mode {
    align-items: flex-start;
    overflow-y: auto;
    padding: 2rem 1rem;
}

.results-container {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(66, 133, 244, 0.3);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    border-radius: 1.5rem;
    padding: 2rem;
    color: #333;
    transition: all 0.5s ease-in-out;
    width: 100%;
    max-width: 1200px;
}

.results-title {
    color: #4285F4;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.2);
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-bottom: 1px solid rgba(66, 133, 244, 0.2);
}

.table th {
    width: 35%;
    text-align: left;
    font-weight: bold;
    background: rgba(66, 133, 244, 0.1);
    color: #4285F4;
    font-size: 0.9rem;
}

.table td {
    width: 65%;
    text-align: left;
    word-wrap: break-word;
    font-size: 0.9rem;
}

.table tr:last-child th,
.table tr:last-child td {
    border-bottom: none;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: rgba(66, 133, 244, 0.1);
    transform: translateY(-1px);
}

/* Badge styles */
.badge {
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 20px;
}

.text-bg-success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
}

.text-bg-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14) !important;
}

.text-bg-danger {
    background: linear-gradient(135deg, #dc3545, #e91e63) !important;
}

/* Back button */
.btn-back {
    background: linear-gradient(45deg, #6c757d, #5a6268);
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: bold;
    color: white;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-back:hover {
    background: linear-gradient(45deg, #5a6268, #495057);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    color: white;
    text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body::before,
    body::after {
        display: none;
        /* Ẩn các hình tròn animation trên mobile */
    }

    .search-card {
        padding: 1.5rem;
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
        border-radius: 1rem;
    }

    .logo-saincert {
        width: 100px;
        height: 100px;
    }

    .main-title {
        font-size: 1.8rem;
    }

    .welcome-text {
        font-size: 0.95rem;
    }

    .star {
        font-size: 1rem;
    }

    .results-mode {
        padding: 1rem 0.5rem;
    }

    .results-container {
        padding: 1.5rem;
        border-radius: 1rem;
    }
}

@media (max-width: 576px) {
    .search-card {
        padding: 1.2rem;
        margin: 0.25rem;
        max-width: calc(100% - 0.5rem);
        border-radius: 0.8rem;
    }

    .logo-saincert {
        width: 80px;
        height: 80px;
    }

    .main-title {
        font-size: 1.6rem;
    }

    .welcome-text {
        font-size: 0.9rem;
    }

    .star {
        font-size: 0.9rem;
    }

    .results-container {
        padding: 1rem;
        border-radius: 0.8rem;
    }

    .table th,
    .table td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}
