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

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    padding: 20px 0;
}

.header h1 {
    font-size: 2.2em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.notification-banner {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(238, 90, 36, 0.3);
    animation: slideDown 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.notification-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shine 3s infinite;
}

.notification-banner .notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.notification-banner .notification-text {
    display: flex;
    align-items: center;
    font-size: 1.0em;
    font-weight: 600;
}

.notification-banner .notification-icon {
    font-size: 1.3em;
    margin-right: 10px;
    animation: pulse 2s infinite;
}

.notification-banner .notification-date {
    font-size: 0.9em;
    opacity: 0.9;
    font-style: italic;
}

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

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.main-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
    margin-bottom: 20px;
}

.nav-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.nav-tab {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.0em;
    font-weight: 600;
    color: #495057;
    transition: all 0.3s ease;
}

.nav-tab:hover {
    background: #e2e6ea;
    color: #0056b3; /* Darker blue for better contrast */
}

.nav-tab.active {
    background: #0056b3; /* Darker blue for better contrast */
    color: white;
}

.tab-content {
    padding: 30px;
    min-height: 500px;
}

.procedure-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.procedure-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.procedure-card:hover {
    border-color: #007bff;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,123,255,0.2);
}

.procedure-card.selected {
    border-color: #28a745;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
}

.procedure-card h3 {
    color: #495057;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.procedure-card p {
    color: #6c757d;
    font-size: 0.9em;
    line-height: 1.5;
}

.document-other {
    counter-increment: document-counter;
    background: white;
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 15px; /* Thêm khoảng cách giữa các mục */
}

.documents-section {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-radius: 10px;
    border-left: 5px solid #ffc107;
}

.documents-section h3 {
    color: #856404;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.document-list {
    margin-top: 20px;
    gap: 15px;
    list-style: none;
    padding: 0;
    counter-reset: document-counter;
}

.document-item {
    counter-increment: document-counter;
    background: white;
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 15px; /* Thêm khoảng cách giữa các mục */
}

.document-item::before {
    content: counter(document-counter);
    background: #ffc107;
    color: #856404;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
    flex-shrink: 0;
    margin-top: 2px;
}

.document-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    min-height: auto;
}
.document-item:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.3);
}

.document-item .document-header {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #495057;
    font-size: 1.0em;
}

.document-item .document-header .icon {
    font-size: 1.5em;
    margin-right: 12px;
    color: #6c757d;
}

.document-item .document-options {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.document-option {
    background: #007bff;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.document-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 123, 255, 0.3);
}

.document-option.pdf {
    background: #dc3545;
}

.document-option.pdf:hover {
    background: #c82333;
    box-shadow: 0 5px 10px rgba(220, 53, 69, 0.3);
}

.document-option.excel {
    background: #28a745;
}

.document-option.excel:hover {
    background: #218838;
    box-shadow: 0 5px 10px rgba(40, 167, 69, 0.3);
}

.document-option.word {
    background: #2b5ce6;
}

.document-option.word:hover {
    background: #1e40af;
    box-shadow: 0 5px 10px rgba(43, 92, 230, 0.3);
}

.document-option.template {
    background: #6f42c1; /* Purple */
}

.document-option.template:hover {
    background: #5a32a3;
    box-shadow: 0 5px 10px rgba(111, 66, 193, 0.3);
}

.document-note {
    font-size: 0.9em;
    color: #555;
    background: #f1f3f5;
    padding: 10px 15px;
    border-radius: 4px;
    /* border-left: 3px solid #007bff; */
    border-left: 3px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 2px;
    overflow-wrap: break-word; /* Ngăn text dài tràn ra ngoài */
}

.preparer-info {
    display: none; /* Ẩn theo mặc định */
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    width: fit-content;
    animation: fadeIn 0.4s;
}

.preparer-info.applicant {
    background-color: #e7f3ff; /* Light blue */
    color: #004085;
    border: 1px solid #b8daff;
}

.preparer-info.japan-side {
    background-color: #fff8e1; /* Light orange */
    color: #856404;
    border: 1px solid #ffecb3;
}

.hidden {
    display: none;
}

.search-box {
    width: 100%;
    padding: 15px;
    font-size: 1.0em;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
}

.search-box:focus {
    outline: none;
    border-color: #007bff;
}

.info-section {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 5px solid #2196f3;
}

.info-section h3 {
    color: #1565c0;
    margin-bottom: 15px;
}

.info-section ul {
    list-style-type: none;
    padding-left: 0;
}

.info-section li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(33, 150, 243, 0.2);
}

.info-section li:before {
    content: "✓ ";
    color: #4caf50;
    font-weight: bold;
    margin-right: 8px;
}

.footer {
    text-align: center;
    color: white;
    padding: 20px;
    margin-top: 30px;
}

.procedure-steps {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-radius: 10px;
    border-left: 5px solid #2196f3;
}

.procedure-steps h3 {
    color: #1565c0;
    margin-bottom: 20px;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.steps-list {
    margin-top: 20px;
    list-style: none;
    padding: 0;
    counter-reset: step-counter;
}

.steps-list li {
    counter-increment: step-counter;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.steps-list li:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(5px);
}

.steps-list li::before {
    content: counter(step-counter);
    background: #2196f3;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
    flex-shrink: 0;
    margin-top: 2px;
}

.step-content {
    flex: 1;
}

.step-title {
    font-weight: 600;
    color: #1565c0;
    margin-bottom: 5px;
    font-size: 1.0em;
}

.step-options {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.step-title .document-option {
    margin-left: 10px;
    font-size: 0.7em; /* Làm nút nhỏ hơn */
}

.step-description {
    color: #424242;
    line-height: 1.5;
    font-size: 0.9em;
    overflow-wrap: break-word; /* Ngăn text dài tràn ra ngoài */
}

.step-note {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 10px 15px;
    margin-top: 10px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #856404;
    overflow-wrap: break-word; /* Ngăn text dài tràn ra ngoài */
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .tab-content, .documents-section, .info-section, .procedure-steps {
        padding: 15px;
    }

    .nav-tabs {
        flex-direction: column;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .procedure-grid {
        grid-template-columns: 1fr;
    }
    
    .document-item .document-options {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
}

.loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    border: 1px solid #c3e6cb;
}

#scrollToTopBtn {
    display: none; /* Ẩn theo mặc định */
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    font-size: 20px;
    border: none;
    outline: none;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s, transform 0.3s;
    align-items: center;
    justify-content: center;
}
#scrollToTopBtn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}