/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, #2c5530, #4a7c59);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 4rem;
    color: #90c695;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 25px;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255,255,255,0.2);
    color: #90c695;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f8fffe, #e8f5e8);
    padding: 120px 0 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

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

.hero-text h2 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #2c5530;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

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

.cta-button {
    background: linear-gradient(135deg, #4a7c59, #2c5530);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(76, 124, 89, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(76, 124, 89, 0.4);
}

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

.floating-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e8f5e8;
    cursor: pointer;
}

.floating-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.floating-card i {
    font-size: 2.5rem;
    color: #4a7c59;
    margin-bottom: 1rem;
}

.floating-card h3 {
    color: #2c5530;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.floating-card p {
    color: #666;
    font-size: 0.9rem;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: #2c5530;
    margin-bottom: 1rem;
    font-weight: 600;
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Demo Notice */
.demo-notice {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: 2px solid #2196f3;
    border-radius: 15px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.demo-notice p {
    color: #1565c0;
    margin: 0;
    font-weight: 500;
}

.demo-notice i {
    color: #1976d2;
    margin-right: 8px;
}

.demo-notice a {
    color: #0d47a1;
    text-decoration: underline;
    font-weight: 600;
}

.demo-notice a:hover {
    color: #1565c0;
}

/* Classifier Section */
.classifier-section {
    padding: 80px 0;
    background: #f8fffe;
}

.classifier-container {
    max-width: 800px;
    margin: 0 auto;
}

.upload-area {
    border: 3px dashed #90c695;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #4a7c59;
    background: #f0f8f0;
}

.upload-area.dragover {
    border-color: #2c5530;
    background: #e8f5e8;
    transform: scale(1.02);
}

.upload-content i {
    font-size: 4rem;
    color: #90c695;
    margin-bottom: 1rem;
}

.upload-content h3 {
    color: #2c5530;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.upload-content p {
    color: #666;
    margin-bottom: 2rem;
}

.upload-btn {
    background: linear-gradient(135deg, #4a7c59, #2c5530);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(76, 124, 89, 0.3);
}

/* Image Preview Container */
.image-preview-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    margin-top: 2rem;
    border: 2px solid #e8f5e8;
}

.preview-image {
    text-align: center;
    margin-bottom: 2rem;
}

.preview-image img {
    max-width: 400px;
    max-height: 400px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    object-fit: cover;
}

.image-info {
    margin-top: 1rem;
    color: #666;
}

.image-info p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.preview-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.process-btn {
    background: linear-gradient(135deg, #4a7c59, #2c5530);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    box-shadow: 0 4px 20px rgba(76, 124, 89, 0.3);
}

.process-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(76, 124, 89, 0.4);
    background: linear-gradient(135deg, #5a8c69, #3c6540);
}

.process-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cancel-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.3);
}

.cancel-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(231, 76, 60, 0.4);
    background: linear-gradient(135deg, #f75c4c, #d0493b);
}

/* Prediction Results */
.prediction-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.uploaded-image {
    text-align: center;
    margin-bottom: 2rem;
}

.uploaded-image img {
    max-width: 300px;
    max-height: 300px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.main-prediction h3 {
    font-size: 2rem;
    color: #2c5530;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 600;
}

.confidence-bar {
    background: #e8f5e8;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    margin-bottom: 2rem;
}

.confidence-fill {
    background: linear-gradient(135deg, #4a7c59, #2c5530);
    height: 100%;
    border-radius: 6px;
    transition: width 0.8s ease;
}

.confidence-text {
    position: absolute;
    right: 10px;
    top: -25px;
    font-weight: 600;
    color: #2c5530;
}

.medicinal-uses,
.top-predictions {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8fffe;
    border-radius: 15px;
    border-left: 4px solid #4a7c59;
}

.medicinal-uses h4,
.top-predictions h4 {
    color: #2c5530;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.medicinal-uses ul {
    list-style: none;
}

.medicinal-uses li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e8f5e8;
    position: relative;
    padding-left: 2rem;
}

.medicinal-uses li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4a7c59;
    font-weight: bold;
}

.medicinal-uses li:last-child {
    border-bottom: none;
}

.alternative-prediction {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    margin: 0.5rem 0;
    background: white;
    border-radius: 10px;
    border: 1px solid #e8f5e8;
}

.alternative-prediction .plant-name {
    font-weight: 600;
    color: #2c5530;
}

.alternative-prediction .confidence {
    background: #90c695;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

.try-again-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    display: block;
    margin: 2rem auto 0;
    transition: all 0.3s ease;
}

.try-again-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e8f5e8;
    border-top: 4px solid #4a7c59;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Plants Section */
.plants-section {
    padding: 80px 0;
    background: white;
}

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

.plant-card {
    background: linear-gradient(135deg, #f8fffe, #e8f5e8);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid #4a7c59;
    position: relative;
}

.plant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    border-color: #2c5530;
}

.plant-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.plant-card h3 {
    color: #2c5530;
    margin-bottom: 1rem;
    font-weight: 600;
}

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

/* Featured Plant Badges (keeping the red badges for featured plants) */
.featured-plant .featured-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

/* About Section */
.about-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fffe, #e8f5e8);
}

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

.about-text h2 {
    font-size: 2.5rem;
    color: #2c5530;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

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

.features {
    display: grid;
    gap: 1.5rem;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.feature i {
    font-size: 1.5rem;
    color: #4a7c59;
    margin-top: 0.5rem;
}

.feature h4 {
    color: #2c5530;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.feature p {
    color: #666;
    margin: 0;
}

.about-stats {
    display: grid;
    gap: 2rem;
}

.stat {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #4a7c59;
}

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

/* Footer */
.footer {
    background: #2c5530;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #90c695;
}

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

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

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

.footer-section a:hover {
    color: #90c695;
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover {
    color: #2c5530;
}

.modal-content h2 {
    color: #2c5530;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.modal-uses h3 {
    color: #4a7c59;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-uses ul {
    list-style: none;
}

.modal-uses li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #e8f5e8;
    position: relative;
    padding-left: 2rem;
}

.modal-uses li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4a7c59;
    font-weight: bold;
}

.modal-uses li:last-child {
    border-bottom: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text h2 {
        font-size: 2.5rem;
    }
    
    .nav {
        display: none;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .plants-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .prediction-container {
        padding: 1rem;
    }
    
    .uploaded-image img {
        max-width: 250px;
        max-height: 250px;
    }
    
    .preview-image img {
        max-width: 300px;
        max-height: 300px;
    }
    
    .preview-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .process-btn,
    .cancel-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-text h2 {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .modal-content {
        margin: 20% auto;
        padding: 1.5rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Animation for elements appearing */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.plant-card,
.floating-card,
.feature {
    animation: fadeInUp 0.6s ease forwards;
}

/* Feature Modal Styles */
.feature-description {
    background: #f8fffe;
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 4px solid #4a7c59;
    margin-top: 1rem;
}

.feature-description p {
    color: #333;
    line-height: 1.8;
    font-size: 1.1rem;
    margin: 0;
}

#featureModal .modal-content {
    max-width: 700px;
}

#featureModal h2 {
    color: #2c5530;
    font-size: 2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-feature {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close-feature:hover {
    color: #2c5530;
}
