* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    min-height: 100vh;
    padding: 20px;
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

main {
    padding: 14px;
}

.header {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
    position: relative;
}

.header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3182ce 0%, #38b2ac 100%);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.content {
    padding: 40px;
}

.input-section {
    background: #f7fafc;
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

@media (min-width: 1400px) {
    .input-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .input-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 1199px) {
    .input-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.input-group {
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
    font-size: 1rem;
}

input[type="number"] {
    width: 100%;
    padding: 16px;
    border: 2px solid #cbd5e0;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #2d3748;
    font-weight: 500;
}

input[type="number"]:focus {
    outline: none;
    border-color: #3182ce;
    background: white;
    box-shadow: 0 0 0 4px rgba(49, 130, 206, 0.15);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.home-option {
    background: #ffffff;
    border-radius: 15px;
    padding: 28px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #3182ce;
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
}

.home-option.custom-option {
    border-left: 5px solid #10b981;
    position: relative;
    background: linear-gradient(
        135deg,
        rgba(16, 185, 129, 0.08),
        rgba(5, 150, 105, 0.05)
    );
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.15);
}

.home-option.custom-option::before {
    content: "★ CUSTOM";
    position: absolute;
    top: 12px;
    right: 15px;
    background: linear-gradient(135deg, #38b2ac, #319795);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: bold;
    box-shadow: 0 3px 8px rgba(56, 178, 172, 0.3);
    z-index: 2;
}

.home-option.custom-option h3 {
    color: #38b2ac !important;
    font-weight: 800 !important;
}

.home-option:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.home-option.custom-option:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 45px rgba(56, 178, 172, 0.2);
}

.home-option h3 {
    color: #2d3748;
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.home-price {
    text-align: center;
    padding: 24px 20px;
    background: linear-gradient(135deg, #3182ce, #2b6cb0);
    color: white;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(49, 130, 206, 0.2);
}

.home-price-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.home-price-value {
    font-size: 2rem;
    font-weight: 800;
}

.loan-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item {
    text-align: center;
    padding: 16px;
    background: #f1f5f9;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.detail-label {
    font-size: 0.9rem;
    color: #4a5568;
    margin-bottom: 5px;
    font-weight: 500;
}

.detail-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a202c;
}

.down-payment-breakdown {
    background: #f0fff4;
    border: 1px solid #38b2ac;
    border-radius: 12px;
    padding: 18px;
    margin-top: 15px;
}

.down-payment-breakdown h4 {
    color: #234e52;
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 600;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.breakdown-label {
    color: #2d3748;
    font-weight: 500;
}

.breakdown-value {
    font-weight: 700;
    color: #234e52;
}

.note {
    background: #fffaf0;
    border: 1px solid #ed8936;
    border-radius: 12px;
    padding: 24px;
    margin-top: 30px;
    color: #7b341e;
}

.note h4 {
    margin-bottom: 10px;
    color: #92400e;
}

.share-section {
    background: #f7fafc;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    margin-block: 30px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.share-button {
    background: linear-gradient(135deg, #38b2ac 0%, #319795 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(56, 178, 172, 0.25);
}

.share-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(56, 178, 172, 0.35);
}

.share-button:active {
    transform: translateY(0);
}

.share-button.copied {
    background: linear-gradient(135deg, #3182ce 0%, #2b6cb0 100%);
}

.share-text {
    margin-bottom: 15px;
    color: #2d3748;
    font-size: 1rem;
    font-weight: 500;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .content {
        padding: 20px;
    }

    .input-grid {
        grid-template-columns: 1fr;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .loan-details {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .input-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Additional section styles for new content */
.how-it-works {
    background: #f7fafc;
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    margin-top: 30px;
    border: 1px solid #e2e8f0;
}

.how-it-works h2 {
    color: #2d3748;
    margin-bottom: 24px;
    font-weight: 700;
}

.how-it-works .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.how-it-works h3 {
    color: #2d3748;
    margin-bottom: 12px;
    font-weight: 600;
}

.how-it-works p {
    color: #4a5568;
    line-height: 1.6;
    font-weight: 500;
}

.faq-section {
    background: #f7fafc;
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    margin-top: 30px;
    border: 1px solid #e2e8f0;
}

.faq-section h2 {
    color: #2d3748;
    margin-bottom: 24px;
    font-weight: 700;
}

.faq-item {
    margin-bottom: 20px;
}

.faq-item h3 {
    color: #2d3748;
    margin-bottom: 12px;
    font-weight: 600;
}

.faq-item p {
    color: #4a5568;
    line-height: 1.7;
    font-weight: 500;
}

/* Footer styles */
.footer {
    color: #e2e8f0;
    margin: 20px auto 0;
    max-width: 1200px;
    position: relative;
}

.footer-content {
    padding: 24px;
    text-align: center;
}

.footer-content p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin: 0;
    font-weight: 500;
}

.footer-link {
    color: #79dff7;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.footer-link:hover {
    color: #4fd1c7;
    text-decoration: underline;
}

/* Mobile responsive footer */
@media (max-width: 768px) {
    body {
        padding: 15px 15px 0;
    }

    .container {
        margin-bottom: 15px;
    }

    .footer {
        margin-bottom: 15px;
    }

    .footer-content {
        padding: 20px;
    }
}

/* Tablet responsive adjustments */
@media (max-width: 1024px) {
    .footer {
        margin-bottom: 15px;
    }
}
