body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d1b4e 50%, #1a1a2e 100%);
    font-family: 'Arial', sans-serif;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.form-container {
    background: rgba(45, 27, 78, 0.8);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
    margin-bottom: 30px;
    z-index: 2;
}

h1 {
    text-align: center;
    color: #bf9fee;
    font-size: 2.5em;
    margin-bottom: 30px;
    text-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #bf9fee;
    font-size: 1.1em;
}

input {
    width: 100%;
    padding: 12px;
    border: 2px solid #4a2b7d;
    background: rgba(26, 26, 46, 0.6);
    border-radius: 8px;
    color: #fff;
    font-size: 1em;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: #8a2be2;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.3);
}

button {
    background: linear-gradient(45deg, #4a2b7d, #8a2be2);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    margin: 10px 5px;
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.4);
}

.image-container {
    text-align: center;
    margin: 0px auto;
    height: 250px;
    max-width: 500px;
    overflow: visible;
    position: relative;
}

.ba-thay-image {
    width: 100%;
    height: 100%;
    background-image: url('https://cdn.pixabay.com/photo/2021/07/12/15/14/medusa-6406619_1280.png');
    background-size: cover;
    background-position: center 20%;
    background-repeat: no-repeat;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.2);
    position: relative;
    z-index: 1;
}

.image-container img {
    display: none;
}

.ket-qua {
    background: rgba(45, 27, 78, 0.8);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
    margin-top: 120px;
    color: #fff;
    font-size: 1.1em;
    line-height: 1.6;
    display: none;
    position: relative;
    z-index: 1000;
    transform: translateY(100px);
    transition: all 0.5s ease;
}

.ket-qua p {
    margin: 10px 0;
}

.ket-qua strong {
    color: #bf9fee;
    font-size: 1.2em;
}

.khoi-huong-container {
    position: absolute;
    width: 100%;
    height: 200px;
    bottom: -270px;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 1;
}

.khoi-huong {
    width: 100px;
    opacity: 0;
    animation: khoiAnimation 4s infinite;
    filter: blur(1px);
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.second-image {
    width: 200px;
    height: 200px;
    background-image: url('nhang.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: absolute;
    bottom: -150px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1002;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.second-image:hover {
    transform: translateX(-50%) scale(1.1);
    opacity: 1;
}

@keyframes khoiAnimation {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(0) scale(1);
        filter: blur(1px);
    }
    50% {
        opacity: 0.6;
        transform: translateX(-50%) translateY(-100px) scale(1.5);
        filter: blur(2px);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-200px) scale(2);
        filter: blur(3px);
    }
}

/* Hiệu ứng khói nền */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://static.vecteezy.com/system/resources/thumbnails/020/921/416/small_2x/steam-and-smoke-isolated-3d-render-png.png') repeat;
    opacity: 0.1;
    animation: smokeEffect 20s linear infinite;
    pointer-events: none;
}

@keyframes smokeEffect {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-100%);
    }
}

.hidden {
    display: none !important;
}

.fade-out {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease;
}

.nhang-left {
    transform: rotate(-20deg);
    animation: nhangAnimationLeft 1.2s ease-out forwards;
    left: calc(50% - 40px);
}

.nhang-center {
    animation: nhangAnimationCenter 1s ease-out forwards;
    left: 50%;
}

.nhang-right {
    transform: rotate(20deg);
    animation: nhangAnimationRight 0.8s ease-out forwards;
    left: calc(50% + 40px);
}

@keyframes nhangAnimationLeft {
    0% {
        transform: rotate(-45deg);
        opacity: 0;
    }
    100% {
        transform: rotate(-20deg);
        opacity: 1;
    }
}

@keyframes nhangAnimationCenter {
    0% {
        transform: rotate(-45deg);
        opacity: 0;
    }
    100% {
        transform: rotate(0deg);
        opacity: 1;
    }
}

@keyframes nhangAnimationRight {
    0% {
        transform: rotate(-45deg);
        opacity: 0;
    }
    100% {
        transform: rotate(20deg);
        opacity: 1;
    }
}

@keyframes glowEffect {
    0% {
        box-shadow: 0 0 20px #FFD700;
    }
    50% {
        box-shadow: 0 0 30px #FFA500;
    }
    100% {
        box-shadow: 0 0 20px #FFD700;
    }
}

@keyframes smokeGlow {
    0% {
        opacity: 0.4;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translateX(-50%) scale(1.2);
    }
    100% {
        opacity: 0.4;
        transform: translateX(-50%) scale(1);
    }
}

input[type="date"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #4a2b7d;
    background: rgba(26, 26, 46, 0.6);
    border-radius: 8px;
    color: #fff;
    font-size: 1em;
    transition: all 0.3s ease;
    cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    background-color: #bf9fee;
    padding: 5px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    background-color: #8a2be2;
    transform: scale(1.1);
}

input[type="date"]:focus {
    outline: none;
    border-color: #8a2be2;
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.4);
}

input[type="date"]:hover {
    border-color: #8a2be2;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.3);
}

.typing-effect {
    overflow: hidden;
    white-space: pre-wrap;
    word-wrap: break-word;
    animation: typing 2s steps(40, end);
    border-right: 2px solid transparent;
}

@keyframes typing {
    from { 
        max-height: 0;
        opacity: 0;
    }
    to { 
        max-height: 1000px;
        opacity: 1;
    }
}

.result-content {
    line-height: 1.6;
    font-size: 1.1em;
    color: #ececec;
    max-height: 50vh;
    overflow-y: auto;
    padding-bottom: 20px;
}

.refresh-button {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background: linear-gradient(45deg, #4a2b7d, #8a2be2);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.refresh-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.4);
    background: linear-gradient(45deg, #8a2be2, #4a2b7d);
}

/* Style cho markdown content */
.markdown-content {
    color: #ececec;
    line-height: 1.6;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    color: #bf9fee;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

.markdown-content p {
    margin: 1em 0;
}

.markdown-content strong {
    color: #bf9fee;
}

.markdown-content em {
    color: #a088c4;
}

.markdown-content ul,
.markdown-content ol {
    margin: 1em 0;
    padding-left: 2em;
}

.markdown-content li {
    margin: 0.5em 0;
}

.markdown-content blockquote {
    border-left: 3px solid #8a2be2;
    margin: 1em 0;
    padding-left: 1em;
    color: #a088c4;
}

.markdown-content code {
    background: rgba(138, 43, 226, 0.2);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: monospace;
}

.markdown-content hr {
    border: none;
    border-top: 1px solid rgba(138, 43, 226, 0.3);
    margin: 2em 0;
}

.gender-group {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.gender-option {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.gender-option input[type="radio"] {
    display: none;
}

.gender-option label {
    display: flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
}

.gender-option .radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #4a2b7d;
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.gender-option input[type="radio"]:checked + label .radio-custom {
    border-color: #8a2be2;
    background: rgba(138, 43, 226, 0.1);
}

.gender-option input[type="radio"]:checked + label .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #8a2be2;
    border-radius: 50%;
    animation: radioSelect 0.3s ease;
}

@keyframes radioSelect {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}