/* --- BIẾN TOÀN CỤC --- */
:root {
    --pink-main: #ff85a2;
    --pink-light: #ffb3c6;
    --white-glass: rgba(255, 255, 255, 0.9);
    --text-dark: #4a4a4a;
    --bg-dark: #0d0d0d;
}

/* --- CẤU TRÚC CƠ BẢN --- */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #fff;
    min-height: 100vh;
    background-color: transparent;
    overflow-x: hidden;
}

.background-fixed {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-dark) url('../images/bgr.jpg') center/cover no-repeat;
    z-index: -2;
    transition: opacity 0.1s linear;
}

.overlay {
    background: radial-gradient(circle, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.5) 100%),
                linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.7) 100%);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* --- HEADER & FOOTER --- */
.welcome-header { text-align: center; margin-bottom: 30px; }
.welcome-header p { font-size: 14px; letter-spacing: 3px; text-transform: uppercase; margin: 0; opacity: 0.8; }
.welcome-header span { font-size: 11px; color: var(--pink-light); font-weight: bold; }

.copyright-footer { margin-top: 50px; padding-bottom: 20px; font-size: 12px; opacity: 0.7; text-align: center; }
.copyright-footer a { color: var(--pink-light); text-decoration: none; font-weight: bold; }

/* --- SWIPER & COUNTER --- */
.mySwiper { width: 100%; max-width: 400px; height: 260px; margin-bottom: 20px; }
.swiper-slide { display: flex; justify-content: center; align-items: center; }

.counter-circle {
    position: relative; width: 180px; height: 180px;
    background: var(--white-glass); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--pink-main); box-shadow: 0 10px 30px rgba(255, 133, 162, 0.3);
}

.progress-ring { position: absolute; transform: rotate(-90deg); }
.progress-ring__circle { transition: stroke-dashoffset 0.5s ease-in-out; }

.circle-content { text-align: center; z-index: 2; }
.circle-content h2 { font-size: 60px; margin: 5px 0; color: var(--text-dark); }
.circle-content span { font-size: 0.9em; text-transform: lowercase; font-weight: 500; }

/* --- GRID STATS --- */
.grid-wrapper { width: 90%; display: flex; flex-direction: column; gap: 15px; }
.grid-container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

.box-hồng {
    background: var(--pink-main); border-radius: 15px; padding: 15px 5px;
    text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}
.box-hồng .num { font-size: 30px; font-weight: bold; color: #fff; line-height: 1; }
.box-hồng .unit {
    font-size: 9px; margin-top: 8px; background: rgba(255, 255, 255, 0.9);
    color: var(--pink-main); padding: 2px 8px; border-radius: 10px;
    text-transform: uppercase; font-weight: bold;
}

.extra-info {
    display: flex; justify-content: space-between; padding: 0 5px;
    font-size: 13px; font-weight: 400; color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* --- COUPLE SECTION --- */
.couple-container { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 30px; width: 100%; max-width: 500px; }
.profile-box { text-align: center; flex: 1; }
.avatar { width: 85px; height: 85px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 4px 15px rgba(0,0,0,0.3); object-fit: cover; margin-bottom: 10px; }
.name { font-weight: bold; font-size: 1.1em; margin-bottom: 8px; text-shadow: 1px 1px 4px rgba(0,0,0,0.4); }
.info-tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 15px; font-size: 0.75em; font-weight: 600; }
.tag-male { background: #e3f2fd; color: #1e88e5; }
.tag-female { background: #fce4ec; color: #d81b60; }

.heart-center {
    font-size: 2.2em; color: #ff4d6d;
    animation: heartbeat 1.5s infinite;
    filter: drop-shadow(0 0 10px rgba(255,77,109,0.6));
}
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }

/* --- MILESTONES --- */
.milestones-container { width: 100%; max-width: 450px; display: flex; overflow-x: auto; gap: 12px; padding: 15px 0; margin-bottom: 20px; scrollbar-width: none; }
.milestones-container::-webkit-scrollbar { display: none; }
.milestone-item { background: rgba(255, 255, 255, 0.12); backdrop-filter: blur(5px); padding: 12px; border-radius: 18px; min-width: 110px; text-align: center; border: 1px solid rgba(255,255,255,0.1); flex-shrink: 0; }
.milestone-item.passed { border-color: var(--pink-main); background: rgba(255, 133, 162, 0.25); }
.milestone-label { font-size: 11px; opacity: 0.8; display: block; margin-bottom: 4px; }
.milestone-date { font-size: 13px; font-weight: bold; color: var(--pink-light); }

/* --- BUTTONS --- */
.btn-wish {
    background: linear-gradient(135deg, #ff85a2 0%, #ffac81 100%);
    border: none; padding: 12px 28px; border-radius: 25px;
    font-weight: bold; color: #fff; cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 133, 162, 0.4);
    transition: 0.3s; margin-top: 10px; text-transform: uppercase; letter-spacing: 0.5px;
}

/* --- MODAL SYSTEM --- */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 1000; justify-content: center; align-items: center;
}
.modal-content { background: #fff; color: #444; padding: 30px; border-radius: 25px; width: 85%; max-width: 380px; box-shadow: 0 20px 40px rgba(0,0,0,0.4); }

.step-btns { display: flex; gap: 10px; margin-top: 10px; }
.btn-cancel { flex: 1; padding: 12px; border-radius: 12px; border: 1px solid #ddd; background: #f9f9f9; cursor: pointer; color: #666; font-weight: bold; }
.btn-submit { flex: 2; padding: 12px; border-radius: 12px; border: none; background: var(--pink-main); color: #fff; font-weight: bold; cursor: pointer; }

.form-select, .modal-content input, .modal-content textarea {
    width: 100%; padding: 12px; border: 1.5px solid #eee; border-radius: 12px;
    outline: none; box-sizing: border-box; background: #fff;
}

/* --- RESPONSIVE --- */
@media (min-width: 768px) {
    .mySwiper { max-width: 500px; }
    .couple-container { gap: 50px; }
    .avatar { width: 110px; height: 110px; }
}
/* ============================================================
   HỆ THỐNG MỐC KỶ NIỆM (MILESTONES SLIDER) - FIX LỖI CĂN GIỮA
   ============================================================ */

/* 1. Khung bao ngoài cùng */
.milestones-section {
    width: 100%;
    max-width: 450px;
    margin: 20px auto 0 auto !important; /* Thu hẹp margin-bottom để gần nút Gửi lời chúc */
    padding: 0;
    overflow: hidden;
}

/* Tiêu đề "Các mốc kỷ niệm" */
.milestones-section h3 {
    color: var(--pink-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-align: center;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* 2. Cấu hình Swiper Container */
.milestoneSwiper {
    width: 100% !important;
    padding-bottom: 35px !important; /* Chỗ trống cho các chấm pagination */
    position: relative;
}

/* 3. Khống chế độ rộng Slide để không bị cách xa nhau */
.milestoneSwiper .swiper-slide {
    width: 140px !important; /* Độ rộng card */
    display: flex;
    justify-content: center;
    transition: transform 0.3s ease;
}

/* Hiệu ứng phóng nhẹ card ở giữa cho chuyên nghiệp */
.milestoneSwiper .swiper-slide-active .milestone-card {
    transform: scale(1.05);
    border-color: var(--pink-main) !important;
    background: rgba(255, 77, 109, 0.15) !important;
}

/* 4. Thiết kế thẻ Card (Giống ảnh mẫu của ông) */
.milestone-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px !important;
    padding: 15px 10px !important;
    text-align: center;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.milestone-card.passed {
    border-color: var(--pink-main) !important;
}

.ms-label {
    font-weight: 700;
    font-size: 14px;
    color: #eee;
}

.milestone-card.passed .ms-label {
    color: var(--pink-main);
}

.ms-date {
    font-size: 11px;
    opacity: 0.5;
}

.ms-status i {
    color: var(--pink-main);
    font-size: 12px;
    filter: drop-shadow(0 0 3px var(--pink-main));
}

/* FIX TRIỆT ĐỂ CĂN GIỮA PAGINATION */
.swiper-pagination-milestone {
    position: absolute !important;
    bottom: 5px !important;
    /* Căn giữa tuyệt đối */
    left: 50% !important;
    transform: translateX(-50%) !important; 
    
    width: auto !important; /* Để nó tự co theo số lượng chấm */
    min-width: 80px;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 5px;
    z-index: 99 !important;
    white-space: nowrap;
}

/* Tùy chỉnh các chấm cho xịn */
.swiper-pagination-milestone .swiper-pagination-bullet {
    width: 8px !important;
    height: 8px !important;
    background: rgba(255, 255, 255, 0.4) !important;
    margin: 0 4px !important;
    opacity: 1 !important;
}

.swiper-pagination-milestone .swiper-pagination-bullet-active {
    background: var(--pink-main) !important;
    width: 18px !important; /* Chấm đang chọn dài ra */
    border-radius: 4px !important;
}

/* Thu hẹp khoảng cách giữa các khối */
.milestones-section {
    margin-bottom: -10px !important; /* Kéo nút Gửi lời chúc lên cao hơn nữa */
}
/* 1. Class tổng cho khung tên (giữ vị trí, font chữ) */
.ruby-name {
    font-weight: 800 !important;
    position: relative;
    display: inline-flex; /* Dùng flex để tên và icon thẳng hàng */
    align-items: center;
    gap: 5px; /* Khoảng cách giữa tên và icon */
    letter-spacing: 0.5px;
    /* Hiệu ứng tỏa sáng nhẹ nhàng cho cả cụm */
    filter: drop-shadow(0 0 5px rgba(255, 117, 140, 0.5));
}

/* 2. CHỈ áp dụng màu thơ mộng cho PHẦN CHỮ (Text) */
/* (Giả sử tên nằm trực tiếp trong .ruby-name hoặc thẻ span đầu tiên) */
.ruby-name {
    background: linear-gradient(to right, #ff758c, #ff7eb3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 3. QUAN TRỌNG: Trả lại màu gốc cho ICON giới tính */
.ruby-name i {
    -webkit-text-fill-color: initial; /* Hủy bỏ cái trong suốt của cha */
    background: none; /* Bỏ gradient của cha */
    -webkit-background-clip: border-box; /* Trả về mặc định */
    
    /* Giữ màu sắc gốc (Xanh/Hồng) mà ông đã định nghĩa trong PHP */
    display: inline-block;
}

/* Thêm icon trái tim nhỏ bay bổng phía sau tên */
/* Thêm icon vương miện nhỏ xịn xò phía sau tên */
.ruby-name::after {
    content: '\f521'; /* Mã icon vương miện (Crown) của Font Awesome */
    font-family: "Font Awesome 6 Free"; /* Đảm bảo web ông có load Font Awesome */
    font-weight: 900;
    font-size: 11px;
    margin-left: 5px;
    
    /* Đổ màu gradient cho vương miện luôn cho đồng bộ */
    background: linear-gradient(to bottom, #ffdde1, #ff7eb3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    
    /* Hiệu ứng hào quang nhẹ */
    filter: drop-shadow(0 0 2px rgba(255, 126, 179, 0.5));
    display: inline-block;
    vertical-align: middle;
    opacity: 0.9;
}