/* Demo Page Styles */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.demo-page {
    padding-bottom: 50px;
}

/* Hero Section */
.demo-hero {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.demo-hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.demo-hero .lead {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

.hero-categories {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.category-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.category-badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.demo-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.feature-icon {
    font-size: 2.5rem;
}

.feature-text {
    font-size: 1rem;
    font-weight: 600;
}

/* Search Section */
.demo-search {
    padding: 50px 20px;
    background: #f8f9fa;
}

.search-card {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.search-card h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.search-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-top: -20px;
    margin-bottom: 30px;
    text-align: center;
}

/* Tabs */
.search-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-btn:hover {
    color: #667eea;
}

.tab-icon {
    font-size: 1.2rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Input Group */
.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.form-control {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

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

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-loader .spinner {
    width: 20px;
    height: 20px;
    animation: rotate 1s linear infinite;
}

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

.help-text {
    color: #999;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 10px;
}

.help-text a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
}

.help-text a:hover {
    text-decoration: underline;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #e0e0e0;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.upload-subtext {
    color: #999;
    margin-bottom: 15px;
}

.upload-formats {
    font-size: 0.85rem;
    color: #999;
}

.upload-tip {
    font-style: italic;
}

.upload-preview {
    text-align: center;
    padding: 20px;
}

.upload-preview img {
    max-width: 300px;
    max-height: 300px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.upload-preview .btn {
    margin: 5px;
}

.upload-preview .btn-success,
.upload-preview .btn-secondary {
    min-width: 150px;
}

/* Category Filter */
.category-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
    justify-content: center;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* Examples Grid */
.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.no-examples {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    color: #666;
}

.no-examples a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
}

.no-examples a:hover {
    text-decoration: underline;
}

.example-item {
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-align: center;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.example-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.example-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    background: #f0f0f0;
}

.example-item span {
    display: block;
    padding: 10px;
    background: white;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

/* Results Section */
.demo-results {
    padding: 50px 20px;
    background: white;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.results-header h2 {
    font-size: 2rem;
    color: #333;
}

.btn-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    padding: 0 10px;
}

.btn-close:hover {
    color: #333;
}

.search-info {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

.search-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
}

.search-stats {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.stat {
    font-size: 1rem;
    color: #666;
}

.stat strong {
    color: #667eea;
    font-size: 1.2rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.result-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.result-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.result-info {
    padding: 15px;
}

.result-name {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.result-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
}

.result-score {
    font-size: 0.85rem;
    color: #43e97b;
    font-weight: 600;
}

/* How It Works */
.demo-how-it-works {
    padding: 80px 20px;
    background: white;
}

.demo-how-it-works h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #333;
}

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

.step {
    text-align: center;
    position: relative;
}

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.step-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.step h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
}

.step p {
    color: #666;
    line-height: 1.6;
}

/* API Info */
.demo-api-info {
    padding: 80px 20px;
    background: #f8f9fa;
}

.demo-api-info h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #333;
}

.api-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.api-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.api-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
}

.api-card code {
    display: block;
    background: #f5f5f5;
    padding: 10px 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    color: #667eea;
    margin-bottom: 15px;
}

.api-card pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 0.85rem;
}

.api-card .btn-outline {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 25px;
    border: 2px solid #667eea;
    color: #667eea;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.api-card .btn-outline:hover {
    background: #667eea;
    color: white;
}

/* CTA Section */
.demo-cta {
    padding: 80px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.demo-cta h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.demo-cta p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-lg {
    padding: 18px 40px;
    font-size: 1.1rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline:hover {
    background: white;
    color: #667eea;
}

/* Responsive */
@media (max-width: 768px) {
    .demo-hero h1 {
        font-size: 2rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .search-tabs {
        flex-direction: column;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .api-cards {
        grid-template-columns: 1fr;
    }
}
