:root {
    --primary-color: #BC1E2E;
    /* Red */
    --primary-gradient: linear-gradient(135deg, #BC1E2E 0%, #D32F2F 100%);
    --accent-color: #FF5252;
    --text-dark: #1a1a1a;
    --text-light: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.85);
    /* More opaque for "foggy" feel */
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

body {
    background: #ffffff;
    /* Straight White */
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
    margin: 0;
    min-height: auto;
    /* Changed from 100vh for embedding */
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    /* Reduced top margin since header is gone */
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeIn 1s ease-out;
}

.hero p {
    font-size: 1.1rem;
    color: #888;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* App Grid */
/* App Grid - Equal Height Columns */
.app-grid {
    display: flex;
    /* Use flex to stretch children */
    gap: 40px;
    align-items: stretch;
    /* Forces equal height */
}

.app-grid>div {
    flex: 1;
    /* Equal width */
    width: 0;
    /* Fix flexbox resizing issues */
}

@media (max-width: 768px) {
    .app-grid {
        flex-direction: column;
        gap: 20px;
    }

    .app-grid>div {
        width: 100%;
        flex: auto;
    }

    body {
        padding: 10px;
    }

    .glass-card {
        padding: 20px;
    }

}

/* Glass Cards */
.glass-card {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 35px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;

    /* Layout for stretching */
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.glass-card h2 {
    margin-top: 0;
}

/* Push elements to bottom in Right Card */
.glass-card .spacer {
    flex-grow: 1;
}

/* Promo Badge - Yellow/Black High Contrast */
.promo-badge {
    display: block;
    background: #FFD700;
    /* Gold/Yellow */
    color: #000000;
    /* Black Text */
    padding: 18px 25px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 800;
    text-decoration: none;
    margin-top: 20px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    border: 2px solid #e6c200;
    letter-spacing: 0.5px;
    transition: transform 0.2s;
}

.promo-badge:hover {
    transform: translateY(-2px);
    background: #ffdb1a;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
}

h2 {
    color: var(--primary-color);
    border-bottom: 2px solid #f5f5f5;
    padding-bottom: 15px;
    margin-top: 0;
    font-size: 1.4rem;
}

/* Input Styles - Premium Focus */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

select,
input[type="number"],
input[type="text"] {
    width: 100%;
    padding: 14px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fcfcfc;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
    /* Fix width issues */
}

select:focus,
input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(188, 30, 46, 0.08);
    /* Brand Red Glow */
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.5);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary-color);
    background: rgba(188, 30, 46, 0.05);
}

.preview-container {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

#previewImg {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Reset Button - Prominent */
.reset-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff4444;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
    z-index: 10;
}

.reset-btn:hover {
    transform: scale(1.1);
    background: #cc0000;
}

/* Results Panel Styling */
.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.result-item:last-child {
    border-bottom: none;
}

.result-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: #333;
}

.highlight-value {
    color: var(--primary-color);
    font-size: 1.4rem;
}

.highlight-box {
    background: rgba(188, 30, 46, 0.08);
    /* Light Red Tint */
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    border: 1px solid rgba(188, 30, 46, 0.2);
}

/* Pricing Typography */
.market-strike {
    text-decoration: line-through;
    color: #999;
    font-size: 1.2rem;
    /* Large */
    font-weight: 700;
}

.our-price {
    color: var(--primary-color);
    font-size: 1.6rem;
    font-weight: 800;
}

.savings-tag {
    color: #27ae60;
    font-size: 0.85rem;
    font-weight: bold;
    background: #eafaf1;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 2px;
}

/* Logic Box */
.logic-box {
    background: rgba(188, 30, 46, 0.05);
    border: 1px solid rgba(188, 30, 46, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
}

.logic-box h3 {
    font-size: 1rem;
    margin-top: 0;
    color: var(--primary-color);
}

.logic-box ul {
    margin: 0;
    padding-left: 20px;
    font-size: 0.9rem;
    color: #555;
}

/* CTA Button */
.cta-btn {
    background: var(--primary-color);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    width: 100%;
    margin-top: 30px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(188, 30, 46, 0.3);
}

.cta-btn:hover {
    background: #a01926;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(188, 30, 46, 0.4);
}

/* Small Link inside Recommended Box */
.small-cta-link {
    font-size: 0.75rem;
    color: #fff;
    background: #BC1E2E;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 4px;
    display: inline-block;
    transition: opacity 0.2s;
}

.small-cta-link:hover {
    opacity: 0.9;
}

/* Promo Badge - High Contrast */
.promo-badge {
    display: block;
    /* Full width block */
    background: #000000;
    /* Black for max contrast */
    color: #ffffff;
    padding: 15px 20px;
    border-radius: 50px;
    /* Pill shape */
    font-size: 1.1rem;
    /* Larger text */
    font-weight: 800;
    text-decoration: none;
    margin-top: 20px;
    text-align: center;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid #000;
    letter-spacing: 0.5px;
}

.promo-badge:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: #222;
    /* Slightly lighter on hover */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.unit-toggle {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.dimension-inputs {
    display: flex;
    gap: 10px;
}

/* Vision AI Badge */
.ai-badge {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
    animation: glow 3s infinite;
    display: inline-block;
    vertical-align: middle;
    letter-spacing: 0.5px;
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(168, 85, 247, 0.4);
    }

    50% {
        box-shadow: 0 0 20px rgba(168, 85, 247, 0.7);
    }

    100% {
        box-shadow: 0 0 5px rgba(168, 85, 247, 0.4);
    }
}

/* Photo Warning Banner */
.photo-warning {
    display: none;
    /* Hidden by default */
    background: #FF9800;
    color: white;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
    animation: fadeIn 0.5s ease;
    border: 1px solid #f57c00;
}

.photo-warning.visible {
    display: block;
}

.debug-toggle {
    background: #333;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 5px;
}