:root {
    --primary-color: #ff6b6b; /* Đỏ san hô */
    --secondary-color: #5f27cd; /* Tím đậm */
    --text-color: #ffffff;
    --box-bg: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden; /* Ngăn cuộn trang */
    color: var(--text-color);
    position: relative;
    background: #2c3e50; /* Màu dự phòng */
}

/* Hoạt ảnh Nền - Thay đổi màu sắc mượt mà */
#background-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient động */
    background: linear-gradient(45deg, var(--primary-color), #f79f1f, var(--secondary-color), #2ed573);
    background-size: 400% 400%; /* Kích thước lớn hơn màn hình */
    animation: gradientShift 15s ease infinite; /* Hoạt ảnh lặp lại 15s */
    z-index: -1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Nội dung Chính */
.container {
    text-align: center;
    padding: 40px;
    background: rgba(0, 0, 0, 0.4); /* Lớp phủ mờ */
    border-radius: 20px;
    backdrop-filter: blur(10px); /* Hiệu ứng mờ đục */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    /* Hoạt ảnh Mờ dần khi tải */
    animation: fadeIn 1.5s ease-out;
}

.container {
    /* Đảm bảo position: relative để pseudo-element ::before và ::after hoạt động */
    position: relative; 
    
    text-align: center;
    padding: 40px;
    background: rgba(0, 0, 0, 0.4); /* Màu nền gốc */
    border-radius: 20px;
    backdrop-filter: blur(10px); 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: fadeIn 1.5s ease-out;
    
    /* Thiết lập cho hiệu ứng đường viền */
    overflow: hidden; /* Quan trọng: Ẩn phần gradient bị thừa ra */
    z-index: 1; /* Đảm bảo nội dung nằm trên lớp nền tĩnh */
}

/* Lớp Giả (Pseudo-element) để tạo đường viền chạy */
.container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    /* Kích thước lớn (200%) để đảm bảo đường viền chạy khắp chu vi */
    width: 200%;
    height: 200%;
    
    /* Gradient (viên sáng) */
    background: conic-gradient(
        transparent, 
        rgba(255, 255, 255, 0.5), 
        transparent 50%, 
        var(--primary-color) /* Màu sáng chạy */
    );
    z-index: -1; /* Đặt dưới lớp nền tĩnh */
    /* Hoạt ảnh xoay */
    animation: rotateBorder 4s linear infinite;
}

/* Lớp Giả (Pseudo-element) để tạo lớp nền tĩnh và hiệu ứng phát sáng */
.container::after {
    content: '';
    position: absolute;
    inset: 2px; /* Tạo khoảng cách 2px (độ dày viền) từ cạnh */
    background: rgba(0, 0, 0, 0.4); /* Màu nền của container (giữ nguyên độ trong suốt) */
    border-radius: 18px; /* Phải nhỏ hơn border-radius của .container 2px */
    z-index: -1; /* Đặt dưới nội dung, trên lớp xoay */
    
    /* Hiệu ứng Phát sáng (Glow) */
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.8); /* Phát sáng màu đỏ san hô */
}

/* Đồng hồ Đếm ngược */
.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.time-box {
    background: var(--box-bg);
    padding: 20px;
    border-radius: 10px;
    min-width: 100px;
    font-size: 1.1em;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
    /* XÓA: box-shadow, position: relative, overflow: hidden, z-index */
}

.time-box:hover {
    transform: scale(1.05);
    /* XÓA: box-shadow mạnh hơn khi hover */
}
/* XÓA HOÀN TOÀN CÁC QUY TẮC .time-box::before VÀ .time-box::after */
@keyframes rotateBorder {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

h1 {
    font-size: 4em;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 5px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.tagline {
    font-size: 1.2em;
    margin-bottom: 30px;
    font-weight: 300;
}

/* Đồng hồ Đếm ngược */
.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.time-box {
    background: rgb(40 16 16 / 48%);
    padding: 20px;
    border-radius: 10px;
    min-width: 100px;
    font-size: 1.1em;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Hoạt ảnh Nhịp đập nhẹ nhàng */
    transition: transform 0.3s ease;
}

.time-box:hover {
    transform: scale(1.05);
}

.time-box span:first-child {
    font-size: 3.5em;
    font-weight: 600;
    line-height: 1;
    color: white;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.time-box span:last-child {
    font-size: 0.9em;
    text-transform: uppercase;
    margin-top: 5px;
    opacity: 0.8;
}

/* Đăng ký */
.subscribe-form {
    display: flex;
    max-width: 450px;
    margin: 0 auto;
    border-radius: 5px;
    overflow: hidden;
}

.subscribe-form input {
    flex-grow: 1;
    padding: 15px;
    border: none;
    outline: none;
    font-size: 1em;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
}

.subscribe-form button {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.subscribe-form button:hover {
    background-color: #e55b5b; /* Màu tối hơn khi hover */
}

/* ... (Giữ nguyên các quy tắc CSS ban đầu ở đây) ... */

/* --- PHẦN BỔ SUNG: RESPONSIVE DESIGN (MEDIA QUERIES) --- */

@media (max-width: 768px) {
    /* Điều chỉnh chung cho máy tính bảng và điện thoại ngang */
    
    .container {
        padding: 30px 20px;
        margin:  10px;
    }

    h1 {
        font-size: 3em; /* Giảm kích thước H1 */
        letter-spacing: 3px;
    }

    .tagline {
        font-size: 1em;
        margin-bottom: 20px;
    }

    /* Điều chỉnh Đồng hồ Đếm ngược */
    .countdown-timer {
        gap: 10px; /* Giảm khoảng cách giữa các ô */
        margin-bottom: 30px;
    }
    
    .time-box {
        padding: 15px 10px;
        min-width: 70px; /* Giảm chiều rộng tối thiểu */
    }

    .time-box span:first-child {
        font-size: 2.5em; /* Giảm kích thước số */
    }
    
    .time-box span:last-child {
        font-size: 0.8em;
    }

    /* Điều chỉnh Form Đăng ký */
    .subscribe-form {
        max-width: 100%; /* Cho phép form chiếm toàn bộ chiều rộng (nếu cần) */
    }

    .subscribe-form input,
    .subscribe-form button {
        padding: 12px; /* Giảm padding */
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    /* Tối ưu hóa cho Điện thoại di động */
    
    h1 {
        font-size: 2.2em;
    }

    /* Chuyển các hộp đếm ngược thành hai hàng để tránh bị quá nhỏ */
    .countdown-timer {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 cột bằng nhau */
        gap: 15px;
    }

    .time-box {
        min-width: unset; /* Xóa giới hạn chiều rộng tối thiểu */
    }

    .time-box span:first-child {
        font-size: 2em;
    }

    /* Thay đổi cách bố trí form đăng ký (input và button xếp chồng) */
    .subscribe-form {
        flex-direction: column; /* Xếp chồng theo chiều dọc */
    }

    .subscribe-form input {
        border-radius: 5px 5px 0 0; /* Bo tròn góc trên */
        text-align: center;
    }

    .subscribe-form button {
        border-radius: 0 0 5px 5px; /* Bo tròn góc dưới */
        width: 100%;
        margin-top: -1px; /* Khử khe hở giữa input và button */
    }
}