﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Kanit', sans-serif;
    background-color: #667eea;
    min-height: 100vh;
    color: #333;
    font-size: 14px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 10px;
}

.header {
    text-align: center;
    margin-bottom: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px 10px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

    .header h1 {
        color: #667eea;
        font-size: 1.8rem;
        margin-bottom: 8px;
    }

    .header p {
        color: #666;
        font-size: 0.9rem;
    }

/* NEW: Breadcrumb Styles */
.breadcrumb {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

    .breadcrumb a {
        color: #667eea;
        text-decoration: none;
        transition: color 0.3s ease;
    }

        .breadcrumb a:hover {
            color: #5a67d8;
            text-decoration: underline;
        }

    .breadcrumb span {
        margin: 0 5px;
    }

/* Location Section */
.location-section {
    margin-bottom: 20px;
}

.location-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

    .location-header h3 {
        color: #2c3e50;
        font-size: 1.1rem;
        margin: 0;
    }

.location-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Kanit', sans-serif;
}

    .location-btn:hover {
        background: linear-gradient(135deg, #5a67d8, #6b46c1);
        transform: translateY(-2px);
    }

    .location-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

.location-result {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
}

    .location-result p {
        margin: 0;
        color: #155724;
        font-size: 0.9rem;
    }

.province-selector {
    margin-bottom: 15px;
}

    .province-selector label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
        color: #2c3e50;
        font-size: 0.9rem;
    }

    .province-selector select {
        padding: 8px 12px;
        border: 2px solid #ddd;
        border-radius: 8px;
        font-size: 0.9rem;
        font-family: 'Kanit', sans-serif;
        width: 100%;
    }

        .province-selector select:focus {
            outline: none;
            border-color: #667eea;
        }

/* NEW: View Toggle Section */
.view-toggle-section {
    margin-bottom: 20px;
}

.view-toggle-header {
    margin-bottom: 15px;
}

    .view-toggle-header h3 {
        color: #2c3e50;
        font-size: 1.1rem;
        margin: 0;
        text-align: center;
    }

.view-toggle-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.view-btn {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #495057;
    border: 2px solid #dee2e6;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Kanit', sans-serif;
    flex: 1;
    min-width: 120px;
    max-width: 150px;
}

    .view-btn:hover {
        background: linear-gradient(135deg, #e9ecef, #dee2e6);
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    .view-btn.active {
        background: linear-gradient(135deg, #667eea, #764ba2);
        color: white;
        border-color: #667eea;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }

        .view-btn.active:hover {
            background: linear-gradient(135deg, #5a67d8, #6b46c1);
            transform: translateY(-1px);
        }

/* Main Content */
.main-content {
    display: block;
    margin-bottom: 20px;
}

.card {
    background-color: white;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.moon-section {
    text-align: center;
}

.date-picker {
    margin-bottom: 15px;
    text-align: center;
}

    .date-picker label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
        color: #2c3e50;
        font-size: 0.9rem;
    }

    .date-picker input {
        padding: 10px 15px;
        border: 2px solid #ddd;
        border-radius: 8px;
        font-size: 0.9rem;
        font-family: 'Kanit', sans-serif;
        width: 100%;
        max-width: 200px;
    }

        .date-picker input:focus {
            outline: none;
            border-color: #667eea;
        }

.moon-info {
    background-color: #667eea;
    color: white;
    padding: 15px;
    border-radius: 12px;
    margin: 15px 0;
}

    .moon-info h3 {
        margin-bottom: 12px;
        font-size: 1.1rem;
    }

    .moon-info p {
        margin-bottom: 6px;
        font-size: 0.9rem;
    }

.advice-section {
    background-color: #11998e;
    color: white;
    padding: 15px;
    border-radius: 12px;
    margin-top: 15px;
}

    .advice-section h3 {
        margin-bottom: 12px;
        font-size: 1.1rem;
    }

/* Product Recommendations */
.product-recommendations {
    margin-top: 10px;
}

/* NEW: Chart Section Styles */
.chart-section {
    margin-bottom: 25px;
    /* NEW: Show/Hide capability */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

    .chart-section.hidden {
        display: none;
    }

.chart-wrapper {
    position: relative;
    height: 300px;
    margin: 20px 0;
    background-color: #fafafa;
    border-radius: 10px;
    padding: 10px;
}

.moon-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.moon-day-info {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    border-left: 4px solid #667eea;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

    .moon-day-info:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    .moon-day-info.today {
        background: linear-gradient(135deg, #667eea, #764ba2);
        color: white;
        border-left-color: #ffd700;
        font-weight: 600;
    }

/* Weekly Activity Section */
.weekly-activity-section {
    margin-top: 25px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 15px;
    border: 1px solid #e9ecef;
}

.weekly-activity-content {
    margin-bottom: 20px;
}

.activity-item {
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #28a745;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

    .activity-item h5 {
        color: #2c3e50;
        font-size: 1rem;
        margin-bottom: 8px;
        font-weight: 600;
    }

    .activity-item p {
        color: #666;
        font-size: 0.9rem;
        margin: 0;
        line-height: 1.4;
    }

/* Weekly Products Section */
.weekly-products-section {
    margin-top: 25px;
}

.weekly-products-content {
    margin-bottom: 20px;
}

.product-item {
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #17a2b8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

    .product-item:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

    .product-header strong {
        color: #2c3e50;
        font-size: 1rem;
        font-weight: 600;
    }

.spray-days {
    color: #666;
    font-size: 0.8rem;
    background-color: #e9ecef;
    padding: 4px 8px;
    border-radius: 15px;
    font-weight: 500;
}

.product-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.spray-instruction {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 10px;
    font-size: 0.85rem;
    color: #856404;
    font-weight: 500;
}

/* Buy Products Section */
.buy-products-section {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.buy-products-btn {
    display: inline-block;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white !important;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
    border: none;
    cursor: pointer;
}

    .buy-products-btn:hover {
        background: linear-gradient(135deg, #218838, #1ea88a);
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(40, 167, 69, 0.4);
        text-decoration: none;
        color: white !important;
    }

    .buy-products-btn:active {
        transform: translateY(0);
    }

.plant-categories {
    display: block;
}

.plant-category {
    background-color: white;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

    .plant-category h4 {
        margin-bottom: 8px;
        color: #2c3e50;
        font-size: 1.0rem;
    }

.category-desc {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 12px;
    font-style: italic;
}

/* Moon Influence Section */
.moon-influence {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 12px;
    margin: 15px 0;
    text-align: left;
}

    .moon-influence h5 {
        color: #495057;
        font-size: 0.9rem;
        margin-bottom: 8px;
        font-weight: 600;
    }

    .moon-influence span {
        font-size: 0.85rem;
        line-height: 1.4;
        color: #6c757d;
    }

.plant-list {
    list-style: none;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
}

    .plant-list li {
        background-color: #f8f9fa;
        margin: 4px 0;
        padding: 6px 10px;
        border-radius: 6px;
        border-left: 3px solid #667eea;
        font-size: 0.85rem;
    }

    .plant-list::-webkit-scrollbar {
        width: 6px;
    }

    .plant-list::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }

    .plant-list::-webkit-scrollbar-thumb {
        background: #667eea;
        border-radius: 3px;
    }

        .plant-list::-webkit-scrollbar-thumb:hover {
            background: #5a67d8;
        }

/* Plant Action Buttons */
.plant-action {
    margin-top: 12px;
    text-align: center;
}

.category-btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white !important;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    width: 90%;
}

    .category-btn:hover {
        background: linear-gradient(135deg, #5a67d8, #6b46c1);
        transform: translateY(-2px);
        box-shadow: 0 5px 10px rgba(0,0,0,0.3);
        text-decoration: none;
        color: white !important;
    }

    .category-btn:active {
        transform: translateY(0);
    }

/* NEW: Calendar Section with Show/Hide */
.calendar-section {
    margin-top: 15px;
    /* NEW: Show/Hide capability */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

    .calendar-section.hidden {
        display: none;
    }

.calendar-grid {
    display: block;
    margin-top: 15px;
}

.calendar-day {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 4px;
    text-align: center;
    color: #333;
    min-height: 60px;
    margin-bottom: 5px;
    font-size: 0.75rem;
    width: calc(14.28% - 5px);
    display: inline-block;
    vertical-align: top;
    transition: all 0.3s ease;
    cursor: pointer;
}

    .calendar-day:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        background-color: #f8f9fa;
    }

    .calendar-day.today {
        background-color: #667eea;
        color: white;
        border-color: #667eea;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }

    .calendar-day.good-day {
        background-color: #d4edda;
        border-color: #38ef7d;
    }

    .calendar-day.bad-day {
        background-color: #f8d7da;
        border-color: #ff6384;
    }

    .calendar-day.clickable {
        cursor: pointer;
    }

        .calendar-day.clickable:hover {
            border-color: #667eea;
            box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
        }

.moon-phase-icon {
    font-size: 1.2rem;
    margin-top: 3px;
}

.weather-info {
    background-color: #74b9ff;
    color: white;
    padding: 15px;
    border-radius: 12px;
    margin-top: 15px;
}

    .weather-info h3 {
        margin-bottom: 12px;
        font-size: 1.1rem;
    }

/* NEW: Loading States for Dynamic Content */
.loading-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
    color: #666;
    font-size: 0.9rem;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* NEW: SEO and Accessibility Improvements */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #667eea;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

    .skip-link:focus {
        top: 6px;
    }

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
    z-index: 1000;
}

    .notification.show {
        opacity: 1;
        transform: translateX(0);
    }

    .notification.info {
        background-color: #3498db;
    }

    .notification.success {
        background-color: #2ecc71;
    }

    .notification.warning {
        background-color: #f39c12;
    }

    .notification.error {
        background-color: #e74c3c;
    }

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-slide-in {
    animation: slideInLeft 0.4s ease forwards;
}

/* Chart Loading State */
.chart-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    background-color: #f8f9fa;
    border-radius: 10px;
    color: #6c757d;
    font-size: 0.9rem;
}

    .chart-loading::before {
        content: '📊 กำลังโหลดกราฟ...';
    }

/* NEW: URL Sharing and Social Media Styles */
.share-url-section {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
}

.share-url-header {
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.url-display {
    background-color: white;
    border: 1px solid #ced4da;
    border-radius: 5px;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    word-break: break-all;
    color: #495057;
    margin-bottom: 10px;
}

.copy-url-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    .copy-url-btn:hover {
        background-color: #5a6268;
    }

    .copy-url-btn.copied {
        background-color: #28a745;
    }

/* PC Styles - 800px+ */
@media (min-width: 800px) {
    body {
        font-size: 16px;
    }

    .container {
        padding: 20px;
    }

    .header {
        padding: 30px;
        margin-bottom: 30px;
        border-radius: 20px;
    }

        .header h1 {
            font-size: 2.5rem;
            margin-bottom: 10px;
        }

        .header p {
            font-size: 1.1rem;
        }

    /* NEW: View Toggle for PC */
    .view-toggle-buttons {
        gap: 15px;
    }

    .view-btn {
        padding: 12px 25px;
        font-size: 1rem;
        min-width: 140px;
        max-width: 180px;
    }

    .location-section {
        margin-bottom: 30px;
    }

    .location-header h3 {
        font-size: 1.3rem;
    }

    .location-btn {
        padding: 10px 20px;
        font-size: 1rem;
    }

    .location-result {
        padding: 15px;
        margin-bottom: 20px;
    }

        .location-result p {
            font-size: 1rem;
        }

    .province-selector {
        margin-bottom: 20px;
    }

        .province-selector label {
            font-size: 1rem;
            margin-bottom: 10px;
        }

        .province-selector select {
            padding: 10px 15px;
            border-radius: 10px;
            font-size: 1rem;
        }

    .main-content {
        display: flex;
        gap: 30px;
        margin-bottom: 30px;
    }

        .main-content .card {
            flex: 1;
            margin-bottom: 0;
        }

    .card {
        padding: 25px;
        border-radius: 20px;
    }

    .chart-section {
        margin-bottom: 30px;
    }

    .chart-wrapper {
        height: 400px;
        margin: 25px 0;
        padding: 15px;
    }

    .moon-info-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
        margin-top: 25px;
    }

    .moon-day-info {
        padding: 15px;
        font-size: 0.95rem;
        border-radius: 12px;
    }

    .weekly-activity-section {
        margin-top: 30px;
        padding: 25px;
        border-radius: 20px;
    }

    .activity-item {
        padding: 20px;
        margin-bottom: 20px;
        border-radius: 12px;
    }

        .activity-item h5 {
            font-size: 1.1rem;
            margin-bottom: 10px;
        }

        .activity-item p {
            font-size: 1rem;
        }

    .product-item {
        padding: 20px;
        margin-bottom: 20px;
        border-radius: 12px;
    }

        .product-item .product-header strong {
            font-size: 1.1rem;
        }

    .spray-days {
        font-size: 0.9rem;
        padding: 6px 12px;
    }

    .product-description {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .spray-instruction {
        padding: 12px;
        font-size: 0.95rem;
    }

    .buy-products-btn {
        padding: 15px 40px;
        font-size: 1.1rem;
    }

    .date-picker {
        margin-bottom: 20px;
    }

        .date-picker label {
            font-size: 1rem;
            margin-bottom: 10px;
        }

        .date-picker input {
            padding: 12px 20px;
            border-radius: 10px;
            font-size: 1rem;
        }

    .moon-info {
        padding: 20px;
        border-radius: 15px;
        margin: 20px 0;
    }

        .moon-info h3 {
            font-size: 1.3rem;
            margin-bottom: 15px;
        }

        .moon-info p {
            font-size: 1.1rem;
            margin-bottom: 8px;
        }

    .advice-section {
        padding: 20px;
        border-radius: 15px;
        margin-top: 20px;
    }

        .advice-section h3 {
            font-size: 1.3rem;
            margin-bottom: 15px;
        }

    .moon-influence {
        padding: 15px;
        margin: 20px 0;
    }

        .moon-influence h5 {
            font-size: 1rem;
            margin-bottom: 10px;
        }

        .moon-influence span {
            font-size: 0.95rem;
        }

    .plant-categories {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        margin-top: 30px;
    }

    .plant-category {
        flex: 1;
        min-width: calc(50% - 10px);
        padding: 20px;
        border-radius: 15px;
        margin-bottom: 0;
    }

        .plant-category h4 {
            font-size: 1.2rem;
            margin-bottom: 15px;
        }

    .plant-list {
        max-height: 250px;
    }

        .plant-list li {
            padding: 8px 12px;
            margin: 5px 0;
            border-radius: 8px;
            border-left: 4px solid #667eea;
            font-size: 1rem;
        }

    .category-btn {
        width: auto;
        padding: 12px 30px;
        font-size: 1rem;
    }

    .calendar-section {
        margin-top: 20px;
    }

    .calendar-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 20px;
    }

    .calendar-day {
        padding: 12px 8px;
        border-radius: 10px;
        min-height: 80px;
        font-size: 0.9rem;
        width: calc(14.28% - 10px);
        margin-bottom: 0;
    }

    .moon-phase-icon {
        font-size: 1.5rem;
        margin-top: 5px;
    }

    .weather-info {
        padding: 20px;
        border-radius: 15px;
        margin-top: 20px;
    }

        .weather-info h3 {
            font-size: 1.3rem;
            margin-bottom: 15px;
        }

    /* NEW: URL Sharing Section for PC */
    .share-url-section {
        padding: 20px;
        margin: 25px 0;
    }

    .url-display {
        padding: 15px;
        font-size: 0.9rem;
    }

    .copy-url-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Additional Responsive Styles */
@media (max-width: 480px) {
    .container {
        padding: 5px;
    }

    .header {
        padding: 15px 8px;
        margin-bottom: 15px;
    }

        .header h1 {
            font-size: 1.5rem;
        }

        .header p {
            font-size: 0.8rem;
        }

    /* NEW: Mobile View Toggle */
    .view-toggle-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .view-btn {
        width: 100%;
        max-width: none;
        min-width: auto;
        padding: 12px 15px;
        font-size: 0.85rem;
    }

    .location-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .location-btn {
        width: 100%;
        text-align: center;
    }

    .card {
        padding: 12px;
        border-radius: 12px;
    }

    .chart-wrapper {
        height: 250px;
        margin: 15px 0;
        padding: 8px;
    }

    .moon-info-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 8px;
        margin-top: 15px;
    }

    .moon-day-info {
        padding: 8px;
        font-size: 0.75rem;
    }

    .weekly-activity-section {
        margin-top: 20px;
        padding: 15px;
    }

    .activity-item {
        padding: 12px;
        margin-bottom: 12px;
    }

        .activity-item h5 {
            font-size: 0.9rem;
        }

        .activity-item p {
            font-size: 0.8rem;
        }

    .product-item {
        padding: 12px;
        margin-bottom: 12px;
    }

    .product-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

        .product-header strong {
            font-size: 0.9rem;
        }

    .spray-days {
        font-size: 0.75rem;
        padding: 4px 8px;
    }

    .product-description {
        font-size: 0.8rem;
    }

    .spray-instruction {
        padding: 8px;
        font-size: 0.75rem;
    }

    .buy-products-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 100%;
    }

    .plant-category {
        padding: 12px;
        margin-bottom: 12px;
    }

        .plant-category h4 {
            font-size: 0.95rem;
        }

    .category-desc {
        font-size: 0.75rem;
    }

    .plant-list li {
        padding: 5px 8px;
        font-size: 0.8rem;
    }

    .calendar-day {
        width: calc(14.28% - 3px);
        padding: 6px 2px;
        min-height: 50px;
        font-size: 0.7rem;
    }

    .moon-phase-icon {
        font-size: 1rem;
    }

    /* NEW: Mobile URL Sharing */
    .share-url-section {
        padding: 12px;
        margin: 15px 0;
    }

    .url-display {
        padding: 10px;
        font-size: 0.8rem;
    }

    .copy-url-btn {
        width: 100%;
        padding: 10px;
        font-size: 0.85rem;
    }
}

/* NEW: Tablet Specific Styles */
@media (min-width: 481px) and (max-width: 799px) {
    .container {
        padding: 15px;
    }

    .view-toggle-buttons {
        gap: 12px;
    }

    .view-btn {
        flex: 1;
        min-width: 100px;
        max-width: 130px;
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .main-content {
        display: block;
    }

    .chart-wrapper {
        height: 350px;
    }

    .moon-info-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 12px;
    }

    .plant-categories {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
    }

    .plant-category {
        flex: 1;
        min-width: calc(50% - 7.5px);
    }

    .calendar-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .calendar-day {
        width: calc(14.28% - 8px);
        padding: 10px 6px;
        min-height: 70px;
        font-size: 0.8rem;
    }
}

/* NEW: High DPI/Retina Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .moon-phase-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* NEW: Dark Mode Support (if user prefers) */
@media (prefers-color-scheme: dark) {
    /* Optional: Add dark mode styles here if needed */
    /* For now, maintaining light theme for consistency */
}

/* NEW: Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .view-btn,
    .location-btn,
    .category-btn,
    .buy-products-btn,
    .product-item,
    .activity-item,
    .moon-day-info,
    .calendar-day {
        transition: none;
        animation: none;
    }

    .animate-fade-in,
    .animate-slide-in {
        animation: none;
    }

    .loading-spinner {
        animation: none;
        border: 3px solid #667eea;
    }
}

/* NEW: High Contrast Mode Support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }

    .view-btn {
        border: 2px solid #000;
    }

        .view-btn.active {
            border: 2px solid #fff;
        }

    .calendar-day {
        border: 2px solid #000;
    }

        .calendar-day.today {
            border: 2px solid #fff;
        }
}

/* Print Styles */
@media print {
    body {
        background-color: white;
        color: black;
    }

    .header, .card, .chart-section {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .location-btn, .category-btn, .buy-products-btn, .view-btn {
        display: none;
    }

    .view-toggle-section {
        display: none;
    }

    .chart-wrapper {
        height: 300px;
        background-color: white;
    }

    .notification {
        display: none;
    }

    .share-url-section {
        display: none;
    }

    /* Print-specific layout adjustments */
    .main-content {
        display: block;
    }

    .plant-categories {
        display: block;
    }

    .plant-category {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }

    .calendar-section {
        page-break-inside: avoid;
    }

    .weekly-activity-section {
        page-break-inside: avoid;
    }
}
