* {
    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;
    color: #333;
}

/* Page Management */
.page {
    display: none;
    min-height: 100vh;
}

.page.active {
    display: block;
}

/* Home Page Styles */
.home-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.logo i {
    font-size: 3rem;
    color: #4CAF50;
}

.logo h1 {
    font-size: 3rem;
    color: white;
    font-weight: 700;
}

.welcome-message {
    margin-bottom: 3rem;
    color: white;
}

.welcome-message h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.welcome-message p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 500px;
}

.start-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* Dashboard Styles */
.app-header {
    background: white;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.header-content h1 {
    color: #4CAF50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.datetime {
    color: #666;
    font-size: 0.9rem;
}

.dashboard-main {
    padding: 2rem 1rem 6rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Widget Grid */
.widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.widget-card:hover {
    transform: translateY(-5px);
}

.highlight-card {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.widget-header i {
    font-size: 1.5rem;
    color: #4CAF50;
}

.highlight-card .widget-header i {
    color: white;
}

.widget-header h3 {
    font-size: 1.2rem;
}

/* Weather Widget */
.weather-info {
    text-align: center;
}

.temp {
    font-size: 2.5rem;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 0.5rem;
}

.weather-desc {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #666;
}

.weather-details {
    display: flex;
    justify-content: space-around;
    font-size: 0.9rem;
    color: #888;
}

/* Soil Widget */
.soil-metrics {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.value {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.value.good {
    background: #e8f5e8;
    color: #4CAF50;
}

.value.moderate {
    background: #fff3cd;
    color: #856404;
}

/* AI Recommendations Widget */
.recommendation-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recommendation-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255,255,255,0.1);
    padding: 1rem;
    border-radius: 10px;
}

.recommendation-item i {
    font-size: 1.5rem;
    color: white;
}

.recommendation-item div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.recommendation-item strong {
    font-size: 1.1rem;
}

.recommendation-item span {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-btn {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 1.5rem;
    border-radius: 15px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-align: center;
}

.action-btn:hover {
    border-color: #4CAF50;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
}

.action-btn.primary {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border-color: #4CAF50;
}

.action-btn i {
    font-size: 2rem;
    color: #4CAF50;
}

.action-btn.primary i {
    color: white;
}

.action-btn span {
    font-weight: 600;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.nav-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.5rem;
    cursor: pointer;
    color: #888;
    transition: color 0.3s ease;
    flex: 1;
}

.nav-btn.active {
    color: #4CAF50;
}

.nav-btn i {
    font-size: 1.2rem;
}

.nav-btn span {
    font-size: 0.8rem;
}

/* Community Page Styles */
.back-btn {
    background: none;
    border: none;
    color: #4CAF50;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.community-main {
    padding: 1rem 1rem 6rem;
    max-width: 1200px;
    margin: 0 auto;
}

.community-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.community-section {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.community-section h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: #4CAF50;
}

/* Market Prices */
.price-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.crop-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
}

.price.up {
    color: #4CAF50;
}

.price.down {
    color: #f44336;
}

/* Government Schemes */
.schemes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.scheme-item {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #4CAF50;
}

.scheme-item h4 {
    color: #4CAF50;
    margin-bottom: 0.5rem;
}

.scheme-item p {
    color: #666;
    margin-bottom: 1rem;
}

.scheme-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Chat Styles */
.chat-container {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.chat-messages {
    height: 200px;
    overflow-y: auto;
    padding: 1rem;
    background: #f8f9fa;
}

.message {
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: white;
    border-radius: 5px;
    font-size: 0.9rem;
}

.chat-input {
    display: flex;
    padding: 1rem;
    background: white;
}

.chat-input input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    margin-right: 0.5rem;
}

.chat-input button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
}

/* Recommendations Page */
.recommendations-main {
    padding: 1rem 1rem 6rem;
    max-width: 1200px;
    margin: 0 auto;
}

.recommendations-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.recommendation-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.recommendation-card.featured {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.crop-image {
    width: 80px;
    height: 80px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crop-image i {
    font-size: 2rem;
    color: #4CAF50;
}

.featured .crop-image {
    background: rgba(255,255,255,0.2);
}

.featured .crop-image i {
    color: white;
}

.crop-details {
    flex: 1;
}

.crop-details h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.match-score {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 1rem;
}

.featured .match-score {
    background: rgba(255,255,255,0.2);
    color: white;
}

.crop-details p {
    margin-bottom: 1rem;
    opacity: 0.8;
}

.crop-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    opacity: 0.8;
}

.crop-stats span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Voice Assistant */
.voice-assistant {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    transition: transform 0.3s ease;
    z-index: 1001;
}

.voice-assistant:hover {
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .widget-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .recommendation-card {
        flex-direction: column;
        text-align: center;
    }
    
    .crop-stats {
        justify-content: center;
    }
    
    .header-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .welcome-message h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .dashboard-main,
    .community-main,
    .recommendations-main {
        padding: 1rem 0.5rem 6rem;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .widget-card {
        p   adding: 1rem;
    }
    
    .price-item {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}
