/* ============================================================
   LỤC NHÂM ĐẠI ĐỘN — Stylesheet
   Motip tương tự Kỳ Môn Độn Giáp — Đá Quý Thiên Hà
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Inter:wght@400;500;600;700&display=swap');

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, sans-serif;
    background: #f4f1ec;
    color: #333;
}

.lndd-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* ========== HEADER ========== */
.lndd-header {
    text-align: center;
    margin-bottom: 35px;
    padding: 45px 20px;
    background: linear-gradient(135deg, #0a1628 0%, #1a2744 30%, #2a1a3e 60%, #0a1628 100%);
    border-radius: 18px;
    position: relative;
    overflow: hidden;
}

.lndd-header::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(78,205,196,0.07) 0%, transparent 60%);
    animation: lndd-rotate 30s linear infinite;
}

.lndd-header::after {
    content: '大六壬';
    position: absolute;
    bottom: 12px; right: 22px;
    font-size: 15px;
    color: rgba(255,255,255,0.1);
    letter-spacing: 5px;
}

@keyframes lndd-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.lndd-title {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 700;
    color: #4ecdc4;
    margin: 0 0 6px;
    position: relative; z-index: 1;
    letter-spacing: 3px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.lndd-tagline {
    color: rgba(255,255,255,0.55);
    font-size: 13px;
    position: relative; z-index: 1;
    margin: 0;
    letter-spacing: 2px;
}

/* ========== FORM ========== */
.lndd-form-section {
    background: #fff;
    border: 1px solid #dde1e6;
    border-radius: 14px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.lndd-form-section h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1a2744;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #4ecdc4;
    display: inline-block;
}

.lndd-form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.lndd-form-group {
    flex: 1;
    min-width: 100px;
}

.lndd-form-group.lndd-wide {
    flex: 2;
    min-width: 200px;
}

.lndd-form-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lndd-input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 2px solid #dde1e6;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
    background: #fafbfc;
}

.lndd-input:focus {
    border-color: #4ecdc4;
    outline: none;
    box-shadow: 0 0 0 3px rgba(78,205,196,0.15);
    background: #fff;
}

.lndd-btn-row {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    justify-content: center;
}

.lndd-btn-now {
    height: 42px;
    padding: 0 20px;
    border: 2px solid #1a2744;
    background: transparent;
    color: #1a2744;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.lndd-btn-now:hover {
    background: #1a2744;
    color: white;
}

/* ========== QUESTION SECTION ========== */
.lndd-birth-note {
    font-size: 12px;
    color: #999;
    font-style: italic;
    margin: 4px 0 0;
}

.lndd-question-section h3 {
    border-bottom-color: #9b59b6;
}

.lndd-optional {
    font-size: 12px;
    font-weight: 400;
    color: #999;
}

.lndd-question-input {
    height: 48px !important;
    font-size: 15px !important;
    border-left: 4px solid #9b59b6 !important;
    padding-left: 16px !important;
    background: #faf8fc !important;
}

.lndd-question-input::placeholder {
    color: #aaa;
    font-style: italic;
}

.lndd-question-input:focus {
    border-color: #9b59b6 !important;
    box-shadow: 0 0 0 3px rgba(155,89,182,0.12) !important;
}

.lndd-btn-lap {
    background: linear-gradient(135deg, #4ecdc4, #44b8b0);
    color: white;
    border: none;
    padding: 14px 45px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(78,205,196,0.35);
}

.lndd-btn-lap:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(78,205,196,0.5);
}

.lndd-btn-lap:active { transform: translateY(0); }

/* ========== RESULT: HEADER INFO ========== */
.lndd-header-info {
    background: linear-gradient(135deg, #1a2744, #2a1a3e);
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 18px;
    color: white;
}

.lndd-info-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.lndd-info-left, .lndd-info-right {
    flex: 1;
    min-width: 280px;
}

.lndd-info-row {
    font-size: 13px;
    margin-bottom: 6px;
    line-height: 1.6;
}

.lndd-info-label {
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lndd-highlight {
    color: #4ecdc4;
    font-weight: 600;
}

.lndd-kv-text {
    color: #ff6b6b;
    font-size: 12px;
}

.lndd-time-display {
    font-size: 15px;
    font-weight: 700;
    color: #4ecdc4;
    margin-bottom: 8px;
}

.lndd-nt-value {
    color: #ffd93d;
    font-weight: 700;
    font-size: 14px;
}

/* ========== MAIN 4×4 GRID ========== */
.lndd-main-grid-wrapper {
    margin-bottom: 20px;
}

.lndd-dir-top, .lndd-dir-bottom {
    display: flex;
    justify-content: space-around;
    padding: 4px 50px;
    font-size: 12px;
    color: #888;
    letter-spacing: 2px;
}

.lndd-grid-container {
    display: flex;
    align-items: stretch;
}

.lndd-dir-left, .lndd-dir-right {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 0 8px;
    font-size: 12px;
    color: #888;
    text-align: center;
    min-width: 40px;
}

.lndd-grid-4x4 {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-rows: auto auto auto auto;
    border: 3px solid #1a2744;
    border-radius: 4px;
    overflow: hidden;
}

/* ========== PALACE CELL ========== */
.lndd-palace {
    border: 1px solid #c4b896;
    padding: 8px 6px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #fffef8, #fdf8ec);
    position: relative;
    transition: all 0.2s;
}

.lndd-palace:hover {
    background: linear-gradient(180deg, #fff5dd, #ffedcc);
    z-index: 2;
    box-shadow: 0 0 12px rgba(0,0,0,0.1);
}

.lndd-cell-kv {
    background: linear-gradient(180deg, #f5efef, #ece3e3) !important;
    opacity: 0.85;
}

.lndd-cell-tt {
    border-color: #e74c3c !important;
    border-width: 2px;
}

.lndd-p-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    padding-bottom: 3px;
    border-bottom: 1px solid #e8dcc8;
}

.lndd-p-diban {
    font-size: 10px;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lndd-p-thienban {
    font-size: 16px;
    font-weight: 700;
}

.lndd-p-general {
    font-size: 12px;
    color: #7b2d8e;
    font-weight: 700;
    text-align: center;
    margin: 3px 0;
}

.lndd-p-nt {
    font-size: 11px;
    color: #2980b9;
    text-align: center;
    font-weight: 500;
}

.lndd-p-lucthan {
    font-size: 11px;
    color: #c0392b;
    text-align: center;
    font-weight: 600;
    margin: 2px 0;
}

.lndd-p-thansat {
    font-size: 10px;
    color: #e67e22;
    text-align: center;
    margin-top: 1px;
    line-height: 1.3;
}

.lndd-p-kv-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: #e74c3c;
    color: white;
    font-size: 8px;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 700;
}

/* ========== CENTER CELLS ========== */
.lndd-center-cell {
    border: 1px solid #c4b896;
    padding: 8px;
    background: linear-gradient(135deg, #fef9ee, #f8f0dc);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lndd-center-title {
    font-size: 11px;
    font-weight: 700;
    color: #1a2744;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    text-align: center;
}

/* Thời Khóa mini table */
.lndd-tk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}

.lndd-tk-table th {
    background: #1a2744;
    color: white;
    padding: 3px 4px;
    font-size: 9px;
    font-weight: 600;
}

.lndd-tk-table td {
    padding: 3px 4px;
    text-align: center;
    font-size: 10px;
    border-bottom: 1px solid #e8dcc8;
    color: #333;
    font-weight: 500;
}

.lndd-tk-kv td {
    font-size: 9px;
    color: #e74c3c;
}

/* Nguyệt Tướng center */
.lndd-nt-big {
    font-size: 28px;
    font-weight: 700;
    color: #1a2744;
    text-align: center;
    line-height: 1.2;
}

.lndd-nt-name {
    font-size: 11px;
    color: #2980b9;
    text-align: center;
    margin-bottom: 6px;
}

.lndd-can-chi-table {
    border-collapse: collapse;
    margin-top: 4px;
}

.lndd-can-chi-table .lndd-label {
    font-size: 9px;
    color: #888;
    text-align: center;
    padding: 2px 10px;
}

.lndd-can-chi-table .lndd-val {
    font-size: 14px;
    font-weight: 700;
    color: #4a1942;
    text-align: center;
    padding: 2px 10px;
}

/* Tứ Khóa table */
.lndd-tukhoa-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}

.lndd-tukhoa-table th {
    background: #2a1a3e;
    color: white;
    padding: 3px 4px;
    font-size: 9px;
}

.lndd-tukhoa-table td {
    padding: 3px 4px;
    text-align: center;
    border-bottom: 1px solid #e8dcc8;
}

.lndd-general-name {
    font-size: 9px;
    color: #7b2d8e;
    font-weight: 600;
}

.lndd-tk-top {
    font-size: 12px;
    font-weight: 700;
    color: #c0392b;
}

.lndd-tk-bot {
    font-size: 12px;
    font-weight: 600;
    color: #2980b9;
}

/* Tam Truyền table */
.lndd-tamtruyen-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}

.lndd-tamtruyen-table th {
    background: #c0392b;
    color: white;
    padding: 3px 4px;
    font-size: 9px;
}

.lndd-tamtruyen-table td {
    padding: 3px 4px;
    text-align: center;
    border-bottom: 1px solid #e8dcc8;
    font-size: 11px;
}

.lndd-tt-label {
    font-weight: 700;
    color: #c0392b;
}

.lndd-tt-branch {
    font-weight: 700;
    color: #1a2744;
    font-size: 13px;
}

.lndd-tt-gen {
    font-size: 9px;
    color: #7b2d8e;
}

/* ========== CTA BANNER ========== */
.lndd-cta-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 14px;
    margin-bottom: 18px;
    border: 1px solid rgba(78, 205, 196, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255,255,255,0.05);
    position: relative;
    overflow: hidden;
}
.lndd-cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(78,205,196,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.lndd-cta-icon {
    font-size: 32px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(78,205,196,0.4));
}
.lndd-cta-content {
    flex: 1;
    min-width: 0;
}
.lndd-cta-title {
    font-size: 15px;
    font-weight: 700;
    color: #f0f0f0;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}
.lndd-cta-desc {
    font-size: 12.5px;
    color: rgba(255,255,255,0.55);
    line-height: 1.4;
}
.lndd-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #4ecdc4 0%, #44b09e 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
    border-radius: 10px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 3px 12px rgba(78,205,196,0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}
.lndd-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(78,205,196,0.5);
}
.lndd-cta-phone-icon {
    font-size: 16px;
    animation: lndd-ring 1.5s ease-in-out infinite;
}
@keyframes lndd-ring {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-10deg); }
    30% { transform: rotate(8deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(0deg); }
}
@media (max-width: 600px) {
    .lndd-cta-banner {
        flex-direction: column;
        text-align: center;
        padding: 18px 16px;
    }
    .lndd-cta-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ========== RAW TEXT ========== */
.lndd-rawtext {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 25px;
}

.lndd-rawtext h3 {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    color: #1a2744;
    margin: 0 0 6px;
}

.lndd-rawtext-desc {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}

.lndd-rawtext-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 18px;
    font-size: 12.5px;
    line-height: 1.8;
    color: #333;
    font-family: monospace;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.lndd-btn-copy {
    background: #1a2744;
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.lndd-btn-copy:hover {
    background: #2a3a5c;
    transform: translateY(-1px);
}

/* ========== INTRO ========== */
.lndd-intro {
    background: #fff;
    border-left: 4px solid #4a1942;
    border-radius: 0 12px 12px 0;
    padding: 22px 28px;
    margin-bottom: 28px;
    font-size: 14px;
    line-height: 1.85;
    color: #444;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.lndd-intro p {
    margin: 0 0 10px;
}

.lndd-intro p:last-child {
    margin-bottom: 0;
}

.lndd-intro strong {
    color: #1a2744;
}

.lndd-intro em {
    color: #7b2d8e;
    font-style: italic;
}

/* ========== GUIDE ========== */
.lndd-guide {
    background: #fff;
    border: 1px solid #dde1e6;
    border-radius: 14px;
    padding: 22px 26px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.lndd-guide h3 {
    font-size: 16px;
    font-weight: 700;
    color: #7b2d8e;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #7b2d8e;
    display: inline-block;
}

.lndd-guide ul {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
}

.lndd-guide li {
    padding: 8px 0 8px 24px;
    position: relative;
    font-size: 13.5px;
    line-height: 1.7;
    color: #444;
    border-bottom: 1px solid #f0ebe3;
}

.lndd-guide li:last-child {
    border-bottom: none;
}

.lndd-guide li::before {
    content: '•';
    position: absolute;
    left: 8px;
    color: #4ecdc4;
    font-weight: 900;
    font-size: 16px;
}

.lndd-guide li strong {
    color: #1a2744;
}

.lndd-guide-note {
    font-size: 12.5px;
    color: #888;
    margin: 0;
    padding-top: 8px;
    border-top: 1px dashed #ddd;
}

/* ========== LEARN / ACCORDION ========== */
.lndd-learn {
    text-align: center;
    margin-bottom: 30px;
    margin-top: 30px;
}

.lndd-learn-title {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-weight: 700;
    color: #1a2744;
    margin: 0 0 6px;
}

.lndd-learn-desc {
    font-size: 13px;
    color: #888;
    margin: 0 0 20px;
    font-style: italic;
}

.lndd-accordion {
    margin-bottom: 10px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.lndd-accordion:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.lndd-accordion-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    background: linear-gradient(135deg, #2a1a3e, #4a1942);
    color: white;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.lndd-accordion-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.lndd-accordion-arrow {
    margin-left: auto;
    font-size: 22px;
    font-weight: 300;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.lndd-accordion-open .lndd-accordion-arrow {
    transform: rotate(90deg);
}

.lndd-accordion-body {
    max-height: 0;
    overflow: hidden;
    background: #fff;
    padding: 0 22px;
    transition: max-height 0.4s ease, padding 0.4s ease;
    text-align: left;
    font-size: 13.5px;
    line-height: 1.8;
    color: #444;
    border: 1px solid transparent;
}

.lndd-accordion-open .lndd-accordion-body {
    max-height: 600px;
    padding: 18px 22px;
    border-color: #e8dcc8;
    border-top: none;
}

.lndd-accordion-body p {
    margin: 0 0 10px;
}

.lndd-accordion-body p:last-child {
    margin-bottom: 0;
}

.lndd-accordion-body ul {
    padding-left: 20px;
    margin: 0;
}

.lndd-accordion-body li {
    margin-bottom: 6px;
}

.lndd-accordion-body strong {
    color: #1a2744;
}

.lndd-accordion-body em {
    color: #7b2d8e;
}

.lndd-accordion-body h4 {
    font-size: 14px;
    font-weight: 700;
    color: #2a1a3e;
    margin: 20px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px dashed #ddd;
}

.lndd-accordion-body h4:first-child {
    margin-top: 0;
}

.lndd-accordion-body ol {
    padding-left: 22px;
    margin: 8px 0;
}

.lndd-accordion-body ol li {
    margin-bottom: 6px;
}

.lndd-compare-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0 14px;
    font-size: 13px;
}

.lndd-compare-table th {
    background: #1a2744;
    color: white;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
}

.lndd-compare-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #eee;
}

.lndd-compare-table tr:nth-child(even) td {
    background: #f8f6f3;
}

.lndd-compare-table tr:hover td {
    background: #edf9f8;
}

/* ========== FOOTER ========== */
.lndd-footer {
    text-align: center;
    padding: 22px;
    margin-top: 25px;
    border-top: 2px solid #e8dcc8;
    color: #888;
    font-size: 12px;
}

.lndd-footer a {
    color: #4ecdc4;
    font-weight: 700;
    text-decoration: none;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .lndd-form-row { flex-direction: column; }
    .lndd-form-group { min-width: 100%; }
    .lndd-grid-4x4 { font-size: 10px; }
    .lndd-palace { padding: 5px 3px; min-height: 90px; }
    .lndd-p-thienban { font-size: 13px; }
    .lndd-p-general { font-size: 10px; }
    .lndd-center-cell { padding: 5px; }
    .lndd-nt-big { font-size: 22px; }
    .lndd-info-grid { flex-direction: column; }
    .lndd-dir-left, .lndd-dir-right { min-width: 28px; font-size: 10px; }
    .lndd-dir-top, .lndd-dir-bottom { padding: 4px 30px; font-size: 10px; }
}

@media (max-width: 480px) {
    .lndd-wrapper { padding: 15px 8px; }
    .lndd-title { font-size: 24px; }
    .lndd-palace { min-height: 70px; padding: 3px 2px; }
    .lndd-p-diban { font-size: 8px; }
    .lndd-p-thienban { font-size: 11px; }
    .lndd-p-general { font-size: 9px; }
    .lndd-p-nt { font-size: 9px; }
    .lndd-p-lucthan { font-size: 9px; }
    .lndd-center-title { font-size: 9px; }
    .lndd-tk-table, .lndd-tukhoa-table, .lndd-tamtruyen-table { font-size: 8px; }
    .lndd-btn-lap { padding: 12px 28px; font-size: 14px; }
}
