/* --- CSS GIAO DIỆN MỚI --- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Lexend Deca', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: url('background.jpg') center/cover no-repeat;

    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    position: relative;
    overflow: auto;
    font-family: 'Lexend Deca', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Background animation removed for performance */
/* body::before removed */

/* Khung thẻ Namecard */
.card {
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    width: 100%;
    max-width: 350px;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.35);
    text-align: center;
    position: relative;
    display: none;
    /* animation removed */
    z-index: 1;
}

/* Header gradient Coteccons */
.card-header {
    background: linear-gradient(135deg, #1fb5b4 0%, #28D2D1 50%, #35dbd9 100%);
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 16px 20px 0;
    position: relative;
    overflow: visible;
}

.card-header::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    top: -150px;
    right: -100px;
}

.card-header::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    bottom: -80px;
    left: -60px;
}

.logo {
    width: 200px; 
    height: auto;
    opacity: 1;
    z-index: 1;
}

/* Language Toggle Button - Outside Card */
.lang-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #e2e8f0;
    padding: 10px 18px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: background 0.2s, box-shadow 0.2s;

    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: #1e293b;
    letter-spacing: 1px;
    font-family: 'Lexend Deca', sans-serif;
}

.lang-toggle:hover {
    /* transform removed */

    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    background: white;
}

/* .lang-toggle:active removed */


/* Avatar với border gradient */
.avatar-container {
    width: 160px; 
    height: 160px;
    background: white;
    padding: 1px; 
    border-radius: 50%;
    position: absolute;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 10;
}


.avatar {
    width: 100%; 
    height: 100%; 
    border-radius: 50%;
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 68px; 
    color: #004d40;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    cursor: pointer;
    /* transition removed */

}

/* .avatar img:hover removed */


.avatar-emoji {
    font-size: 68px;
    color: #004d40;
}

/* Image Modal/Lightbox */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

.image-modal.active {
    display: flex;
}

.image-modal img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s;
}

.image-modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    /* transition removed */

}

.image-modal-close:hover {
    background: rgba(255,255,255,0.2);
    /* rotate removed */
}


@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Phần thân */
.card-body { 
    padding: 92px 24px 32px; 
    background: white;
}

h1 { 
    font-size: 20px; 
    color: #1a1a1a; 
    margin-bottom: 4px; 
    font-weight: 700;
    letter-spacing: -0.3px;
    font-family: 'Lexend Deca', sans-serif;
}

.job-title { 
    color: #1a1a1a; 
    font-weight: 600; 
    font-size: 14px; 
    text-transform: uppercase; 
    margin-bottom: 24px; 
    letter-spacing: 0.5px;
    position: relative;
    display: inline-block;
    font-family: 'Lexend Deca', sans-serif;
}

.job-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    background: transparent;
    border-radius: 2px;
}

.dept { 
    color: #64748b; 
    font-size: 13px; 
    margin-bottom: 18px;
    font-weight: 500;
}

/* Contact Icons Grid */
.contact-icons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    row-gap: 20px;
    column-gap: 20px;
    margin-bottom: 0;
    padding: 0;
    max-width: 321px;
    margin-left: auto;
    margin-right: auto;
}

.contact-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    /* transition removed */

}

/* .contact-icon-item:active removed */


.contact-icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s;

}

.contact-icon-item:hover .contact-icon-circle {
    /* transform removed */

    box-shadow: 0 4px 10px rgba(0,0,0,0.15);

}

.contact-icon-circle svg, .contact-icon-circle i {
    width: 24px;
    height: 24px;
    fill: white;
    font-size: 24px;
    color: white;
}

.contact-icon-label {
    font-size: 11px;
    color: #1a1a1a;
    font-weight: 700;
    max-width: 87px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    font-family: 'Lexend Deca', sans-serif;
}

/* Icon colors */
.icon-call { background: linear-gradient(135deg, #1ECAD3, #00BCD4); }
.icon-email { background: linear-gradient(135deg, #00A4EF, #0078D4); }
.icon-linkedin { background: linear-gradient(135deg, #0077b5, #005582); }
.icon-website { background: linear-gradient(135deg, #22D3EE, #06B6D4); }
.icon-youtube { background: linear-gradient(135deg, #FF0000, #CC0000); }
.icon-facebook { background: linear-gradient(135deg, #1877F2, #0866FF); }

/* Contact Details Section */
.contact-details {
    margin-bottom: 0;
    max-width: 321px;
    margin-left: auto;
    margin-right: auto;
}

.contact-details h3 {
    font-size: 18px;
    color: #1a1a1a;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: left;
    padding-left: 0;
    font-family: 'Lexend Deca', sans-serif;
}

/* Danh sách liên hệ với hover effect */
.contact-list { 
    list-style: none; 
    text-align: left; 
    margin-bottom: 0;
    display: none;
}

.contact-item { 
    display: flex; 
    align-items: center; 
    margin-bottom: 14px; 
    padding: 15px 18px; 
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px; 
    border: 2px solid #e2e8f0;
    text-decoration: none; 
    color: inherit; 
    transition: background 0.2s, border-color 0.2s;

    position: relative;
    overflow: hidden;
}

/* Shine effect removed */
/* .contact-item::before removed */

.contact-item:hover { 
    /* Simplified hover */
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
    border-color: #00695c;
}

/* .contact-item:active removed */


.icon-box { 
    width: 42px; 
    height: 42px; 
    background: linear-gradient(135deg, #00695c, #004d40);
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    margin-right: 16px; 
    color: white; 
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0,105,92,0.3);
    /* transition removed */

}

/* .contact-item:hover .icon-box removed */


.info-text { 
    font-size: 15px; 
    color: #334155; 
    font-weight: 600; 
    word-break: break-all;
    flex: 1;
}

/* Nút Lưu với animation */
.btn-save {
    background: linear-gradient(135deg, #28D2D1 0%, #1fb5b4 100%);
    color: white; 
    border: none; 
    padding: 12px 30px; 
    border-radius: 50px;
    font-size: 14px; 
    font-weight: 700; 
    cursor: pointer; 
    width: 100%;
    max-width: 321px;
    margin: 0 auto 24px;
    box-shadow: 0 2px 8px rgba(40, 210, 209, 0.3);
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px;
    transition: opacity 0.2s;

    position: relative;
    overflow: hidden;
    font-family: 'Lexend Deca', sans-serif;
}

.btn-save svg, .btn-save i {
    width: 16px;
    height: 16px;
    fill: white;
    z-index: 1;
}


/* Button shine effect removed */
/* .btn-save::before removed */

.btn-save:hover {
    /* Simplified hover */
    opacity: 0.9;
}

/* .btn-save:active removed */

.btn-save span {
    z-index: 1;
}

/* Màn hình Loading */
#loading {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: linear-gradient(135deg, #1fb5b4 0%, #28D2D1 50%, #4de6e5 100%);
    z-index: 999;
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center;
}

.spinner {
    border: 5px solid rgba(255,255,255,0.2);
    border-top: 5px solid #28D2D1;
    border-radius: 50%; 
    width: 50px; 
    height: 50px;
    animation: spin 0.8s linear infinite; 
    margin-bottom: 20px;
}

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

#loading p {
    color: white;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Lexend Deca', sans-serif;
}

/* Thông báo lỗi */
#error-msg { 
    display: none; 
    text-align: center; 
    color: white;
    padding: 30px;
    background: rgba(239,68,68,0.9);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 400px;
    z-index: 1;
}

#error-msg h2 {
    margin-bottom: 10px;
    font-size: 24px;
    font-family: 'Lexend Deca', sans-serif;
}
