@import url('https://fonts.googleapis.com/css?family=Roboto:400,500,700&display=swap');

/* Global Reset & Font */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: #F4F4FC;
}

/* ============================= */
/* Modal nhập thông tin người dùng */
/* ============================= */
#user-info-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}
#user-info-modal .user-info-content {
    background: #fff;
    padding: 50px 60px;
    border-radius: 8px;
    text-align: left;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 90%;
    font-family: 'Roboto', sans-serif;
}
#user-info-modal .user-info-content h2 {
    font-size: 26px;
    margin-bottom: 20px;
    text-align: center;
    color: #222;
}
#user-info-modal .user-info-content p {
    margin-bottom: 10px;
    font-size: 16px;
    color: #444;
}
#user-info-modal .user-info-content input {
    width: 100%;
    padding: 12px;
    margin: 8px 0 16px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}
#user-info-modal .user-info-content button {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 18px;
    background-color: #50C878;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
#user-info-modal .user-info-content button:hover {
    background-color: #45a169;
}

/* ============================= */
/* Container chung của vòng quay */
/* ============================= */
#ai-lucky-spin-container {
    text-align: center;
    margin: 20px auto;
    max-width: 100%;
    position: relative;
}

/* ============================= */
/* Vòng quay (Wheel Interface) */
/* ============================= */
.wheel-wrapper {
    position: relative;
    width: 90vmin;
    height: 90vmin;
    margin: 0 auto;
    border-radius: 50%;
    background: radial-gradient(circle at center, #e0f9f1, #ffffff);
    border: 4px solid #D4AF37;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);

    /* Để mũi tên (pointer) không bị cắt */
    overflow: visible; 
    transform: perspective(1000px);
}
#ai-lucky-spin-wheel {
    width: 100%;
    height: 100%;
    transition: transform 5s cubic-bezier(0.25, 0.1, 0.25, 1);
    transform: rotate(0deg);
    transform-style: preserve-3d;
}
#ai-lucky-spin-wheel text {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 14px;
    fill: #ffffff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    dominant-baseline: middle;
    text-anchor: middle;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================= */
/* Pointer: thay thế bằng hình ảnh */
/* ============================= */
/* Con trỏ (pointer) – tam giác truyền thống, nay tô bằng gradient qua border-image */
#ai-lucky-spin-pointer {
    position: absolute;
    top: 50%;
    /* Tuỳ chỉnh toạ độ:
       - Nếu muốn nhô ra ngoài vòng quay, có thể cho right: -25px;
       - Hoặc nếu muốn dán sát vòng quay, để right: 0.
    */
    right: 5px; 
    transform: translateY(-50%);
    
    /* Kích thước hiển thị ảnh */
    width: 50px;
    height: 50px;
    
    /* Đường dẫn tương đối đến file spin-pointer.png
       (đi lùi 1 cấp từ css/ ra images/)
    */
    background: url('../images/spin-pointer.png') no-repeat center center;
    background-size: contain;

    z-index: 99; /* Đảm bảo nằm trên vòng quay */
}
/* ============================= */
/* Nút "Quay Ngay" */
/* ============================= */
#spin-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130px;
    height: 130px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(145deg, #50C878, #D4AF37);
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 30;
}
#spin-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}

/* ============================= */
/* Giao diện thông báo chúc mừng */
/* ============================= */
#congrats-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
}
#congrats-overlay .congrats-message {
    background: #fff;
    padding: 40px 60px;
    border-radius: 12px;
    font-size: 22px;
    color: #333;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    max-height: 80vh;
    overflow-y: auto;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
}
#congrats-overlay .congrats-message button {
    margin-top: 20px;
    padding: 10px 25px;
    font-size: 18px;
    cursor: pointer;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
#congrats-overlay .congrats-message button:hover {
    background-color: #0056b3;
}
#congrats-overlay .congrats-message strong {
    font-weight: bold;
    color: #000;
}
