:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #f1f5f9;
    --bg-color: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --amazon-color: #ff9900;
    --flipkart-color: #2874f0;
    --success-color: #16a34a;
    --card-bg: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --font-family: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, hsla(253,16%,7%,0) 0, hsla(253,16%,7%,0) 50%), 
        radial-gradient(at 50% 0%, hsla(225,39%,30%,0.1) 0, hsla(225,39%,30%,0) 50%), 
        radial-gradient(at 100% 0%, hsla(339,49%,30%,0.1) 0, hsla(339,49%,30%,0) 50%);
    color: var(--text-main);
    min-height: 100vh;
    padding: 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeIn 0.8s ease-out;
}

.app-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.05em;
}

.highlight {
    color: var(--primary-color);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Search Bar */
.search-container {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

#search-form {
    display: flex;
    gap: 1rem;
    background: white;
    padding: 0.5rem;
    border-radius: 99px; /* Pill shape */
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

#search-input {
    width: 100%;
    border: none;
    outline: none;
    padding: 1rem 1rem 1rem 3.5rem;
    font-size: 1.1rem;
    border-radius: 99px;
    background: transparent;
}

.search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 2rem;
    border-radius: 99px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.disclaimer {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 1rem;
    font-style: italic;
}

/* Results Grid */
.results-grid {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 2rem;
}

.product-card {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: center;
    transition: transform 0.3s ease;
    border: 1px solid rgba(0,0,0,0.03);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 12px;
}

.product-image {
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
}

.product-details {
    width: 100%;
}

.product-name {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.product-rating {
    color: #f59e0b; /* Amber */
    font-weight: 600;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comparison-table {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
}

.platform-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.platform-card.best-deal {
    border-color: var(--success-color);
    background: #f0fdf4;
}

.best-deal-badge {
    position: absolute;
    top: 10px;
    right: -30px;
    background: var(--success-color);
    color: white;
    padding: 5px 30px;
    transform: rotate(45deg);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.platform-logo {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.amazon-logo { color: var(--text-main); } /* Simplification */
.flipkart-logo { color: var(--flipkart-color); }

.price-tag {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0.5rem 0 1.5rem;
    color: var(--text-main);
}

.best-deal .price-tag {
    color: var(--success-color);
}

.buy-btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    width: 100%;
    transition: background 0.2s;
}

.amazon-btn {
    background-color: #ffd814; /* Amazon yellow */
    color: #111;
    border: 1px solid #fcd200;
}
.amazon-btn:hover { background-color: #f7ca00; }

.flipkart-btn {
    background-color: #2874f0;
    color: white;
    border: 1px solid #fcd200;
}
.flipkart-btn:hover { background-color: #1c5ec9; }

/* --- REVIEWS SECTION --- */
.reviews-section {
    margin-top: 2rem;
}

.reviews-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.platform-reviews {
    background: #fff;
    padding: 1rem;
    border-radius: 12px;
}

.review-header {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.review-card {
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
}

.review-card:last-child { border-bottom: none; }

.review-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.review-rating {
    color: #f59e0b;
    font-weight: 600;
}

.review-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    display: block;
}

.review-text {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-main);
}

/* Utilities */
.hidden { display: none !important; }

/* Spinner */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: var(--primary-color);
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

#loading-spinner {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}
.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Responsive */
@media (max-width: 768px) {
    .product-card {
        grid-template-columns: 1fr;
    }
    
    .comparison-table {
        grid-template-columns: 1fr;
    }

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

    .app-title { font-size: 2rem; }
    
    #search-form {
        flex-direction: column;
        border-radius: 20px;
        padding: 1rem;
    }
    
    #search-input { padding: 0.5rem 0.5rem 0.5rem 2.5rem; }
    
    .search-btn { width: 100%; padding: 0.8rem; margin-top: 0.5rem; }
}
