/* Estate Tools - Premium UI */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.estate-tool {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 50px;
    margin: 40px 0;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.8);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.estate-tool::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

.estate-tool:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(0,0,0,0.12);
}

.estate-tool h2 {
    color: #1a202c;
    margin-bottom: 12px;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.estate-tool p {
    color: #718096;
    font-size: 16px;
    font-weight: 500;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 40px;
    margin: 40px 0;
}

.property-column {
    position: relative;
}

.property-column h3 {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vs-divider {
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    align-self: center;
    text-shadow: 0 4px 12px rgba(245,87,108,0.2);
}

.prop-select {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 24px;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23667eea' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    padding-right: 50px;
}

.prop-select:hover {
    border-color: #667eea;
    box-shadow: 0 4px 20px rgba(102,126,234,0.15);
}

.prop-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.1);
}

.prop-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 32px;
    border-radius: 20px;
    margin-top: 24px;
    box-shadow: 0 12px 40px rgba(102,126,234,0.25);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.prop-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.prop-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(102,126,234,0.35);
}

.prop-price {
    font-size: 36px;
    font-weight: 900;
    color: white;
    margin-bottom: 24px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    letter-spacing: -1px;
}

.prop-stats .stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    transition: all 0.2s ease;
}

.prop-stats .stat:last-child {
    border-bottom: none;
}

.prop-stats .stat:hover {
    padding-left: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
}

.prop-stats .stat span {
    color: rgba(255,255,255,0.9);
    font-weight: 600;
    font-size: 15px;
}

.stars {
    color: #ffd700;
    font-size: 20px;
    text-shadow: 0 2px 8px rgba(255,215,0,0.3);
    letter-spacing: 2px;
}

.comparison-result {
    background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
    padding: 40px;
    border-radius: 24px;
    margin-top: 40px;
    box-shadow: 0 15px 45px rgba(150,230,161,0.25);
    border: 2px solid rgba(255,255,255,0.8);
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.winner-badge {
    font-size: 28px;
    font-weight: 900;
    color: #22543d;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(34,84,61,0.1);
    letter-spacing: -0.5px;
}

.price-diff {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    background: rgba(255,255,255,0.6);
    padding: 12px 24px;
    border-radius: 12px;
    display: inline-block;
    margin-top: 12px;
}

.cta-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 18px 48px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 24px;
    box-shadow: 0 10px 30px rgba(102,126,234,0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102,126,234,0.5);
}

.cta-btn:hover::before {
    left: 100%;
}

.cta-btn:active {
    transform: translateY(-1px);
}

.calc-form {
    max-width: 700px;
    margin: 40px 0;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
}

.form-group {
    margin-bottom: 32px;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 12px;
    color: #2d3748;
    font-size: 15px;
    letter-spacing: 0.3px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    background: white;
    transition: all 0.3s ease;
    color: #2d3748;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.1);
    background: #fafbfc;
}

.form-group input::placeholder {
    color: #a0aec0;
    font-weight: 500;
}

.form-group small {
    color: #718096;
    font-size: 13px;
    font-weight: 500;
    margin-top: 8px;
    display: block;
}

.calc-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 18px 48px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 16px;
    box-shadow: 0 10px 30px rgba(79,172,254,0.4);
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.calc-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(79,172,254,0.5);
}

.roi-results {
    margin-top: 50px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.roi-results h3 {
    font-size: 28px;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 32px;
    text-align: center;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.result-card {
    background: white;
    padding: 32px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    border: 2px solid #f7fafc;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.result-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px rgba(0,0,0,0.12);
    border-color: #667eea;
}

.result-card:hover::before {
    transform: scaleX(1);
}

.result-card.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 15px 45px rgba(102,126,234,0.35);
    border: none;
}

.result-card.highlight::before {
    background: linear-gradient(90deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 100%);
    transform: scaleX(1);
}

.result-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-card.highlight .result-label {
    opacity: 0.95;
}

.result-value {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.2;
}

.breakdown-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 32px 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.breakdown-table th, .breakdown-table td {
    padding: 18px 24px;
    text-align: left;
}

.breakdown-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.breakdown-table td {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: #2d3748;
}

.breakdown-table tr:last-child td {
    border-bottom: none;
}

.breakdown-table tr:hover td {
    background: #f7fafc;
}

.success-message {
    background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
    color: #22543d;
    padding: 28px 36px;
    border-radius: 20px;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 10px 35px rgba(150,230,161,0.3);
    border: 2px solid rgba(255,255,255,0.8);
    animation: slideIn 0.5s ease;
}

.alert-form input, .alert-form select {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    background: white;
}

.alert-form input:focus, .alert-form select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.1);
}

.cta-section {
    text-align: center;
    margin-top: 48px;
    padding: 48px;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(252,182,159,0.25);
}

.cta-section p {
    font-size: 20px;
    font-weight: 700;
    color: #7c2d12;
    margin-bottom: 24px;
}

.comparisons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin: 32px 0;
}

.comparison-item {
    background: linear-gradient(135deg, #e0f2fe 0%, #bfdbfe 100%);
    padding: 28px;
    border-radius: 16px;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    color: #1e3a8a;
    box-shadow: 0 6px 25px rgba(191,219,254,0.3);
    transition: all 0.3s ease;
}

.comparison-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(191,219,254,0.4);
}

.rating-factors {
    margin: 40px 0;
}

.factor {
    margin-bottom: 28px;
    padding: 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 2px solid #f7fafc;
    transition: all 0.3s ease;
}

.factor:hover {
    border-color: #667eea;
    box-shadow: 0 8px 30px rgba(102,126,234,0.15);
}

.factor label {
    display: block;
    font-weight: 700;
    margin-bottom: 16px;
    color: #2d3748;
    font-size: 16px;
}

.rating-slider {
    width: 80%;
    margin-right: 20px;
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

.rating-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
    transition: all 0.2s ease;
}

.rating-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 16px rgba(102,126,234,0.5);
}

.rating-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
    border: none;
}

.rating-value {
    font-weight: 800;
    font-size: 18px;
    color: #667eea;
}

.total-score {
    text-align: center;
    padding: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 24px;
    margin-top: 40px;
    box-shadow: 0 15px 50px rgba(102,126,234,0.4);
    position: relative;
    overflow: hidden;
}

.total-score::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.total-score h3 {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 24px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}

.score-badge {
    display: inline-block;
    padding: 16px 40px;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 20px;
    font-weight: 800;
    margin: 24px 0;
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .estate-tool {
        padding: 30px 24px;
    }
    
    .estate-tool h2 {
        font-size: 26px;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .vs-divider {
        display: none;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .comparisons {
        grid-template-columns: 1fr;
    }
    
    .prop-price {
        font-size: 28px;
    }
    
    .result-value {
        font-size: 24px;
    }
    
    .cta-btn {
        width: 100%;
        padding: 16px 32px;
    }
    
    .calc-form {
        padding: 24px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip .tooltiptext {
    visibility: hidden;
    background: #1a202c;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 13px;
    font-weight: 600;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: #667eea;
    color: white;
}

::-moz-selection {
    background: #667eea;
    color: white;
}
