﻿/* AstroFarming.css - Enhanced Plant Analysis System */
/* Version: 3.1.0 - Complete Plant Analysis with FK Product Integration */

/* CSS Variables for Theme Colors */
:root {
    --primary-gold: #ffd700;
    --secondary-gold: #ffed4e;
    --primary-purple: #9370db;
    --secondary-purple: #dda0dd;
    --bg-dark: #0a0945;
    --bg-night: #1a0033;
    --bg-sky: radial-gradient(circle at center, #000428 0%, #004e92 100%);
    --bg-night-sky: radial-gradient(circle at center, #1a0033 0%, #000000 100%);
    --glass-bg: rgba(255,255,255,0.1);
    --glass-border: rgba(255,255,255,0.2);
    --fk-green: #4caf50;
    --fk-blue: #2196f3;
    --fk-orange: #ff9800;
    --fk-red: #f44336;
    --fk-purple: #9c27b0;
    --fk-cyan: #00bcd4;
    --plant-fruit: #ff9800;
    --plant-sun: #ffc107;
    --plant-root: #8bc34a;
    --plant-leaf: #4caf50;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-dark);
    color: #ffffff;
    min-height: 100vh;
    line-height: 1.6;
}

/* Container - Single Column Layout */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 10px;
}

/* Header */
.header {
    text-align: center;
    padding: 20px 0;
    background: var(--glass-bg);
    border-radius: 15px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

    .header h1 {
        font-size: 24px;
        margin-bottom: 5px;
        color: var(--primary-gold);
    }

    .header p {
        font-size: 14px;
        opacity: 0.8;
    }

/* Glass Card Base */
.glass-card {
    background: var(--glass-bg);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

.status-card {
    padding: 15px;
}

/* Location Status */
.location-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff6b6b;
}

    .status-indicator.active {
        background: #51cf66;
        animation: pulse 2s infinite;
    }

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Perfect Square Sky Maps - WebView Compatible */
.sky-map {
    position: relative;
    width: 100%;
    border-radius: 15px;
    margin-bottom: 20px;
    overflow: hidden;
    border: 2px solid rgba(255,215,0,0.3);
    background: var(--bg-sky);
}

.night-sky-map {
    border: 2px solid rgba(147,112,219,0.5);
    background: var(--bg-night-sky);
}

    /* Force 1:1 Aspect Ratio - WebView Safe */
    .sky-map::before,
    .night-sky-map::before {
        content: '';
        display: block;
        width: 100%;
        padding-top: 100%;
    }

/* Sky Content Container */
.sky-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px;
}

/* Sky Map Titles */
.sky-map-title {
    text-align: center;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 16px;
    padding: 10px;
    border-radius: 8px;
    color: var(--primary-gold);
    background: var(--glass-bg);
}

.night-sky-map-title {
    color: var(--secondary-purple);
    background: rgba(147,112,219,0.1);
    border: 1px solid rgba(147,112,219,0.3);
}

/* SVG and Constellation Elements */
.constellation-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

.constellation,
.star,
.sky-axis-text {
    position: absolute;
}

/* Constellation Labels */
.constellation {
    color: var(--primary-gold);
    font-size: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 2px 4px;
    border-radius: 4px;
    min-width: 40px;
    z-index: 50;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.3);
}

.night-sky-map .constellation {
    color: var(--secondary-purple);
    background: rgba(147,112,219,0.3);
    border: 1px solid rgba(147,112,219,0.3);
}

.constellation:hover {
    transform: translate(-50%, -50%) scale(1.1);
    z-index: 60;
    color: var(--secondary-gold);
}

.night-sky-map .constellation:hover {
    color: #e6e6fa;
    background: rgba(147,112,219,0.5);
}

/* Stars */
.star {
    width: 4px;
    height: 4px;
    background: #ffffff;
    border-radius: 50%;
    animation: twinkle 3s infinite;
    box-shadow: 0 0 3px #ffffff;
    z-index: 10;
    transform: translate(-50%, -50%);
}

.night-sky-map .star {
    background: #e6e6fa;
    box-shadow: 0 0 3px #e6e6fa;
}

.star.bright {
    width: 6px;
    height: 6px;
    background: #fffacd;
    box-shadow: 0 0 6px #fffacd;
    z-index: 12;
}

.night-sky-map .star.bright {
    background: var(--secondary-purple);
    box-shadow: 0 0 6px var(--secondary-purple);
}

.star.dim {
    width: 3px;
    height: 3px;
    opacity: 0.7;
    z-index: 8;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* Constellation Lines */
.constellation-line {
    stroke: rgba(255, 255, 255, 0.8);
    stroke-width: 0.5;
    fill: none;
    z-index: 5;
}

.night-sky-map .constellation-line {
    stroke: rgba(221, 160, 221, 0.6);
    stroke-width: 0.4;
}

/* Sky Axis Elements */
.sky-axis-line {
    stroke: rgba(255, 255, 255, 0.4);
    stroke-width: 0.3;
    fill: none;
}

.night-sky-map .sky-axis-line {
    stroke: rgba(221, 160, 221, 0.3);
    stroke-width: 0.2;
}

.sky-axis-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 9px;
    font-weight: 300;
    text-align: center;
    z-index: 4;
    background: rgba(0, 0, 0, 0.3);
    padding: 1px 3px;
    border-radius: 2px;
    line-height: 1;
    transform: translate(-50%, -50%);
}

.night-sky-map .sky-axis-text {
    color: rgba(221, 160, 221, 0.6);
    background: rgba(26, 0, 51, 0.5);
}

/* Loading States */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 20px;
    z-index: 100;
}

.spinner {
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 3px solid var(--primary-gold);
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Advice and Content Sections */
.advice-section {
    padding: 20px;
}

.advice-title {
    color: var(--primary-gold);
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ✨ NEW: Plant Analysis Subtitle */
.plant-analysis-subtitle {
    background: rgba(33,150,243,0.15);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(33,150,243,0.3);
    color: #64b5f6;
}

/* ✨ NEW: Categories Quick Reference */
.categories-quick-ref {
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    border: 1px solid rgba(255,255,255,0.1);
}

    .categories-quick-ref > div:first-child {
        text-align: center;
        margin-bottom: 10px;
        color: #81c784;
        font-weight: bold;
        font-size: 14px;
    }

    .categories-quick-ref > div:last-child {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
        font-size: 12px;
    }

        .categories-quick-ref > div:last-child > div {
            text-align: center;
            padding: 8px;
            border-radius: 8px;
            transition: transform 0.2s ease;
        }

            .categories-quick-ref > div:last-child > div:hover {
                transform: translateY(-2px);
            }

/* ========== ENHANCED: Plant Analysis Styles ========== */

/* Analysis Header */
.analysis-header {
    background: rgba(33,150,243,0.2);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid rgba(33,150,243,0.3);
}

    .analysis-header h3 {
        color: var(--primary-gold);
        margin: 0;
        font-size: 20px;
        margin-bottom: 10px;
    }

    .analysis-header div {
        font-size: 16px;
        line-height: 1.4;
    }

/* Enhanced Plant Category Cards */
.plant-category-card {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    border-left: 4px solid var(--fk-green);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .plant-category-card:hover {
        background: rgba(255,255,255,0.08);
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }

    .plant-category-card.priority-high {
        border-left-color: var(--fk-red);
        background: rgba(244,67,54,0.08);
    }

        .plant-category-card.priority-high:hover {
            background: rgba(244,67,54,0.15);
            box-shadow: 0 5px 15px rgba(244,67,54,0.3);
        }

/* Category Header */
.category-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

    .category-header h4 {
        color: var(--primary-gold);
        margin: 0;
        flex-grow: 1;
        font-size: 18px;
    }

/* ✨ NEW: All Plants Display */
.all-plants {
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
}

    .all-plants > div:first-child {
        font-size: 13px;
        color: #81c784;
        margin-bottom: 8px;
        font-weight: 600;
    }

    .all-plants > div:last-child {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        line-height: 1.8;
    }

    .all-plants span {
        background: rgba(76,175,80,0.15);
        color: #a5d6a7;
        padding: 3px 7px;
        border-radius: 10px;
        font-size: 11px;
        border: 1px solid rgba(76,175,80,0.2);
        transition: all 0.2s ease;
    }

        .all-plants span:hover {
            background: rgba(76,175,80,0.25);
            transform: scale(1.05);
        }

/* ✨ NEW: Care Advice */
.care-advice {
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(255,193,7,0.1);
    border-radius: 8px;
    border-left: 3px solid #ffc107;
    color: #fff3c4;
    font-size: 14px;
    line-height: 1.5;
}

/* ✨ NEW: Weekly Tasks */
.weekly-tasks {
    margin-bottom: 15px;
}

    .weekly-tasks > div:first-child {
        font-size: 13px;
        color: #64b5f6;
        margin-bottom: 8px;
        font-weight: 600;
    }

    .weekly-tasks > div:last-child {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 8px;
    }

        .weekly-tasks > div:last-child > div {
            background: rgba(33,150,243,0.1);
            padding: 8px;
            border-radius: 6px;
            font-size: 11px;
            transition: transform 0.2s ease;
        }

            .weekly-tasks > div:last-child > div:hover {
                transform: translateY(-1px);
            }

            .weekly-tasks > div:last-child > div > div:first-child {
                font-weight: bold;
                margin-bottom: 3px;
            }

            .weekly-tasks > div:last-child > div > div:last-child {
                color: #e1f5fe;
            }

/* Enhanced Recommended Products */
.recommended-products div:first-child {
    font-size: 13px;
    color: #64b5f6;
    margin-bottom: 8px;
    font-weight: 600;
}

.recommended-products div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

    .recommended-products div:last-child > div {
        background: rgba(33,150,243,0.15);
        padding: 6px 10px;
        border-radius: 8px;
        font-size: 11px;
        max-width: 200px;
        transition: all 0.3s ease;
    }

        .recommended-products div:last-child > div:hover {
            background: rgba(33,150,243,0.25);
            transform: translateY(-1px);
        }

        .recommended-products div:last-child > div > div:first-child {
            font-weight: bold;
            color: #64b5f6;
            margin-bottom: 2px;
        }

        .recommended-products div:last-child > div > div:last-child {
            color: #b3e5fc;
            line-height: 1.3;
        }

/* Overall Products Section */
.overall-products {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255,193,7,0.1);
    border-radius: 10px;
    border-left: 4px solid #ffc107;
}

    .overall-products h4 {
        color: var(--primary-gold);
        margin-bottom: 15px;
        font-size: 18px;
    }

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

    .product-grid > div {
        position: relative;
        padding: 12px;
        background: rgba(255,255,255,0.08);
        border-radius: 8px;
        border: 1px solid rgba(255,255,255,0.1);
        transition: all 0.3s ease;
    }

        .product-grid > div:hover {
            background: rgba(255,255,255,0.12);
            transform: translateY(-2px);
            box-shadow: 0 3px 10px rgba(0,0,0,0.2);
        }

        .product-grid > div div:first-child {
            font-weight: bold;
            margin-bottom: 5px;
            color: var(--primary-gold);
            font-size: 14px;
        }

        .product-grid > div div:nth-child(2) {
            font-size: 11px;
            opacity: 0.8;
            margin-bottom: 5px;
            line-height: 1.3;
            color: #b3e5fc;
        }

        .product-grid > div div:last-child {
            font-size: 10px;
            color: #81c784;
            font-style: italic;
        }

/* Priority Badges */
.priority-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--fk-red);
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: bold;
}

/* ✨ NEW: FK Products Information Section */
.fk-products-info {
    margin-top: 20px;
    padding: 20px;
    background: var(--glass-bg);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}

    .fk-products-info .advice-title {
        margin-bottom: 15px;
        color: var(--primary-gold);
    }

    .fk-products-info > div:last-child {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }

        .fk-products-info > div:last-child > div {
            padding: 12px;
            border-radius: 8px;
            transition: transform 0.2s ease;
        }

            .fk-products-info > div:last-child > div:hover {
                transform: translateY(-2px);
            }

            .fk-products-info > div:last-child > div > div:first-child {
                font-weight: bold;
                margin-bottom: 5px;
            }

            .fk-products-info > div:last-child > div > div:last-child {
                font-size: 12px;
                line-height: 1.4;
                opacity: 0.9;
            }

/* FK Product Button - Enhanced */
.fk-product-btn {
    background: linear-gradient(45deg, var(--fk-green), #66bb6a);
    color: white !important;
    text-decoration: none;
    display: inline-block;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(76,175,80,0.3);
    font-size: 16px;
    margin: 10px 0;
}

    .fk-product-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(76,175,80,0.4);
        background: linear-gradient(45deg, #66bb6a, var(--fk-green));
    }

    .fk-product-btn:active {
        transform: translateY(-1px);
    }

/* Error Message */
.error-message {
    background: rgba(244,67,54,0.2);
    color: #f44336;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #f44336;
    margin: 15px 0;
}

/* ========== END: Enhanced Plant Analysis Styles ========== */

/* Buttons */
.btn {
    background: linear-gradient(45deg, var(--primary-gold), var(--secondary-gold));
    color: #1a1a2e;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(255,215,0,0.4);
    }

    .btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

/* Time Info */
.time-info {
    background: rgba(33,150,243,0.2);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 15px;
    text-align: center;
}

/* Analysis Items */
.analysis-item {
    background: rgba(76,175,80,0.1);
    border-left: 3px solid #4caf50;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 5px;
}

    .analysis-item.warning {
        background: rgba(255,193,7,0.1);
        border-left-color: #ffc107;
    }

    .analysis-item.info {
        background: rgba(33,150,243,0.1);
        border-left-color: #2196f3;
    }

/* Wisdom Section */
.wisdom-section {
    padding: 20px;
}

.wisdom-item {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid;
}

.wisdom-thai {
    background: rgba(255,215,0,0.1);
    border-left-color: var(--primary-gold);
}

.wisdom-neighbor {
    background: rgba(33,150,243,0.1);
    border-left-color: #2196f3;
}

.wisdom-ancient {
    background: rgba(255,152,0,0.1);
    border-left-color: #ff9800;
}

.wisdom-historical {
    background: rgba(156,39,176,0.1);
    border-left-color: #9c27b0;
}

.wisdom-other {
    background: rgba(244,67,54,0.1);
    border-left-color: #f44336;
}

/* Wisdom Controls */
.wisdom-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

.wisdom-filter-btn {
    background: var(--glass-bg);
    color: #ffffff;
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .wisdom-filter-btn:hover {
        background: rgba(255,255,255,0.2);
        transform: translateY(-1px);
    }

    .wisdom-filter-btn.active {
        background: linear-gradient(45deg, var(--primary-gold), var(--secondary-gold));
        color: #1a1a2e;
        border-color: var(--primary-gold);
    }

/* Usage Instructions */
.usage-instructions {
    background: rgba(147,112,219,0.1);
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-purple);
    margin-bottom: 20px;
}

.instruction-title {
    font-weight: bold;
    color: var(--secondary-purple);
    margin-bottom: 5px;
}

.instruction-content {
    font-size: 12px;
    line-height: 1.4;
}

.wisdom-explanation {
    background: rgba(255,255,255,0.08);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 12px;
    border-left: 3px solid var(--primary-gold);
}

/* Mobile Responsive Design - Enhanced */
@media (max-width: 480px) {
    .container {
        padding: 8px;
    }

    .header h1 {
        font-size: 20px;
    }

    .header p {
        font-size: 12px;
    }

    .sky-content {
        padding: 15px;
    }

    .constellation {
        font-size: 9px;
        min-width: 35px;
    }

    .star {
        width: 3px;
        height: 3px;
    }

        .star.bright {
            width: 5px;
            height: 5px;
        }

    /* Plant Analysis Mobile */
    .analysis-header h3 {
        font-size: 18px;
    }

    .analysis-header div {
        font-size: 14px;
    }

    .plant-category-card {
        padding: 12px;
    }

    .category-header h4 {
        font-size: 16px;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .fk-product-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .all-plants span {
        font-size: 10px;
        padding: 2px 5px;
    }

    .weekly-tasks > div:last-child {
        grid-template-columns: 1fr;
    }

    .categories-quick-ref > div:last-child {
        grid-template-columns: repeat(2, 1fr);
    }

    .fk-products-info > div:last-child {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 481px) and (max-width: 767px) {
    .container {
        padding: 15px;
    }

    .header h1 {
        font-size: 22px;
    }

    .sky-content {
        padding: 18px;
    }

    .constellation {
        font-size: 10px;
    }

    .star {
        width: 4px;
        height: 4px;
    }

        .star.bright {
            width: 6px;
            height: 6px;
        }

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .categories-quick-ref > div:last-child {
        grid-template-columns: repeat(2, 1fr);
    }

    .fk-products-info > div:last-child {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (min-width: 768px) {
    .container {
        padding: 20px;
    }

    .header h1 {
        font-size: 28px;
    }

    .header p {
        font-size: 15px;
    }

    .sky-content {
        padding: 25px;
    }

    .constellation {
        font-size: 12px;
    }

    .star {
        width: 5px;
        height: 5px;
    }

        .star.bright {
            width: 7px;
            height: 7px;
        }

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .categories-quick-ref > div:last-child {
        grid-template-columns: repeat(4, 1fr);
    }

    .fk-products-info > div:last-child {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 900px;
    }

    .header h1 {
        font-size: 32px;
    }

    .header p {
        font-size: 16px;
    }

    .sky-content {
        padding: 30px;
    }

    .constellation {
        font-size: 14px;
    }

    .star {
        width: 6px;
        height: 6px;
    }

        .star.bright {
            width: 8px;
            height: 8px;
        }

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .weekly-tasks > div:last-child {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .fk-products-info > div:last-child {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1000px;
    }

    .fk-products-info > div:last-child {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Landscape Mode */
@media (max-height: 500px) and (orientation: landscape) {
    .container {
        padding: 5px;
    }

    .header {
        padding: 10px 0;
        margin-bottom: 10px;
    }

    .sky-content {
        padding: 10px;
    }

    .glass-card {
        margin-bottom: 10px;
        padding: 10px;
    }

    .plant-category-card {
        padding: 10px;
        margin-bottom: 15px;
    }

    .fk-products-info {
        padding: 15px;
    }
}

/* WebView Compatibility Fixes */
@supports not (aspect-ratio: 1) {
    .sky-map::before,
    .night-sky-map::before {
        padding-top: 100% !important;
    }
}

.force-square::before {
    padding-top: 100% !important;
}

/* ✨ NEW: Animation Enhancements */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.plant-category-card {
    animation: slideInUp 0.6s ease forwards;
}

    .plant-category-card:nth-child(1) {
        animation-delay: 0.1s;
    }

    .plant-category-card:nth-child(2) {
        animation-delay: 0.2s;
    }

    .plant-category-card:nth-child(3) {
        animation-delay: 0.3s;
    }

    .plant-category-card:nth-child(4) {
        animation-delay: 0.4s;
    }

.categories-quick-ref {
    animation: fadeInScale 0.8s ease forwards;
}

.fk-products-info {
    animation: slideInUp 0.6s ease forwards;
    animation-delay: 0.5s;
}

/* ✨ NEW: Hover Effects Enhancement */
.all-plants span {
    position: relative;
    overflow: hidden;
}

    .all-plants span::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        transition: left 0.5s;
    }

    .all-plants span:hover::before {
        left: 100%;
    }

/* ✨ NEW: Focus States for Accessibility */
.wisdom-filter-btn:focus,
.btn:focus,
.fk-product-btn:focus {
    outline: 2px solid var(--primary-gold);
    outline-offset: 2px;
}

.constellation:focus {
    outline: 2px solid var(--primary-gold);
    outline-offset: 1px;
}

/* ✨ NEW: Print Styles Enhancement */
@media print {
    .sky-map,
    .night-sky-map,
    .btn,
    .wisdom-controls,
    .fk-product-btn {
        display: none;
    }

    .analysis-header,
    .plant-category-card,
    .fk-products-info {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    body {
        background: white;
        color: black;
    }

    .glass-card {
        background: #f5f5f5;
        border: 1px solid #ddd;
    }

    .plant-category-card {
        background: #fafafa;
        border: 1px solid #e0e0e0;
    }

    .all-plants span {
        background: #e8f5e8;
        color: #2e7d32;
        border: 1px solid #c8e6c9;
    }

    .care-advice {
        background: #fff3e0;
        color: #e65100;
        border-left-color: #ff9800;
    }
}

/* ✨ NEW: Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-dark: #0a0a0a;
        --glass-bg: rgba(255,255,255,0.08);
        --glass-border: rgba(255,255,255,0.15);
    }
}

/* ✨ NEW: Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .plant-category-card,
    .categories-quick-ref,
    .fk-products-info {
        animation: none;
    }

    .spinner {
        animation: none;
        border: 3px solid var(--primary-gold);
    }

    .star {
        animation: none;
    }

    * {
        transition: none !important;
    }
}

/* ✨ NEW: High Contrast Mode */
@media (prefers-contrast: high) {
    .plant-category-card {
        border: 2px solid #ffffff;
    }

    .all-plants span {
        border: 1px solid #ffffff;
    }

    .wisdom-filter-btn {
        border: 2px solid #ffffff;
    }
}

/* ✨ NEW: Loading States */
.plant-category-card.loading {
    opacity: 0.5;
    pointer-events: none;
}

    .plant-category-card.loading::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255,255,255,0.1);
        animation: pulse 2s infinite;
    }

/* ✨ NEW: Scroll Indicators */
.categories-quick-ref::-webkit-scrollbar {
    height: 4px;
}

.categories-quick-ref::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.categories-quick-ref::-webkit-scrollbar-thumb {
    background: var(--primary-gold);
    border-radius: 2px;
}

    .categories-quick-ref::-webkit-scrollbar-thumb:hover {
        background: var(--secondary-gold);
    }
