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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8ff 100%);
    color: #333;
    line-height: 1.6;
    padding-bottom: 80px;
    padding-top: 80px;
    min-height: 100vh;
}

/* Responsive header adjustments */
@media (max-width: 480px) {
    body {
        padding-top: 70px;
    }

    .app-header {
        padding: 0.75rem;
    }

    .header-content {
        flex-direction: column;
        gap: 0.75rem;
    }

    .app-logo {
        width: 90px;
        height: 90px;
    }

    .app-header h1 {
        font-size: 1.2rem;
    }

    .app-subtitle {
        font-size: 0.8rem;
    }
}

/* Art Nouveau Digital Design Elements */
.app-header {
    background: linear-gradient(135deg, #4CAF50 0%, #2196F3 100%);
    color: white;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    overflow: hidden;
}

.app-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}
.black-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 30px;
background-color: #000000;
z-index: 1001;
}
.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.title-container {
    text-align: center;
}

.app-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: white;
}

.app-subtitle {
    font-size: 0.9rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

/* Main Content */
.app-main {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Content Sections */
.content-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

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

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

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.welcome-card h2 {
    color: #4CAF50;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.welcome-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

/* Quick Stats */
.quick-stats {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #2196F3;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

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

.action-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.action-card:hover::before {
    left: 100%;
}

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

.action-card[data-category="transport"] {
    border-color: #2196F3;
}

.action-card[data-category="energy"] {
    border-color: #FFC107;
}

.action-card[data-category="waste"] {
    border-color: #4CAF50;
}

.action-card[data-category="water"] {
    border-color: #00BCD4;
}

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

.action-card h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.action-card p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.action-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.action-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.action-btn:active {
    transform: scale(0.95);
}

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

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.section-title-row > div:first-child {
    flex: 1;
    text-align: left;
}

.section-header h2 {
    color: #4CAF50;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: #666;
    font-size: 1rem;
}

/* Tracking Section */
.tracking-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.impact-summary {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.impact-summary h3 {
    color: #4CAF50;
    margin-bottom: 1rem;
    text-align: center;
}

.impact-metrics {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2196F3;
}

.metric-label {
    font-size: 0.8rem;
    color: #666;
}

/* Chart Container */
.chart-container {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    text-align: center;
}

#impactChart {
    max-width: 100%;
    height: auto;
}

/* Recent Actions */
.recent-actions {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.recent-actions h3 {
    color: #4CAF50;
    margin-bottom: 1rem;
}

.actions-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.action-item h4 {
    color: #333;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.action-item p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.action-item .action-impact {
    color: #4CAF50;
    font-weight: bold;
    font-size: 0.9rem;
}

.no-actions {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 2rem;
}

/* Goals Section */
.goals-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.goal-form {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.goal-form h3 {
    color: #4CAF50;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #4CAF50;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

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

.btn-secondary {
    background: #f5f5f5;
    color: #666;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.reset-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

.reset-btn i {
    font-size: 0.7rem;
}

.goals-list {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.goals-list h3 {
    color: #4CAF50;
    margin-bottom: 1rem;
}

.goals-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.goal-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    border-left: 4px solid #4CAF50;
}

.goal-card h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.goal-progress {
    margin: 0.5rem 0;
}

.progress-bar {
    background: #e0e0e0;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #4CAF50, #45a049);
    height: 100%;
    transition: width 0.3s ease;
}

.goal-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

.no-goals {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 2rem;
}

/* Products Section */
.products-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search-bar {
    display: flex;
    gap: 0.5rem;
    background: white;
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.search-bar input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
}

.search-bar input:focus {
    outline: none;
    border-color: #4CAF50;
}

.search-btn {
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #45a049;
}

.product-categories {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.category-btn {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.category-btn.active,
.category-btn:hover {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

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

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

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

.product-card h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.product-card p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}



.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

/* Community Section */
.community-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

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

.challenges-section h3 {
    color: #4CAF50;
    margin-bottom: 1rem;
}

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

.challenge-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    border-left: 4px solid #4CAF50;
}

.challenge-card h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.challenge-card p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.challenge-progress {
    margin-bottom: 1rem;
}

.progress-text {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
    display: block;
}

.join-challenge-btn {
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.join-challenge-btn:hover {
    background: #1976D2;
}

.join-challenge-btn.joined {
    background: #4CAF50;
}

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

.community-feed h3 {
    color: #4CAF50;
    margin-bottom: 1rem;
}

.feed-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feed-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.feed-avatar {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
}

.feed-content h4 {
    color: #333;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.feed-content p {
    color: #666;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.feed-time {
    color: #999;
    font-size: 0.8rem;
}

/* FAQ Section */
.faq-section {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.faq-section h2 {
    color: #4CAF50;
    text-align: center;
    margin-bottom: 1.5rem;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: #f8f9fa;
    border: none;
    padding: 1rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-question[aria-expanded="true"] {
    background: #4CAF50;
    color: white;
}

.faq-icon {
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 1rem;
    background: white;
    border-top: 1px solid #e0e0e0;
    animation: slideDown 0.3s ease;
}

.faq-answer[hidden] {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding: 0 1rem;
    }
    to {
        opacity: 1;
        max-height: 200px;
        padding: 1rem;
    }
}

.faq-answer p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    border-top: 1px solid #e0e0e0;
    z-index: 1000;
    margin-bottom: 80px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    transition: color 0.3s ease;
    padding: 0.5rem;
    border-radius: 10px;
    min-width: 60px;
    flex: 1;
}

.nav-item:hover,
.nav-item.active {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    color: #666;
    font-size: 0.8rem;
    background: white;
    margin-top: 2rem;
    border-top: 1px solid #e0e0e0;
    margin-bottom: 60px;
}

/* Responsive Design */
@media (max-width: 480px) {
    .app-header {
        padding: 0.75rem 1rem;
    }

    .app-header h1 {
        font-size: 1.2rem;
    }

    .app-main {
        padding: 0.5rem;
    }

    .section-title-row {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .section-title-row > div:first-child {
        text-align: center;
    }

    .reset-btn {
        align-self: center;
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }

    .welcome-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    .welcome-card h2 {
        font-size: 1.2rem;
    }

    .action-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .action-card {
        padding: 1rem;
    }

    .action-card h3 {
        font-size: 1.1rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .bottom-nav {
        padding: 0.25rem 0;
    }

    .nav-item {
        min-width: 50px;
        padding: 0.25rem;
    }

    .nav-item i {
        font-size: 1rem;
    }

    .nav-item span {
        font-size: 0.65rem;
    }
}

@media (min-width: 481px) and (max-width: 767px) {
    .action-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .app-main {
        padding: 0.75rem;
    }

    .welcome-card {
        padding: 2rem 1.5rem;
    }
}

@media (min-width: 768px) {
    .app-main {
        padding: 2rem;
    }

    .header-content {
        gap: 1.5rem;
    }

    .app-logo {
        width: 90px;
        height: 90px;
    }

    .app-header h1 {
        font-size: 1.8rem;
    }

    .action-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .goals-container {
        grid-template-columns: 1fr 1fr;
    }

    .tracking-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 2rem;
    }

    .impact-summary {
        grid-column: 1 / -1;
    }

    .community-container {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 2rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .welcome-card h2 {
        font-size: 1.8rem;
    }

    .section-header h2 {
        font-size: 2.2rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .challenges-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .action-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .action-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .challenges-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .app-header h1 {
        font-size: 2rem;
    }

    .welcome-card {
        padding: 3rem 2rem;
    }

    .section-header {
        margin-bottom: 3rem;
    }
}

/* Extra large screens */
@media (min-width: 1200px) {
    .app-main {
        padding: 3rem;
    }

    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .challenges-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .welcome-card h2 {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 2.5rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .action-card,
    .welcome-card,
    .impact-summary,
    .chart-container,
    .recent-actions,
    .goal-form,
    .goals-list,
    .search-bar,
    .challenges-section,
    .community-feed,
    .faq-section {
        border: 2px solid #333;
    }
}

/* Focus styles for accessibility */
button:focus,
input:focus,
.nav-item:focus,
.faq-question:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}
