:root {
    --bg-dark: #070913;
    --text-main: #f0f4f8;
    --text-muted: #8b9bb4;
    --primary: #8a2387;
    --primary-gradient: linear-gradient(135deg, #e94057, #f27121);
    --secondary: #00d2ff;
    --secondary-gradient: linear-gradient(135deg, #3a7bd5, #3a6073);

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --font-family: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: float 20s infinite alternate cubic-bezier(0.5, 0, 0.5, 1);
}

.glow-1 {
    width: 50vw;
    height: 50vw;
    background: var(--primary);
    top: -10vw;
    left: -10vw;
    animation-delay: 0s;
}

.glow-2 {
    width: 40vw;
    height: 40vw;
    background: #00d2ff;
    bottom: -10vw;
    right: -10vw;
    animation-delay: -5s;
    opacity: 0.3;
}

.glow-3 {
    width: 30vw;
    height: 30vw;
    background: #e94057;
    top: 40%;
    left: 40%;
    animation-delay: -10s;
    opacity: 0.2;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(10vw, 15vh) scale(1.2);
    }
}

/* Container & Header */
.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    z-index: 10;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.logo {
    font-size: 2.5rem;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.logo strong {
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    color: #f27121;
    text-shadow: 0 0 20px rgba(242, 113, 33, 0.5);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
}

.hidden {
    display: none !important;
}

/* Form Styles */
.estimate-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

label i {
    color: var(--text-muted);
}

input[type="text"] {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    padding: 1rem 1.2rem;
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

input[type="text"]:focus {
    border-color: rgba(233, 64, 87, 0.5);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 15px rgba(233, 64, 87, 0.2);
}

/* Custom Range Slider */
.range-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(242, 113, 33, 0.8);
    transition: var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.range-value {
    font-weight: 600;
    font-size: 1.1rem;
    color: #f27121;
    min-width: 100px;
    text-align: right;
}

/* Service Cards (Checkboxes) */
.services-group {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkbox-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.service-card {
    cursor: pointer;
    position: relative;
    display: block;
}

.service-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.card-content {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.card-content i {
    font-size: 2rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.card-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

.card-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.service-card input[type="checkbox"]:checked~.card-content {
    background: rgba(233, 64, 87, 0.1);
    border-color: #e94057;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), inset 0 0 15px rgba(233, 64, 87, 0.2);
    transform: translateY(-5px);
}

.service-card input[type="checkbox"]:checked~.card-content i {
    color: #e94057;
    text-shadow: 0 0 10px rgba(233, 64, 87, 0.5);
}

/* Buttons */
.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 1.2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    transition: var(--transition);
    box-shadow: 0 10px 25px rgba(233, 64, 87, 0.3);
    margin-top: 1rem;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(233, 64, 87, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(233, 64, 87, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(233, 64, 87, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(233, 64, 87, 0);
    }
}

/* Results Section */
.results-header {
    text-align: center;
    margin-bottom: 2rem;
}

.results-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.results-header #results-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.highlight {
    color: #f27121;
    font-weight: 600;
}

.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.metric-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: #00d2ff;
}

.metric-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.metric-value {
    font-size: 1.2rem;
    font-weight: 600;
}

.detailed-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.service-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.service-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.service-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.service-info i {
    color: #e94057;
    font-size: 1.2rem;
}

.service-cost {
    font-weight: 600;
    color: #fff;
}

.results-footer {
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
}

.total-estimated {
    text-align: center;
    margin-bottom: 2rem;
}

.total-estimated span {
    color: var(--text-muted);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.total-estimated h3 {
    font-size: 3rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: 0.5rem;
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
}

/* AI Market Intelligence Dashboard */
.ai-dashboard {
    background: rgba(10, 15, 30, 0.4);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}

.ai-dashboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% -20%, rgba(0, 210, 255, 0.1), transparent 70%);
    pointer-events: none;
}

.ai-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.ai-dashboard-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #00d2ff;
    font-size: 1.2rem;
}

.badge {
    background: rgba(0, 210, 255, 0.1);
    color: #00d2ff;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(0, 210, 255, 0.3);
}

.ai-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.ai-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: var(--transition);
}

.ai-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 210, 255, 0.3);
    transform: translateY(-3px);
}

.ai-card-icon {
    font-size: 1.2rem;
    color: #f27121;
    margin-bottom: 0.3rem;
}

.ai-card h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.ai-card p {
    font-size: 1rem;
    color: #fff;
    font-weight: 600;
    line-height: 1.4;
}

/* AI Loading Screen */
.ai-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    min-height: 400px;
}

.spinner-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 2rem;
}

.ai-spinner {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: #00d2ff;
    border-bottom-color: #f27121;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.ai-spinner::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 3px solid transparent;
    border-left-color: #e94057;
    border-radius: 50%;
    animation: spin-reverse 2s linear infinite;
}

.ai-icon-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse 2s infinite;
}

.ai-loading h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.ai-loading p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    max-width: 300px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-gradient);
    animation: fillProgress 2.5s ease-in-out forwards;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes spin-reverse {
    100% {
        transform: rotate(-360deg);
    }
}

@keyframes fillProgress {
    0% {
        width: 0%;
    }

    50% {
        width: 60%;
    }

    100% {
        width: 100%;
    }
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .glass-panel {
        padding: 1.5rem;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .total-estimated h3 {
        font-size: 2.5rem;
    }

    .ai-grid {
        grid-template-columns: 1fr;
    }
}