@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;700&display=swap');

:root {
    --primary-color: #8A2BE2;
    --background-color: #1a1a2e;
    --card-background: #16213e;
    --text-color: #e0e0e0;
    --border-color: #0f3460;
    --button-text-color: #ffffff;
}

body {
    font-family: 'Be Vietnam Pro', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 800px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.step-card {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
    display: none; /* Hide all steps by default */
}

.step-card.active {
    display: block; /* Show only the active step */
}

h2 {
    margin-top: 0;
    margin-bottom: 2rem;
}

.upload-area {
    display: flex;
    justify-content: space-around;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.upload-box {
    flex: 1;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

input[type="file"] {
    margin-top: 1rem;
}

.preview-img {
    max-width: 150px;
    max-height: 150px;
    margin-top: 1rem;
    border-radius: 5px;
    display: none; /* Hidden until a file is selected */
}

.prompt-input {
    margin: 2rem 0;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input[type="text"], select, textarea {
    width: 100%;
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: #0f3460;
    color: var(--text-color);
    font-size: 1rem;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
}

button, .button {
    background: linear-gradient(90deg, var(--primary-color), #c738d8);
    color: var(--button-text-color);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
}

button:hover, .button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(138, 43, 226, 0.5);
}

.hidden {
    display: none !important;
}

.loading-spinner {
    padding: 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}
.header-image-container {
    text-align: center; /* Căn giữa nội dung bên trong (hình ảnh) */
    margin-top: 20px;   /* Tạo một khoảng trống 20px phía trên hình ảnh */
    margin-bottom: 20px;/* Tạo một khoảng trống 20px phía dưới hình ảnh */
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#image-result, #video-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

#generated-image-display {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    border-radius: 10px;
}

.generated-content {
    width: 100%;
    text-align: left;
}

#final-video {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
}

.video-options {
    margin: 1rem 0;
}
/* Thêm vào cuối file style.css */
#masking-area {
    margin-top: 2rem;
}
#canvas-container {
    position: relative;
    width: fit-content;
    margin: 1rem auto;
    border: 2px solid var(--primary-color);
}
#masking-image {
    max-width: 100%;
    max-height: 50vh;
    display: block;
}
#masking-canvas {
    position: absolute;
    top: 0;
    left: 0;
    cursor: crosshair;
}
/* Sắp xếp các nút nằm ngang hàng và có khoảng cách */
.actions {
    display: flex; /* Sử dụng flexbox để các nút nằm ngang */
    justify-content: center; /* Căn giữa các nút */
    gap: 15px; /* Khoảng cách giữa các nút */
    margin-top: 30px; /* Tăng khoảng cách từ trên xuống */
}

/* Kiểu cho nút màu xanh lá (Success) */
.btn.btn-success {
    background: linear-gradient(135deg, #28a745, #218838); /* Màu xanh lá gradient */
    border-color: #28a745;
}

/* Hiệu ứng khi di chuột vào nút xanh lá */
.btn.btn-success:hover {
    background: linear-gradient(135deg, #218838, #1e7e34); /* Xanh lá tối hơn khi hover */
    border-color: #1e7e34;
}
/* Chỉnh lại style cho link trong thẻ h1 của header */
header h1 a {
    color: inherit; /* Giữ lại màu sắc gốc của thẻ h1 */
    text-decoration: none; /* Bỏ gạch chân của link */
}