/* Designed and developed by Le Anh Tuan
Facebook: https://www.facebook.com/atusnmoi
Github: https://github.com/leanhtuan19
Open Source Project */

/* ==================
   CORE & BASE STYLES
   ================== */

:root {
    --primary-color: #bb86fc; /* Màu tím chủ đạo */
    --secondary-color: #03dac6;
    --background-dark: #121212;
    --card-background: rgba(255, 255, 255, 0.05);
    --text-color: #e0e0e0;
    --border-color: rgba(255, 255, 255, 0.1);
    --hover-effect: rgba(255, 255, 255, 0.08);
    --fb-text-idle: #8a92b1;
    --fb-text-active: #fff;
    --fb-shadow-1: #1877F2;
    --fb-shadow-2: #4267B2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a1a;
    color: #ffffff;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    /* Custom scrollbar for Firefox */
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-color) rgba(28, 28, 30, 0.5);
}

/* Prevent body scrolling when a modal is open */
body.modal-open {
    overflow: hidden;
}

/* ==================
   SCROLLBAR STYLES
   ================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(28, 28, 30, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #c99eff, #1cfff0);
}

/* ==================
   LOADER STYLES
   ================== */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loader-wrapper img {
    width: 150px;
    height: auto;
}

#loader-wrapper.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ==================
   LAYOUT & CONTAINER
   ================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.main-content, .locket-container,
.logo,
.tagline,
.certificate-notice {
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
}

/* ==================
   HEADER & BANNER
   ================== */
.main-header {
    width: 92%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 7px;
    margin-bottom: 20px;
    font-size: 1.2em;
    color: var(--primary-color);
    animation: fadeInDown 0.8s ease-out forwards;
    font-weight: 700;
}

/* Desktop styles for .main-header */
@media (min-width: 769px) {
    .main-header {
        width: 97%;
    }
}

.banner {
    font-size: 30px;
    font-weight: 700;
    background: linear-gradient(135deg,
        #ff595e, #ffca3a, #8ac926, #1982c4, #6a4c93,
        #ff924c, #00d9ff, #ff28a9, #a0eade, #f9c80e,
        #e63946, #a8dadc, #457b9d, #1d3557,
        #ffbe0b, #fb5607, #ff006e, #8338ec, #3a86ff);
    background-size: 500% 500%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: animated-gradient-text 20s linear infinite;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5), 0 0 15px rgba(255, 255, 255, 0.3), 0 0 30px rgba(255, 255, 255, 0.2);
}

.banner-link {
    text-decoration: none;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 40px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==================
   MENU & NAVIGATION
   ================== */
.header-icons {
    position: relative;
    margin-right: -30px;
    margin-left: 20px;
}

.header-icons i {
    margin-left: 20px;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
}

.header-icons i:hover {
    color: var(--secondary-color);
}

.header-icons i#menu-icon.fa-times {
    transform: rotate(90deg);
}

.menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #2c2c2e;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 100;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transform-origin: top right;
    transition: opacity 0.2s ease-out, transform 0.2s ease-out, visibility 0.2s;
}

.menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.menu a:hover {
    background-color: var(--hover-effect);
}

.menu a.active {
    background-color: rgba(3, 218, 198, 0.15);
    color: var(--secondary-color);
    font-weight: 600;
}

/* ==================
   AVATAR & PROFILE
   ================== */
.avatar-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(45deg, #ff595e, #ffca3a, #8ac926, #1982c4, #6a4c93, #ff595e);
    background-size: 400% 400%;
    animation: animated-gradient-background 15s ease-in-out infinite;
    padding: 5px;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.avatar-wrapper:hover {
    transform: scale(1.03);
    box-shadow: 0 0 15px 5px rgba(3, 218, 198, 0.3), 0 0 0 5px rgba(255, 255, 255, 0.1);
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 3px solid var(--background-dark);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.name {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 5px;
    background-image: linear-gradient(135deg, #0400ff 0%, #00d9ff 20%, #ff0000 40%, #e5ff00 60%, #2bff00 80%, #0400ff 100%);
    text-shadow: 0 0 40px #a200ff;
    background-size: 200% auto;
    color: #fff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textclip 2s linear infinite;
    display: inline-block;
}

/* ==================
   BUTTONS
   ================== */
.contact-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 500;
    backdrop-filter: blur(15px);
    margin: 0 auto 20px;
}

.contact-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.btn {
    width: 100%;
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: #007AFF;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

/* ==================
   MODAL (BASIC STRUCTURE)
   ================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-content {
    background: #1c1c1e;
    margin: 0;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-content.show {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    z-index: 1;
}

.close:hover {
    color: white;
}

/* ==================
   FOOTER
   ================== */
.footer {
    text-align: center;
    margin-top: 60px;
    padding: 30px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* ==================
   KEYFRAME ANIMATIONS
   ================== */
@keyframes textclip {
    to {
        background-position: 200% center;
    }
}

@keyframes animated-gradient-text {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes animated-gradient-background {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes animated-menu-text {
    0%   { background-position: 0% 50%; }
    100% { background-position: 400% 50%; }
}

@keyframes rotateBorder {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}