* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: #3e2723;
    font-family: Georgia, "Times New Roman", serif;
    color: #f5e6c8;
}

.container {
    max-width: 800px;
    margin: auto;
    padding: 20px;
}

.header {
    text-align: center;
    padding: 20px;
    border: 1px solid #d4af37;
    background: #4e342e;
    margin-bottom: 20px;
}

.header h1 {
    margin: 0;
    color: #d4af37;
    letter-spacing: 2px;
}

.sub {
    margin-top: 10px;
    font-size: 14px;
    color: #f5e6c8;
}

.card {
    background: #5d4037;
    border: 1px solid #d4af37;
    padding: 20px;
    margin-bottom: 20px;
}

.card h2 {
    color: #d4af37;
    margin-top: 0;
}

.form-modern input,
.form-modern select,
.form-modern button {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid #d4af37;
    background: #4e342e;
    color: #f5e6c8;
    font-size: 16px;
    border-radius: 4px;
}

.form-modern select {
    appearance: none;
}

.tgl-group {
    display: flex;
    gap: 10px;
}

.tgl-group input,
.tgl-group select {
    flex: 1;
}

.form-modern button {
    background: #d4af37;
    color: #3e2723;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.form-modern button:hover {
    background: #f5e6c8;
}

.hasil-item {
    margin-bottom: 15px;
}

.label {
    color: #d4af37;
    font-weight: bold;
}

.value {
    margin-top: 5px;
}

.history-item {
    padding: 10px;
    border-bottom: 1px solid #d4af37;
}

.history-item:last-child {
    border-bottom: none;
}

.footer {
    text-align: center;
    padding: 20px;
    border: 1px solid #d4af37;
    background: #4e342e;
    font-size: 14px;
}

a {
    color: #d4af37;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.breadcrumb {
    font-size: 14px;
    margin-bottom: 15px;
    opacity: 0.8;
}

.breadcrumb a {
    text-decoration: none;
}

button {
    display: block !important;
    width: 100% !important;
    background: #d4af37 !important;
    color: #3e2723 !important;
    padding: 12px !important;
    border: none !important;
    border-radius: 5px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    margin-top: 15px !important;
}

button:hover {
    background: #f5e6c8 !important;
}

.hasil-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.hasil-item:last-child {
    border-bottom: none;
}

.hasil-compact h2 {
    margin-bottom: 15px;
}

.weton-grid {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.weton-box {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 5px;
}

.weton-box .label {
    font-size: 14px;
    margin-bottom: 5px;
}

.weton-box .value {
    font-size: 18px;
    font-weight: bold;
}

.neptu {
    font-size: 13px;
    opacity: 0.8;
}

.kategori-box {
    margin-bottom: 15px;
    padding: 8px;
    background: rgba(212, 175, 55, 0.15);
    border-left: 4px solid #d4af37;
    font-weight: bold;
}

.narasi-text {
    line-height: 1.8;
    font-size: 18px;
    letter-spacing: 0.3px;
}

.narasi-text h3 {
    font-size: 18px;
    color: #d4af37;
    margin-top: 25px;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.narasi-text p {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.8;
    font-family: Georgia, "Times New Roman", serif;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0 0 20px 0;
    max-width: 100%;
    box-sizing: border-box;
    color: #f5e6c8;
    font-size: 18px;
}

.narasi-text br {
    display: block !important;
    height: 0.5em !important;
    margin: 10px 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    line-height: 0 !important;
}

@media (max-width: 768px) {
    .tabel-weton {
        font-size: 12px;
    }
    .tabel-weton th,
    .tabel-weton td {
        padding: 8px 6px !important;
    }
    .tabel-perhitungan {
        padding: 10px;
        margin: 15px 0;
    }
    .tabel-perhitungan h4 {
        font-size: 14px;
        margin-bottom: 10px;
    }
    .hasil-nilai {
        font-size: 20px !important;
    }
}

@media (max-width: 600px) {
    .tabel-perhitungan {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 10px 0;
        margin: 15px -20px;
        padding-left: 10px;
        padding-right: 10px;
    }
    .tabel-weton {
        font-size: 12px;
        min-width: 600px;
        width: 100%;
        margin: 0 auto;
    }
    .tabel-weton thead {
        background: linear-gradient(90deg, #6d4c41 0%, #8d6e63 50%, #6d4c41 100%);
    }
    .tabel-weton th {
        padding: 10px 8px !important;
        border-right: 1px solid rgba(212, 175, 55, 0.3) !important;
        font-size: 12px;
    }
    .tabel-weton td {
        padding: 8px 6px !important;
        border-right: 1px solid rgba(212, 175, 55, 0.2) !important;
        border-bottom: 1px solid rgba(212, 175, 55, 0.2) !important;
        font-size: 12px;
    }
    .tabel-perhitungan h4 {
        font-size: 13px;
        padding: 0 10px;
    }
    .hasil-perhitungan {
        margin: 15px 10px;
    }
    .hasil-nilai {
        font-size: 18px !important;
    }
}

.narasi-text pre {
    display: none;
}

.narasi-text br {
    display: none;
}

.tabel-perhitungan {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(212, 175, 55, 0.1));
    border: 2px solid #d4af37;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.tabel-perhitungan h4 {
    color: #d4af37;
    text-align: center;
    font-size: 16px;
    margin: 0 0 15px 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.tabel-weton {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
}

.tabel-weton thead {
    background: linear-gradient(90deg, #6d4c41 0%, #8d6e63 50%, #6d4c41 100%);
    border-bottom: 3px solid #d4af37;
}

.tabel-weton th {
    color: #d4af37;
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
    letter-spacing: 0.5px;
    border-right: 1px solid rgba(212, 175, 55, 0.3);
    font-size: 13px;
    text-transform: uppercase;
}

.tabel-weton th:last-child {
    border-right: none;
}

.tabel-weton td {
    padding: 10px 8px;
    text-align: center;
    border-right: 1px solid rgba(212, 175, 55, 0.2);
    color: #f5e6c8;
}

.tabel-weton td:last-child {
    border-right: none;
}

.tabel-weton tbody tr {
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    transition: background 0.3s ease;
}

.tabel-weton tbody tr:hover {
    background: rgba(212, 175, 55, 0.1);
}

.tabel-weton .pihak-pria {
    color: #a8dadc;
    font-weight: bold;
    background: rgba(168, 218, 220, 0.1);
}

.tabel-weton .pihak-wanita {
    color: #f994c8;
    font-weight: bold;
    background: rgba(249, 148, 200, 0.1);
}

.tabel-weton .sisa {
    color: #d4af37;
    font-weight: bold;
    background: rgba(212, 175, 55, 0.15);
}

.hasil-perhitungan {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.05));
    border: 2px solid #d4af37;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    margin-top: 15px;
}

.hasil-label {
    font-size: 12px;
    color: #d4af37;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: bold;
}

.hasil-nilai {
    font-size: 28px;
    font-weight: bold;
    color: #d4af37;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

@media (max-width: 600px) {
    .weton-grid {
        flex-direction: column;
    }
    .container {
        padding: 10px;
    }
    .tgl-group {
        flex-direction: column;
    }
    .narasi-text {
        font-size: 16px;
        line-height: 1.7;
    }
    .narasi-text pre {
        font-size: 16px;
    }
    .narasi-text h3 {
        font-size: 16px;
    }
}

body.page-jodoh .container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

body.page-jodoh .container::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    z-index: -1;
    filter: blur(8px);
    opacity: 1;
}

body.page-jodoh.takdir-emas .container::before {
    background: linear-gradient(45deg, #ffd700, #b8860b, #ffd700);
    opacity: 1;
    animation: glowSoft 6s ease-in-out infinite;
}

@keyframes glowSoft {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

body.page-jodoh.takdir-mahkota .container::before {
    background: conic-gradient(#d4af37, #4a148c, #d4af37);
    opacity: 1;
    animation: rotateGlow 8s linear infinite;
}

@keyframes rotateGlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

body.page-jodoh.takdir-darah .container::before {
    background: radial-gradient(circle, #ff0000, #5c0000);
    opacity: 1;
    animation: pulseBlood 1.5s infinite;
}

@keyframes pulseBlood {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.btn-group {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-top: 20px;
}

.btn-group .btn-submit {
    flex: 1;
    width: auto !important;
}

.btn-submit {
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    background: #007bff;
    color: white;
}

.btn-alt {
    background: #28a745;
}

body.page-jodoh.takdir-rapuh .container::before {
    background: linear-gradient(90deg, #9e9e9e, #424242, #9e9e9e);
    opacity: 1;
    animation: glitchGlow 0.7s infinite;
}

@keyframes glitchGlow {
    0% { transform: translateX(0); opacity: 0.8; }
    20% { transform: translateX(-2px); opacity: 1; }
    40% { transform: translateX(2px); opacity: 0.7; }
    60% { transform: translateX(-1px); opacity: 1; }
    80% { transform: translateX(1px); opacity: 0.8; }
    100% { transform: translateX(0); opacity: 0.8; }
}