/* style.css */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh; /* Giữ chiều cao 100% của viewport */
    overflow: hidden; /* Không cho phép cuộn toàn bộ trang */
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    cursor: none; /* Ẩn con trỏ mặc định */
}

.video-background {
    position: fixed; /* Giữ video luôn ở nền */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.container {
    text-align: center;
    background: rgba(255, 255, 255, 0.2); /* Nền trong suốt nhẹ */
    backdrop-filter: blur(10px); /* Hiệu ứng làm mờ nền phía sau */
    padding: 30px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3); /* Viền trong suốt nhẹ */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3); /* Hiệu ứng đổ bóng */
    width: 90%;
    max-width: 600px;
    max-height: 80%; /* Đặt chiều cao tối đa cho card */
    overflow-y: auto; /* Cho phép cuộn nội dung trong card */
    position: relative; /* Giữ vị trí của card cố định so với nội dung bên trong */
    scrollbar-width: none;
}


h1 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    background: linear-gradient(90deg, red, orange, yellow, green, cyan, blue, purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientAnimation 3s linear infinite;
    background-size: 300% 300%;
    display: inline-block;
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}


form {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

input, button {
    margin-bottom: 10px; /* Thêm khoảng cách giữa các phần tử */
}

input {
    flex: 1;
    padding: 10px;
    border: 2px solid #000;
    border-radius: 6px;
    margin-right: 10px;
    background: rgba(255, 255, 255, 0.2); /* Nền trong suốt nhẹ */
    color: #000000 !important; /* Đặt màu chữ thành đen */
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
    -webkit-text-fill-color: #000000 !important; /* Đặt màu chữ đen trong trình duyệt Webkit */
    text-shadow: none !important; /* Loại bỏ hiệu ứng đổ bóng */
}

input::placeholder {
    color: rgba(0, 0, 0, 0.6); /* Màu placeholder thành xám đen */
    text-shadow: none !important; /* Loại bỏ đổ bóng của placeholder */
}

input:focus {
    border-color: #ffffff; /* Thay đổi màu viền khi input được focus */
}


button {
    padding: 10px 20px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

.spinner {
    margin: 20px auto;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

#result {
    margin-top: 20px;
    text-align: center;
}

#generatedImage {
    max-width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    margin: 10px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.actions button,
.actions a {
    padding: 10px 15px;
    border: none;
    background: linear-gradient(90deg, #4CAF50, #00C853); /* Gradient màu xanh lá */
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Hiệu ứng bóng */
}

.actions button:hover,
.actions a:hover {
    transform: translateY(-3px); /* Nổi lên khi hover */
    background: linear-gradient(90deg, #00C853, #4CAF50); /* Đổi hướng gradient */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Bóng đậm hơn */
}

.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px; /* Kích thước trỏ chuột */
    height: 40px;
    background: url('miku.png') no-repeat center center; /* Hình ảnh trỏ chuột */
    background-size: contain; /* Đảm bảo hình ảnh vừa khít */
    pointer-events: none; /* Không ảnh hưởng đến sự tương tác */
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: opacity 0.2s ease; /* Mờ dần khi rời màn hình */
}