/* =========================================
   Gieo Quẻ Linh Ứng - Modern Mystical UI
   ========================================= */

:root {
    --gqlu-red: #b32d2e;
    --gqlu-red-dark: #8e2424;
    --gqlu-gold: #d4af37;
    --gqlu-gold-light: #f1c40f;
    --gqlu-text: #2c3e50;
    --gqlu-bg: #ffffff;
    --gqlu-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.gqlu-container {
    max-width: 700px;
    margin: 40px auto;
    padding: 40px;
    background: var(--gqlu-bg);
    border-radius: 20px;
    box-shadow: var(--gqlu-shadow);
    font-family: 'Quicksand', sans-serif;
    border-top: 8px solid var(--gqlu-red);
    position: relative;
    overflow: hidden;
}

/* Trang trí hoa văn góc */
.gqlu-container::after {
    position: absolute;
    bottom: -10px;
    right: 10px;
    font-size: 80px;
    opacity: 0.05;
}

/* Header */
.gqlu-header {
    text-align: center;
    margin-bottom: 30px;
}

.gqlu-title {
    color: var(--gqlu-red);
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gqlu-intro {
    color: #666;
    font-style: italic;
    font-size: 1rem;
    line-height: 1.6;
}

/* Khu vực Gieo Quẻ */
.gqlu-visual {
    background: radial-gradient(circle, #fff5f5 0%, #ffe3e3 100%);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 30px;
    border: 1px solid #f9ebeb;
}

.gqlu-tube {
    margin-bottom: 25px;
    perspective: 1000px;
}

.gqlu-stick-img {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.2));
    transition: transform 0.3s ease;
}

/* Hiệu ứng rung ống xăm */
.gqlu-shaking {
    animation: gqlu-shake 0.15s infinite;
}

@keyframes gqlu-shake {
    0% { transform: rotate(0deg) translate(0, 0); }
    25% { transform: rotate(5deg) translate(2px, -2px); }
    50% { transform: rotate(0deg) translate(-2px, 2px); }
    75% { transform: rotate(-5deg) translate(2px, 2px); }
    100% { transform: rotate(0deg) translate(0, 0); }
}

/* Nút bấm chính */
.gqlu-btn-main {
    background: linear-gradient(135deg, var(--gqlu-red) 0%, var(--gqlu-red-dark) 100%);
    color: #fff;
    border: none;
    padding: 15px 45px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(179, 45, 46, 0.4);
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.gqlu-btn-main:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(179, 45, 46, 0.5);
    background: linear-gradient(135deg, var(--gqlu-red-dark) 0%, #631a1b 100%);
}

.gqlu-btn-main:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

/* Hướng dẫn */
.gqlu-guide {
    background: #fffdf0;
    padding: 20px;
    border-left: 4px solid var(--gqlu-gold);
    border-radius: 5px;
    text-align: justify;
}

.gqlu-guide h4 {
    margin: 0 0 10px 0;
    color: var(--gqlu-text);
    font-size: 1.1rem;
}

.gqlu-guide p {
    margin: 0;
    font-size: 0.95rem;
    color: #555;
}

/* Kết quả Quẻ */
.gqlu-result-card {
    animation: gqlu-fade-in 0.8s ease-out forwards;
    background: #fff;
}

@keyframes gqlu-fade-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.res-header {
    text-align: center;
    border-bottom: 2px dashed var(--gqlu-gold);
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.res-id {
    font-size: 1.2rem;
    color: var(--gqlu-gold);
    font-weight: 700;
    display: block;
}

.res-title {
    font-size: 2.5rem;
    color: var(--gqlu-red);
    margin: 5px 0;
}

.res-poem {
    background: #fdfaf0;
    padding: 30px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
    font-size: 1.2rem;
    line-height: 2;
    font-style: italic;
    color: #444;
    border: 1px double var(--gqlu-gold);
}

.res-section-title {
    color: var(--gqlu-red);
    font-size: 1.3rem;
    border-left: 4px solid var(--gqlu-red);
    padding-left: 15px;
    margin: 25px 0 15px;
    font-weight: 700;
}

.res-content {
    line-height: 1.8;
    color: var(--gqlu-text);
    text-align: justify;
}

.res-conclusion {
    background: #f1f8e9;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
    font-weight: 500;
}

/* Nút gieo lại */
.gqlu-btn-again {
    background: none;
    border: 2px solid var(--gqlu-red);
    color: var(--gqlu-red);
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    margin-top: 30px;
    transition: all 0.3s;
}

.gqlu-btn-again:hover {
    background: var(--gqlu-red);
    color: #fff;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .gqlu-container { padding: 20px; margin: 10px; }
    .gqlu-title { font-size: 1.5rem; }
    .res-title { font-size: 1.8rem; }
    .res-poem { padding: 15px; font-size: 1rem; }
}

/* Picker Grid Styles */
.gqlu-main-title {
    text-align: center;
    font-family: 'Cinzel', serif;
    color: var(--gqlu-red);
    font-size: 2.2rem;
    margin-bottom: 5px;
}
.gqlu-main-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}
.gqlu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}
/* Thêm đoạn này để xóa gạch chân cho toàn bộ link trong plugin */
.gqlu-wrapper a {
    text-decoration: none !important;
    box-shadow: none !important;
}

.gqlu-card {
    display: block; /* Đảm bảo thẻ a bao phủ toàn bộ card */
    background: #fff;
    border: 1px solid #eee;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-decoration: none !important; /* Xóa gạch chân */
    color: var(--gqlu-text); /* Giữ màu chữ mặc định */
}

.gqlu-card:hover {
    transform: translateY(-5px);
    border-color: var(--gqlu-red);
    box-shadow: 0 8px 20px rgba(179, 45, 46, 0.15);
    text-decoration: none !important;
}

/* Xóa gạch chân cho phần quẻ liên quan phía dưới */
.gqlu-related-grid a {
    text-decoration: none !important;
}

/* Xóa gạch chân cho phần công cụ trắc nghiệm phía dưới cùng */
.gqlu-extra-grid a {
    text-decoration: none !important;
}
/* Tìm và thay thế đoạn này */
.gqlu-card-icon {
    font-size: 40px; /* Bỏ dòng này đi */
    margin-bottom: 15px; /* Tăng margin lên một chút */
    line-height: 0; /* Giúp căn chỉnh ảnh tốt hơn */
}

.gqlu-card-icon img {
    max-width: 25px; /* Kích thước icon */
    height: auto;
    transition: transform 0.3s ease;
}

.gqlu-card:hover .gqlu-card-icon img {
    transform: scale(1.1); /* Hiệu ứng phóng to nhẹ khi hover */
}
.gqlu-card-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gqlu-text);
    margin: 0;
    line-height: 1.4;
}
/* Tìm và thay thế đoạn này */
.gqlu-back-btn {
    display: inline-flex; /* Sử dụng flex để căn icon và chữ */
    align-items: center;
    gap: 5px;
    background-color: #f1f1f1;
    color: #555;
    border: none;
    padding: 8px 15px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.gqlu-back-btn:hover {
    background-color: #e0e0e0;
    color: #222;
}

/* Style cho Đồng Xu */
.gqlu-coins-wrap {
    position: relative;
    height: 200px;
    width: 200px;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gqlu-coin {
    width: 60px;
    height: 60px;
    position: absolute;
    transition: all 0.5s ease;
}

/* Vị trí ban đầu của 3 đồng xu */
.gqlu-coin.c1 { top: 60px; left: 40px; transform: rotate(15deg); }
.gqlu-coin.c2 { top: 50px; left: 100px; transform: rotate(-10deg); }
.gqlu-coin.c3 { top: 110px; left: 70px; transform: rotate(45deg); }

/* Hiệu ứng tung đồng xu (Tossing) */
.gqlu-tossing .gqlu-coin {
    animation: coin-toss 1.5s infinite linear;
}

@keyframes coin-toss {
    0% { transform: translateY(0) rotateX(0); }
    25% { transform: translateY(-100px) rotateX(180deg); }
    50% { transform: translateY(0) rotateX(360deg); }
    75% { transform: translateY(-50px) rotateX(540deg); }
    100% { transform: translateY(0) rotateX(720deg); }
}

/* --- Bổ sung: Disclaimer Box (Miễn trừ trách nhiệm) --- */
.res-disclaimer {
    margin-top: 25px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    text-align: justify;
    font-style: italic;
    border-left: 3px solid #999;
}

.res-disclaimer strong {
    color: var(--gqlu-red);
    font-style: normal;
    text-transform: uppercase;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 5px;
}

/* --- BẢNG ĐÁNH GIÁ 5 SAO (THAY THẾ KẾT LUẬN) --- */
.res-rating-box {
    background: #fdfbf7;
    border: 1px solid #f0e6d2;
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
}

.rating-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Chia 2 cột trên PC */
    gap: 15px 30px;
}

.rating-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed #eee;
    padding-bottom: 5px;
}

.rating-label {
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-stars {
    color: #e0e0e0; /* Màu sao rỗng */
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.rating-stars .filled {
    color: #f1c40f; /* Màu vàng của sao đã tô */
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Mobile: 1 cột cho dễ nhìn */
@media (max-width: 600px) {
    .rating-grid { grid-template-columns: 1fr; }
}

/* Container giới thiệu ở chân trang */
.gqlu-footer-description {
    max-width: 900px;
    margin: 60px auto 20px;
    padding: 15px 0 15px 35px;
    position: relative;
    border-left: 3px solid #b31d1d; /* Đường kẻ đỏ */
    background: rgba(255, 255, 255, 0.3);
}

/* Biểu tượng Hoa Mai trang trí */
.gqlu-footer-description::before {
    content: "✿";
    position: absolute;
    top: -5px;
    left: -12px;
    color: #b31d1d;
    font-size: 22px;
    background: #fff; /* Tránh đè lên border */
    padding: 5px 0;
}

.gqlu-desc-content p {
    font-family: 'Quicksand', sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    text-align: justify;
    margin-bottom: 20px;
}

.gqlu-desc-content strong {
    color: #b31d1d;
    font-family: 'Cinzel', serif;
}

/* Phần lưu ý */
.gqlu-desc-note {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px dotted #ccc;
}

.gqlu-desc-note p {
    font-style: italic;
    font-size: 15px;
    color: #666;
    text-align: justify;
}

/* Responsive */
@media (max-width: 768px) {
    .gqlu-footer-description {
        margin-top: 40px;
        padding-left: 20px;
        margin-left: 10px;
        margin-right: 10px;
    }
    .gqlu-desc-content p {
        font-size: 14.5px;
    }
}

.gqlu-guide {
    background: #fffcf5;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-top: 25px;
}

.gqlu-guide h4 {
    color: #b31d1d;
    font-size: 17px;
    margin-bottom: 12px;
    text-align: center;
    font-weight: 700;
}

.gqlu-guide p {
    font-family: 'Quicksand', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #444;
    text-align: center;
    margin-bottom: 15px;
}

/* Khối lời nhắc trang nghiêm */
.gqlu-solemn-note {
    background: rgba(179, 29, 29, 0.05);
    padding: 15px;
    border-left: 3px solid #b31d1d;
    margin-top: 10px;
}

.gqlu-solemn-note p {
    font-style: italic;
    font-size: 14px;
    color: #555;
    margin-bottom: 0;
    text-align: justify;
}

.gqlu-solemn-note strong {
    color: #b31d1d;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

/* Mobile */
@media (max-width: 768px) {
    .gqlu-guide {
        padding: 15px;
    }
    .gqlu-guide h4 {
        font-size: 16px;
    }
}

/* GQLU Task Modal CSS */
#gqlu-task-modal { 
    display: none; 
    position: fixed; 
    z-index: 100000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0, 0, 0, 0.7); 
    font-family: 'Quicksand', sans-serif; 
}

.gqlu-task-modal-content { 
    background-color: #fff; 
    margin: 30px auto; 
    padding: 25px; 
    width: 90%; 
    max-width: 660px; 
    border-radius: 12px; 
    position: relative; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.gqlu-task-modal-inner { 
    text-align: left; 
}

.gqlu-task-modal-close { 
    color: #888; 
    position: absolute; 
    right: 15px; 
    top: 10px; 
    font-size: 28px; 
    font-weight: bold; 
    cursor: pointer; 
}

.gqlu-task-modal-close:hover { color: #000; }

.gqlu-task-txt-highlight { 
    color: #b32d2e; 
    font-size: 16px; 
    text-align: center; 
    display: block; 
    font-weight: 700; 
    margin-bottom: 20px; 
    line-height: 1.4;
}

.gqlu-task-txt-step { color: #2c3e50; font-weight: 700; }
.gqlu-task-txt-danger { color: #b32d2e; font-weight: 700; }

.gqlu-task-form-input { 
    display: flex; 
    margin: 20px 0; 
    gap: 10px;
    background: #fdf2f2;
    padding: 15px;
    border-radius: 8px;
}

.gqlu-task-keypass-input { 
    flex: 1; 
    padding: 12px; 
    font-size: 16px; 
    border: 1px solid #ced4da; 
    border-radius: 5px; 
    outline: none;
}

.gqlu-task-submit-button { 
    background: #b32d2e; 
    color: #fff; 
    font-size: 16px; 
    padding: 12px 25px; 
    border-radius: 5px; 
    cursor: pointer; 
    font-weight: 700;
    transition: 0.3s;
}

.gqlu-task-submit-button:hover { background: #8e2424; }
.gqlu-task-submit-button.gqlu-task-disabled { opacity: 0.6; cursor: not-allowed; }

.gqlu-task-image-demo-search { 
    text-align: center; 
    position: relative; 
    margin: 15px 0; 
}

.gqlu-task-image-demo-search img { max-width: 100%; border-radius: 5px; }

.gqlu-task-keyword-overlay { 
    position: absolute; 
    left: 23%; 
    top: 70%; 
    font-size: 14px; 
    font-weight: 700; 
    color: #444; 
}

.gqlu-task-box-img-result .gqlu-task-image { 
    text-align: center;
    border: 2px solid #b32d2e; 
    margin: 10px 0; 
    border-radius: 5px;
    overflow: hidden;
}

.gqlu-task-box-img-result img { max-width: 100%; display: block; margin: 0 auto; }

.gqlu-task-copy-keyword-btn { 
    font-size: 11px; 
    color: #666; 
    cursor: pointer; 
    border: 1px solid #ccc; 
    padding: 2px 8px; 
    border-radius: 4px; 
    margin-left: 10px;
    background: #f8f9fa;
}

.gqlu-task-no-scroll { overflow: hidden; }

@media screen and (max-width: 600px) {
    .gqlu-task-modal-content { width: 95%; margin: 10px auto; padding: 15px; }
    .gqlu-task-form-input { flex-direction: column; }
    .gqlu-task-keyword-overlay { left: 15%; top: 45%; font-size: 12px; }
}

.gqlu-task-highlight { color:#b32d2e; font-weight:700; display:block; text-align:center; margin-bottom:15px; }
.gqlu-task-form { display:flex; gap:10px; margin-bottom:15px; }
.gqlu-task-keypass-warning { color:red; text-align:center; font-size:14px; display:none; }
.gqlu-task-img-wrap { position:relative; text-align:center; margin:10px 0; }
.gqlu-task-img-wrap img { max-width:100%; border-radius:5px; }
.gqlu-task-img-wrap.border-red img { border:2px solid red; }
.gqlu-task-kw-overlay { position:absolute; left:25%; top:75%; transform:translateY(-50%); font-weight:700; color:#333; font-size:14px; }
.gqlu-task-copy-btn { font-size:11px; padding:2px 8px; cursor:pointer; }
.gqlu-task-hint { text-align:center; background:#f9f9f9; padding:10px; border-radius:5px; }
.gqlu-task-red-box { display:inline-block; width:30px; height:15px; background:red; vertical-align:middle; }
.gqlu-task-video { width:100%; height:300px; border-radius:10px; margin-top:15px; }

/* Styles cho nút mở luận giải */
.gqlu-lock-box { text-align:center; padding:30px; background:#fff9f9; border:2px dashed #b32d2e; border-radius:15px; margin:20px 0; }
.gqlu-btn-unlock { background:linear-gradient(135deg, #b32d2e, #8e2424); color:#fff; border:none; padding:12px 30px; border-radius:50px; font-weight:700; cursor:pointer; font-size:16px; box-shadow: 0 4px 15px rgba(179,45,46,0.3); transition:0.3s; }
.gqlu-btn-unlock:hover { transform:scale(1.05); }
.gqlu-btn-unlock.loading { opacity:0.7; cursor:wait; }

.res-content-hidden { display:none; }

/* --- TÌM VÀ THAY THẾ ĐOẠN CSS .gqlu-extra-tools --- */
.gqlu-extra-tools {
    max-width: 700px;
    margin: 40px auto;
    padding: 0 20px;
}

.gqlu-extra-tools h3 {
    text-align: center;
    color: var(--gqlu-red);
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin-bottom: 25px;
    letter-spacing: 2px;
}

/* Lưới hiển thị các công cụ */
.gqlu-extra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Tự động chia cột */
    gap: 15px;
}

/* Style cho từng ô công cụ */
.extra-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #fff;
    border: 1px solid #eee;
    padding: 15px 10px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none !important; /* Xóa gạch chân */
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.extra-item:hover {
    transform: translateY(-3px);
    border-color: var(--gqlu-red);
    box-shadow: 0 5px 15px rgba(179, 45, 46, 0.1);
    background: #fff9f9;
}

.extra-item strong {
    color: var(--gqlu-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    display: block;
}

.extra-item span {
    font-size: 11px;
    color: #888;
    margin-top: 5px;
    display: block;
}

/* Mobile: chia 2 cột cho tiết kiệm diện tích */
@media (max-width: 480px) {
    .gqlu-extra-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .extra-item strong {
        font-size: 13px;
    }
}

/* --- CSS CHO MODAL TÙY TÂM --- */

.gqlu-task-title-spiritual {
    text-align: center;
    color: #b32d2e;
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.gqlu-task-appeal-box {
    background: #fffdf5;
    border: 1px double #d4af37;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.gqlu-task-appeal-box p {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 10px;
    text-align: center;
}

.gqlu-task-appeal-box strong {
    color: #b32d2e;
}

.gqlu-task-skip-link {
    font-size: 14px;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    font-style: italic;
}

.gqlu-task-skip-link:hover {
    color: #b32d2e;
}

.gqlu-task-instructions-area {
    background: #fcfcfc;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 10px;
}

/* Thu nhỏ video hướng dẫn trong modal tùy tâm cho gọn */
.gqlu-task-video {
    height: 200px !important;
}