
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.divine-calculator-wrapper {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 40px 20px;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

.divine-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    align-items: flex-start;
    overflow: visible;
}

/* LEFT SIDE - FORM SECTION */
.calculator-section {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.calculator-section h1 {
    color: #ffffff;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
    text-align: center;
}

/* VERTICAL TAB BUTTONS */
.tab-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 35px;
}

.tab-btn {
    width: 100%;
    padding: 18px 25px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(135deg, #b8934a 0%, #d4af6a 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.tab-btn.active::before {
    transform: scaleY(1);
}

.tab-btn.active {
    background: rgba(184, 147, 74, 0.15);
    border-color: rgba(184, 147, 74, 0.3);
    color: #d4af6a;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.tab-content {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* FORM GROUPS */
.form-group {
    margin-bottom: 28px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0.3px;
}

/* DROPDOWN FIX */
.form-group select,
.form-group input[type="number"] {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    font-size: 16px;
    color: #ffffff;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-group select {
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23d4af6a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
    padding-right: 45px;
    cursor: pointer;
}

.form-group select option {
    background: #2c3e50;
    color: #ffffff;
    padding: 12px;
    font-size: 15px;
}

.form-group select option:hover,
.form-group select option:checked {
    background: linear-gradient(135deg, #b8934a 0%, #d4af6a 100%);
    color: #ffffff;
}

.form-group select:focus,
.form-group input[type="number"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.12);
    border-color: #b8934a;
    box-shadow: 0 0 0 3px rgba(184, 147, 74, 0.15);
}

.input-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* SLIDER */
.slider-container {
    margin-top: 12px;
    padding: 10px 0;
}

.slider-container input[type="range"] {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #b8934a 0%, #d4af6a 100%);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(184, 147, 74, 0.4);
    transition: transform 0.2s ease;
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.slider-container input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #b8934a 0%, #d4af6a 100%);
    cursor: pointer;
    border-radius: 50%;
    border: none;
    box-shadow: 0 2px 8px rgba(184, 147, 74, 0.4);
}

.year-display {
    text-align: center;
    color: #d4af6a;
    font-weight: 600;
    font-size: 18px;
    margin-top: 12px;
    padding: 8px;
    background: rgba(212, 175, 106, 0.1);
    border-radius: 8px;
}

/* MORTGAGE PRODUCTS */
.mortgage-products {
    margin-bottom: 28px;
}

.mortgage-products p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
}

.product-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.product-btn {
    padding: 14px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
}

.product-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(184, 147, 74, 0.4);
}

.product-btn.active {
    background: linear-gradient(135deg, rgba(184, 147, 74, 0.2) 0%, rgba(212, 175, 106, 0.2) 100%);
    border-color: #b8934a;
    color: #d4af6a;
    font-weight: 600;
}

/* ============= RIGHT SIDE - GOLDEN/BLACK DESIGN (NOT BLUE) ============= */
.result-section {
    flex: 0 0 450px;
    background: linear-gradient(135deg, #b8934a 0%, #d4af6a 100%);
    border-radius: 20px;
    padding: 40px 35px;
    color: white;
    box-shadow: 0 20px 60px rgba(184, 147, 74, 0.3);
    position: sticky;
    top: 20px;
    max-height: none;
    overflow: visible;
}

.result-section.error {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.result-section h2 {
    font-size: 22px;
    margin-bottom: 30px;
    font-weight: 600;
    text-align: center;
}

/* ERROR MESSAGE */
.error-message {
    background: rgba(255, 255, 255, 0.15);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
}

.error-message p {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.error-message .tips h4 {
    font-size: 17px;
    margin-bottom: 18px;
    font-weight: 600;
}

.error-message .tip-item {
    margin-bottom: 18px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border-left: 3px solid rgba(255, 255, 255, 0.5);
}

.error-message .tip-title {
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}

.error-message .tip-desc {
    font-size: 14px;
    opacity: 0.95;
    line-height: 1.6;
}

/* RESULT CARDS */
.result-box {
    background: rgba(255, 255, 255, 0.2);
    padding: 28px;
    border-radius: 15px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease;
}

.result-box:hover {
    transform: translateY(-3px);
}

.result-label {
    font-size: 13px;
    opacity: 0.95;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.result-value {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -0.5px;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ACCORDION */
.accordion {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    margin-bottom: 25px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 22px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.1);
}

.accordion-header h3 {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
}

.accordion-icon {
    font-size: 26px;
    font-weight: 300;
    transition: transform 0.3s ease;
    min-width: 30px;
    text-align: center;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border-radius: 20px;
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 30px 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.modal-header h2 {
    font-size: 26px;
    margin: 0;
    font-weight: 600;
}

.close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 35px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item.highlight {
    font-size: 19px;
    font-weight: 700;
    margin-top: 20px;
    padding: 25px;
    background: rgba(184, 147, 74, 0.2);
    border-radius: 12px;
    border: 2px solid rgba(184, 147, 74, 0.4);
}

.summary-label {
    opacity: 0.9;
    font-weight: 500;
}

.summary-value {
    font-weight: 700;
    color: #d4af6a;
}

.modal-footer {
    padding: 30px 35px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.disclaimer {
    font-size: 13px;
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 22px;
    text-align: center;
}

/* BUTTONS */
.cta-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn {
    padding: 16px 24px;
    border-radius: 12px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .divine-container {
        flex-direction: column;
    }

    .result-section {
        flex: 1;
        width: 100%;
        position: relative;
        top: 0;
    }

    .input-wrapper,
    .cta-buttons {
        grid-template-columns: 1fr;
    }

    .product-buttons {
        grid-template-columns: 1fr;
    }

    .tab-buttons {
        flex-direction: row;
    }

    .modal-content {
        margin: 10px;
    }
}

/* MOBILE SPECIFIC */
@media (max-width: 768px) {
    .result-section {
        padding: 30px 25px;
    }

    .result-value {
        font-size: 32px;
    }

    .cta-buttons {
        grid-template-columns: 1fr;
    }
}

/* SCROLLBAR */
.modal-content::-webkit-scrollbar {
    width: 10px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(184, 147, 74, 0.5);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(184, 147, 74, 0.7);
}