/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-item {
    color: #5f6368;
    cursor: pointer;
    font-weight: 400;
    transition: color 0.3s ease;
}

.nav-item:hover {
    color: #1a73e8;
}

.logo {
    font-size: 1.5rem;
    font-weight: 500;
    color: #34a853;
    letter-spacing: 1px;
}

.add-entry-btn {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.add-entry-btn:hover {
    background: #1557b0;
    transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: white;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 3rem 2rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #1557b0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: white;
    color: #333;
    transform: translateY(-2px);
}

/* Search Section */
.search-section {
    background: white;
    padding: 4rem 0;
    margin-top: 0;
}

.search-section .container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Integrated Map Section */
.map-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 15px;
    border: 1px solid #e0e0e0;
}

.map-section h3 {
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.map-controls-inline {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.map-count {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
}

.integrated-map {
    height: 400px;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #ddd;
    background: #f5f5f5;
}

/* Browser compatibility fixes */
.search-input-wrapper input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.category-btn {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Info Section */
.info-section {
    background: #f8f9fa;
    padding: 4rem 0;
}

.info-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.info-text h2 {
    font-size: 2.5rem;
    font-weight: 400;
    color: #333;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.info-text p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.btn-outline {
    background: transparent;
    color: #1a73e8;
    border: 2px solid #1a73e8;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: #1a73e8;
    color: white;
    transform: translateY(-2px);
}

.info-image {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    position: relative;
}

.stats-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-width: 250px;
}

.stat {
    margin-bottom: 1.5rem;
}

.stat:last-child {
    margin-bottom: 0;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a73e8;
    margin-bottom: 0.5rem;
}

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

.search-container {
    margin-bottom: 1.5rem;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.search-input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1.1rem;
}

#searchInput {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Toggle Switch */
.toggle-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.toggle-container input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 24px;
    background: #ccc;
    border-radius: 12px;
    transition: background 0.3s ease;
    margin-right: 10px;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
}

.toggle-container input:checked + .toggle-slider {
    background: #4CAF50;
}

.toggle-container input:checked + .toggle-slider::before {
    transform: translateX(26px);
}

.toggle-text {
    font-weight: 500;
    color: #555;
}

/* Category Filters */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 1rem;
}

.category-btn {
    padding: 12px 24px;
    border: 2px solid #e0e0e0;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* Category button background images */
.category-btn[data-category="electronics"] {
    background-image: url('https://images.unsplash.com/photo-1518717758536-85ae29035b6d?w=300&h=200&fit=crop');
}

.category-btn[data-category="plastics"] {
    background-image: url('https://images.unsplash.com/photo-1572012335275-6d7b3c0e5c8e?w=300&h=200&fit=crop');
}

.category-btn[data-category="textiles"] {
    background-image: url('https://images.unsplash.com/photo-1445205170230-053b83016050?w=300&h=200&fit=crop');
}

.category-btn[data-category="furniture"] {
    background-image: url('https://images.unsplash.com/photo-1586023492125-27b2c045efd7?w=300&h=200&fit=crop');
}

.category-btn[data-category="household"] {
    background-image: url('https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=300&h=200&fit=crop');
}

.category-btn[data-category="paper"] {
    background-image: url('https://images.unsplash.com/photo-1544947950-fa07a98d237f?w=300&h=200&fit=crop');
}

.category-btn[data-category="glass"] {
    background-image: url('https://images.unsplash.com/photo-1553062407-98eeb64c6a62?w=300&h=200&fit=crop');
}

.category-btn[data-category="metal"] {
    background-image: url('https://images.unsplash.com/photo-1504307651254-35680f356dfd?w=300&h=200&fit=crop');
}

.category-btn[data-category="mixed"] {
    background-image: url('https://images.unsplash.com/photo-1532996122724-e3c354a0b15b?w=300&h=200&fit=crop');
}

.category-btn:hover {
    border-color: #4CAF50;
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    transform: translateY(-2px);
}

.category-btn.active {
    background: #4CAF50 !important;
    border-color: #4CAF50;
    color: white;
    text-shadow: none;
}

/* Loading and Status */
.loading, .location-status {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.loading i {
    font-size: 2rem;
    color: #4CAF50;
    margin-bottom: 1rem;
}

.location-status {
    background: #e8f5e8;
    border: 1px solid #4CAF50;
}

.hidden {
    display: none;
}

/* Results */
.results-container {
    min-height: 300px;
}

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

.result-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 5px solid #4CAF50;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.result-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.result-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.result-category {
    background: #f0f0f0;
    color: #666;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.plugin-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.plugin-result {
    border-left: 4px solid #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.result-status {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-badge.recyclable {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-badge.not-recyclable {
    background: #ffebee;
    color: #c62828;
}

.status-badge.donatable {
    background: #e3f2fd;
    color: #1565c0;
}

.result-company {
    margin-bottom: 1rem;
}

.company-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.company-website {
    color: #4CAF50;
    text-decoration: none;
    font-size: 0.9rem;
}

.company-website:hover {
    text-decoration: underline;
}

.result-location {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.location-link {
    color: #1976d2;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.location-link:hover {
    text-decoration: underline;
}

.distance {
    background: #fff3e0;
    color: #f57c00;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
}

.instructions-toggle {
    background: none;
    border: none;
    color: #4CAF50;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 0.5rem;
}

.instructions-content {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #4CAF50;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.no-results i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.no-results h3 {
    color: #666;
    margin-bottom: 0.5rem;
}

.no-results p {
    color: #999;
    margin-bottom: 1rem;
}

.suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 1rem;
}

.suggestion-btn {
    padding: 6px 12px;
    background: #f0f0f0;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    color: #666;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.suggestion-btn:hover {
    background: #4CAF50;
    color: white;
}

/* Footer */
.footer {
    background: #2d3748;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #34a853;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.footer-section h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.footer-section p {
    color: #a0aec0;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #34a853;
}

.footer-bottom {
    border-top: 1px solid #4a5568;
    padding-top: 1rem;
    text-align: center;
}

.footer-bottom p {
    color: #a0aec0;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-left, .nav-right {
        gap: 1rem;
    }
    
    .nav-item {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .info-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .info-text h2 {
        font-size: 2rem;
    }
    
    .search-section .container {
        padding: 1.5rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .category-filters {
        justify-content: center;
    }
    
    .result-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .result-category {
        margin-top: 0.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .search-section .container {
        padding: 1rem;
    }
    
    .result-card {
        padding: 1rem;
    }
    
    .info-text h2 {
        font-size: 1.8rem;
    }
}
