/* ===================== MAI HOA DICH SO - PLUGIN STYLES ===================== */

.mhds-wrapper {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 800px;
    margin: 20px auto;
    color: #2c1810;
    line-height: 1.6;
}

.mhds-container {
    background: linear-gradient(135deg, #fdf6ec 0%, #f8eed6 100%);
    border: 2px solid #c41e3a;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(196, 30, 58, 0.15);
}

/* Title */
.mhds-title {
    text-align: center;
    font-size: 28px;
    color: #c41e3a;
    margin: 0 0 5px;
    font-weight: 700;
    letter-spacing: 2px;
}

.mhds-subtitle {
    text-align: center;
    font-size: 14px;
    color: #8b6914;
    margin: 0 0 25px;
    font-style: italic;
}

/* Form */
.mhds-form {
    margin-bottom: 20px;
}

.mhds-form-section {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid #dcc99e;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.mhds-section-title {
    font-size: 16px;
    color: #8b4513;
    margin: 0 0 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dcc99e;
    font-weight: 600;
}

.mhds-datetime-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.mhds-field {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 80px;
}

.mhds-field label {
    font-size: 13px;
    color: #6b5231;
    margin-bottom: 4px;
    font-weight: 500;
}

.mhds-field input {
    padding: 8px 10px;
    border: 1px solid #c9a96e;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
    background: #fff;
    color: #2c1810;
    outline: none;
    transition: border-color 0.2s;
}

.mhds-field input:focus {
    border-color: #c41e3a;
    box-shadow: 0 0 0 2px rgba(196, 30, 58, 0.15);
}

/* Buttons */
.mhds-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.mhds-btn-secondary {
    background: #f0e0c0;
    color: #6b5231;
    border: 1px solid #c9a96e;
}

.mhds-btn-secondary:hover {
    background: #e5d0a8;
}

.mhds-btn-primary {
    display: block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #c41e3a, #a01830);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 8px;
    text-transform: uppercase;
}

.mhds-btn-primary:hover {
    background: linear-gradient(135deg, #d42040, #b01838);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

/* Dice input */
.mhds-dice-input-row {
    max-width: 200px;
}

.mhds-dice-input-row .mhds-field input {
    font-size: 20px;
    font-weight: 700;
    padding: 10px;
}

/* ===================== RESULT SECTION ===================== */

.mhds-result {
    margin-top: 25px;
}

.mhds-result .mhds-section {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #dcc99e;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.mhds-result .mhds-section-title {
    font-size: 17px;
    color: #c41e3a;
    border-bottom-color: #e8c8a0;
}

.mhds-main-hex {
    border-color: #c41e3a !important;
    border-width: 2px !important;
}

/* Export button */
.mhds-export-row {
    text-align: center;
    margin-top: 20px;
}

.mhds-btn-export {
    background: linear-gradient(135deg, #2c6b3f, #1e4d2e);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 10px 28px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.mhds-btn-export:hover {
    background: linear-gradient(135deg, #358a50, #266838);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(44, 107, 63, 0.3);
}

/* Info grid */
.mhds-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
}

.mhds-info-item {
    font-size: 14px;
}

.mhds-info-label {
    font-weight: 600;
    color: #8b4513;
}

.mhds-calc-details {
    margin-top: 15px;
    padding: 12px;
    background: rgba(196, 30, 58, 0.05);
    border-radius: 6px;
    font-size: 13px;
}

.mhds-calc-details p {
    margin: 4px 0;
}

/* Hexagram header */
.mhds-hex-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.mhds-hex-number {
    background: #c41e3a;
    color: #fff;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.mhds-hex-unicode {
    font-size: 36px;
    line-height: 1;
    color: #c41e3a;
}

.mhds-hex-name {
    font-size: 22px;
    font-weight: 700;
    color: #2c1810;
}

/* Hexagram body */
.mhds-hex-body {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* Hexagram visual lines */
.mhds-hexagram-visual {
    flex-shrink: 0;
    padding: 10px;
}

.mhds-hex-label {
    text-align: center;
    font-size: 12px;
    color: #8b4513;
    margin-bottom: 8px;
    font-weight: 600;
}

.mhds-line-row {
    display: flex;
    align-items: center;
    margin: 6px 0;
    gap: 8px;
}

.mhds-line-num {
    font-size: 11px;
    color: #999;
    width: 16px;
    text-align: right;
}

.mhds-line {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 10px;
    width: 140px;
    position: relative;
}

.mhds-yang-bar {
    width: 100%;
    height: 8px;
    background: #c41e3a;
    border-radius: 2px;
}

.mhds-yin-bar {
    width: 42%;
    height: 8px;
    background: #c41e3a;
    border-radius: 2px;
}

.mhds-yin-gap {
    width: 16%;
    height: 8px;
}

.mhds-line.mhds-moving .mhds-yang-bar,
.mhds-line.mhds-moving .mhds-yin-bar {
    background: #d4a017;
}

.mhds-moving-mark {
    position: absolute;
    right: -22px;
    font-size: 14px;
    color: #d4a017;
    font-weight: bold;
}

.mhds-trigram-label {
    font-size: 10px;
    color: #aaa;
    margin-left: 4px;
}

/* Hexagram details */
.mhds-hex-details {
    flex: 1;
    min-width: 250px;
}

.mhds-trigram-info {
    margin-bottom: 8px;
    font-size: 14px;
}

.mhds-trigram-role {
    color: #8b4513;
    font-weight: 500;
}

.mhds-trigram-symbol {
    font-size: 20px;
    vertical-align: middle;
}

.mhds-hex-meaning {
    margin-top: 12px;
    padding: 10px;
    background: rgba(212, 160, 23, 0.1);
    border-left: 3px solid #d4a017;
    border-radius: 0 4px 4px 0;
    font-size: 14px;
}

.mhds-note {
    font-size: 13px;
    color: #888;
    font-style: italic;
    margin: 0 0 12px;
}

/* Thể - Dụng analysis */
.mhds-analysis {
    border-color: #8b4513 !important;
}

.mhds-analysis .mhds-section-title {
    color: #8b4513;
}

.mhds-the-dung {
    font-size: 15px;
}

.mhds-td-item {
    margin-bottom: 8px;
}

.mhds-td-label {
    font-weight: 600;
    color: #6b5231;
}

.mhds-td-relation {
    margin: 15px 0;
    padding: 10px;
    background: rgba(139, 69, 19, 0.08);
    border-radius: 6px;
}

.mhds-td-verdict {
    padding: 12px;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
}

.mhds-td-verdict.mhds-good {
    background: rgba(34, 139, 34, 0.1);
    border: 1px solid rgba(34, 139, 34, 0.3);
    color: #1a6b1a;
}

.mhds-td-verdict.mhds-bad {
    background: rgba(220, 20, 60, 0.08);
    border: 1px solid rgba(220, 20, 60, 0.25);
    color: #b01030;
}

.mhds-td-verdict.mhds-neutral {
    background: rgba(212, 160, 23, 0.1);
    border: 1px solid rgba(212, 160, 23, 0.3);
    color: #8b6914;
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 600px) {
    .mhds-container {
        padding: 15px;
        margin: 10px;
    }

    .mhds-title {
        font-size: 22px;
    }

    .mhds-datetime-row {
        gap: 8px;
    }

    .mhds-field {
        min-width: 60px;
    }

    .mhds-field input {
        padding: 6px 4px;
        font-size: 14px;
    }

    .mhds-dice-btn {
        width: 46px;
        height: 46px;
        font-size: 26px;
    }

    .mhds-hex-body {
        flex-direction: column;
    }

    .mhds-info-grid {
        grid-template-columns: 1fr;
    }

    .mhds-hex-name {
        font-size: 18px;
    }

    .mhds-line {
        width: 120px;
    }
}
