:root {
    --primary: #2E7D32;
    --primary-light: #4CAF50;
    --primary-dark: #1B5E20;
    --accent: #8BC34A;
    --light-green: #E8F5E9;
    --light-green-hover: #D7EAD8;
    --medium-green: #C8E6C9;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-600: #6c757d;
    --gray-800: #343a40;
    --error: #d32f2f;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: #f5f7f5;
    min-height: 100vh;
}

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

/* Header & Navigation */
header {
    margin-bottom: 30px;
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 10px 20px;
    box-shadow: var(--shadow);
}

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

.nav-item {
    margin: 0 15px;
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-item:hover, .nav-item.active {
    color: var(--primary);
}

.logo img {
    height: 40px;
}

.back-link {
    color: var(--gray-600);
    margin-right: 15px;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary);
}

.user-profile img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    margin-left: 15px;
    border: 2px solid var(--primary-light);
}

/* Common Elements */
.page-title {
    text-align: center;
    margin-bottom: 40px;
}

.page-title h1 {
    color: var(--primary-dark);
    font-size: 2rem;
    margin-bottom: 10px;
}

.page-title p {
    color: var(--gray-600);
    font-size: 1rem;
}

.screen {
    padding: 20px 0 60px;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
}

.hidden {
    display: none;
}

.action-button {
    margin-top: auto;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 20px 0;
}

button, .upload-button {
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.primary-btn {
    background-color: var(--primary);
    color: var(--white);
    padding: 12px 30px;
    font-size: 1rem;
}

.primary-btn:hover {
    background-color: var(--primary-dark);
}

.secondary-btn {
    background-color: var(--gray-200);
    color: var(--gray-800);
    padding: 12px 30px;
    font-size: 1rem;
}

.secondary-btn:hover {
    background-color: var(--gray-300);
}

button i, .upload-button i {
    margin-right: 8px;
}

/* Process Steps */
.process-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 50px 0;
    gap: 15px;
}

.process-step {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow);
    flex: 1;
    max-width: 280px;
    position: relative;
    transition: var(--transition);
}

.process-step:hover {
    transform: translateY(-5px);
}

.process-icon {
    background-color: var(--light-green);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.process-icon i {
    font-size: 30px;
    color: var(--primary);
}

.process-step h3 {
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.process-step p {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.step-number {
    background-color: var(--primary);
    color: var(--white);
    font-size: 0.8rem;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-block;
}

.process-arrow {
    color: var(--gray-300);
    font-size: 24px;
}

/* Crop Selection Grid */
.crops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.crop-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
    padding-bottom: 15px;
}

.crop-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.crop-image {
    height: 180px;
    overflow: hidden;
    background-color: var(--light-green);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.crop-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.crop-card:hover .crop-image img {
    transform: scale(1.05);
}

.other-crop {
    background-color: var(--medium-green);
}

.other-crop i {
    font-size: 40px;
    color: var(--primary);
}

.crop-card h3 {
    color: var(--primary-dark);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.identifier {
    font-size: 0.8rem;
    color: var(--gray-600);
}

/* Upload Image Screen */
.upload-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.upload-preview {
    flex: 1;
    min-width: 300px;
    height: 400px;
    background-color: var(--light-green);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.upload-placeholder {
    text-align: center;
    color: var(--primary);
    padding: 30px;
}

.upload-placeholder i {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.7;
}

.upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.upload-options {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.upload-button {
    background-color: var(--light-green);
    color: var(--primary-dark);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.upload-button:hover {
    background-color: var(--light-green-hover);
}

.upload-button i {
    font-size: 30px;
    background-color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-right: 0;
}

.upload-button h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.upload-button p {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin: 0;
}

.predict-button {
    background-color: var(--primary);
    color: var(--white);
    padding: 15px;
    font-size: 1.1rem;
    border-radius: var(--border-radius);
    margin-top: 15px;
}

.predict-button:hover:not(:disabled) {
    background-color: var(--primary-dark);
}

.predict-button:disabled {
    background-color: var(--gray-300);
    cursor: not-allowed;
}

.upload-tips {
    background-color: var(--light-green);
    border-radius: var(--border-radius);
    padding: 15px 20px;
    margin-top: 15px;
}

.upload-tips h4 {
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.upload-tips i {
    margin-right: 8px;
    color: var(--primary);
}

.upload-tips ul {
    margin-left: 25px;
    font-size: 0.9rem;
}

/* Results Screen */
.results-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.results-image-container {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.results-image-container img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-height: 400px;
    object-fit: contain;
    background-color: var(--light-green);
    padding: 10px;
}

.verification-section {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.verification-section h3 {
    color: var(--primary-dark);
    font-size: 1rem;
    margin-bottom: 15px;
}

.verification-images {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.verification-image {
    width: 32%;
    height: 80px;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid var(--primary-light);
}

.verification-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    box-shadow: none;
    padding: 0;
    border-radius: 6px;
}

.results-info-container {
    flex: 1;
    min-width: 300px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.results-header {
    background-color: var(--light-green);
    padding: 20px;
    border-bottom: 1px solid #D7EAD8;
}

.results-header h2 {
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.disease-type {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 15px;
    display: block;
}

.confidence-level {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.confidence-bar {
    width: 200px;
    height: 10px;
    background-color: var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
    margin-right: 10px;
}

.confidence-fill {
    height: 100%;
    background-color: var(--primary);
    border-radius: 10px;
}

.results-details {
    padding: 20px;
}

.result-section {
    margin-bottom: 25px;
}

.result-section h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    color: var(--primary-dark);
}

.result-section h3 i {
    margin-right: 8px;
    color: var(--primary);
}

.result-section p {
    font-size: 0.95rem;
    color: var(--gray-800);
    line-height: 1.5;
}

.results-actions {
    padding: 0 20px 20px;
    display: flex;
    justify-content: space-between;
}

/* Treatment Screen */
.treatment-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.treatment-image-container {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.treatment-image-container img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-height: 300px;
    object-fit: contain;
    background-color: var(--light-green);
    padding: 10px;
}

.feedback-section {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.feedback-section h3 {
    color: var(--primary-dark);
    font-size: 1rem;
    margin-bottom: 15px;
}

.rating-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 1.5rem;
    color: #FFB400;
}

.rating-star {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.rating-star:hover {
    transform: scale(1.2);
}

.feedback-text {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--gray-300);
    margin-bottom: 15px;
    font-family: 'Poppins', sans-serif;
    resize: none;
    height: 100px;
}

.submit-feedback {
    background-color: var(--primary-light);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.submit-feedback:hover {
    background-color: var(--primary);
}

.treatment-info-container {
    flex: 1;
    min-width: 300px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.treatment-header {
    background-color: var(--light-green);
    padding: 20px;
    border-bottom: 1px solid #D7EAD8;
}

.treatment-header h2 {
    color: var(--primary-dark);
}

.treatment-details {
    padding: 20px;
}

.treatment-section {
    margin-bottom: 25px;
}

.treatment-section h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    color: var(--primary-dark);
}

.treatment-section h3 i {
    margin-right: 8px;
    color: var(--primary);
}

.treatment-list {
    list-style-type: none;
}

.treatment-list li {
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
}

.treatment-list li:before {
    content: "•";
    color: var(--primary);
    font-size: 20px;
    position: absolute;
    left: 5px;
}

.treatment-step {
    display: block;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.product-recommendations {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.product-card {
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
    flex: 1;
    min-width: 220px;
}

.product-image {
    height: 120px;
    overflow: hidden;
    background-color: var(--light-green);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-details {
    padding: 12px;
}

.product-details h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--primary-dark);
}

.product-price {
    font-weight: 600;
    margin-bottom: 5px;
}

.product-description {
    font-size: 0.8rem;
    color: var(--gray-600);
}

.treatment-actions {
    padding: 0 20px 20px;
    display: flex;
    justify-content: space-between;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--white);
    max-width: 500px;
    width: 90%;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    background-color: var(--error);
    color: var(--white);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.modal-header h2 i {
    margin-right: 10px;
}

.close-modal {
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-body ul {
    margin: 15px 0;
    margin-left: 20px;
}

.modal-body li {
    margin-bottom: 5px;
}

.tips-image {
    width: 100%;
    border-radius: 8px;
    margin-top: 15px;
}

.modal-footer {
    padding: 10px 20px 20px;
    text-align: center;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .page-title h1 {
        font-size: 1.6rem;
    }
    
    .process-container {
        flex-direction: column;
    }
    
    .process-step {
        max-width: 100%;
    }
    
    .process-arrow {
        transform: rotate(90deg);
    }
    
    .results-actions, .treatment-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .results-actions button, .treatment-actions button {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .nav-container {
        flex-direction: column;
        padding: 15px;
    }
    
    .nav-left, .nav-right {
        width: 100%;
        justify-content: center;
        margin: 5px 0;
    }
    
    .logo {
        margin: 10px 0;
    }
    
    .verification-images {
        flex-wrap: wrap;
    }
    
    .verification-image {
        width: 48%;
    }
}