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

html {
    overflow-x: hidden;
    width: 100%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    max-width: 100%;
}

body {
    font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7f0 0%, #e8ede0 25%, #d9e2c8 50%, #cad6b5 75%, #b8c99f 100%);
    background-attachment: fixed;
    color: #2d3e1f;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="herbs" patternUnits="userSpaceOnUse" width="30" height="30"><path d="M15 5 L20 15 L15 25 L10 15 Z" fill="rgba(139,148,103,0.03)" stroke="rgba(139,148,103,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23herbs)"/></svg>') repeat;
    pointer-events: none;
    z-index: 0;
}

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 1.5rem 1.5rem 0.8rem 1.5rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid rgba(139, 148, 103, 0.3);
    position: relative;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8b9467, #a8b582, #c4d19e, #a8b582, #8b9467);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Elements Explorer Styles */
.elements-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.element-filters-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.element-filter-large {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 245, 0.8));
    border: 2px solid rgba(139, 148, 103, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}

.element-filter-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 148, 103, 0.2);
    border-color: rgba(139, 148, 103, 0.5);
}

.element-filter-large.active {
    background: linear-gradient(135deg, rgba(139, 148, 103, 0.8), rgba(186, 201, 159, 0.6));
    border-color: rgba(139, 148, 103, 0.8);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 148, 103, 0.3);
}

.element-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.element-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.element-count {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.element-desc {
    font-size: 0.8rem;
    opacity: 0.7;
    line-height: 1.3;
}

.elements-grid {
    margin-top: 2rem;
}

.element-herb-card {
    position: relative;
    padding-top: 3rem; /* Extra space for element badge */
}

.element-info {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin: 0.5rem 0;
    flex-wrap: wrap;
}

.element-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.element-badge.element-fire {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
}

.element-badge.element-water {
    background: linear-gradient(135deg, #4a90e2, #7bb3f0);
}

.element-badge.element-earth {
    background: linear-gradient(135deg, #8b7355, #a0956b);
}

.element-badge.element-air {
    background: linear-gradient(135deg, #9b59b6, #c39bd3);
}

.element-badge.element-ether {
    background: linear-gradient(135deg, #9b59b6, #e8d5ff);
    color: #2c3e50;
}

.element-badge.element-unknown {
    background: linear-gradient(135deg, #95a5a6, #bdc3c7);
}

.energetics {
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
}

.celestial-info {
    font-size: 0.85rem;
    color: #666;
    margin: 0.5rem 0;
    line-height: 1.4;
}

.celestial-description {
    font-style: italic;
    color: #555;
    margin-top: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.spiritual-guidance {
    line-height: 1.6;
}

.spiritual-guidance strong {
    display: block;
    color: #2d3e1f;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.spiritual-guidance p {
    margin-bottom: 1rem;
}

.spiritual-guidance p:last-child {
    margin-bottom: 0;
}

.element-info-panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 245, 0.9));
    border: 2px solid rgba(139, 148, 103, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    text-align: center;
}

.element-info-panel h3 {
    color: #2d3e1f;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.element-info-panel p {
    color: #4a5d3a;
    line-height: 1.6;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .element-filters-main {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .element-filters-main .element-filter-large:first-child {
        grid-column: 1 / -1;
    }
    
    .element-filter-large {
        padding: 1rem;
        min-height: 100px;
    }
    
    .element-icon {
        font-size: 1.5rem;
    }
    
    .element-name {
        font-size: 1rem;
    }
    
    .element-count, .element-desc {
        font-size: 0.75rem;
    }
    
    .element-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Typography Enhancement */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Nunito Sans', 'Source Sans Pro', sans-serif;
    font-weight: 600;
    letter-spacing: 0.3px;
}

header h1 {
    text-align: center;
    color: #2d5016;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    letter-spacing: 0.5px;
    position: relative;
    display: inline-block;
    width: 100%;
}

header h1::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #8b9467, transparent);
}

nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    background: linear-gradient(45deg, #8b9467, #a8b582);
    color: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(139, 148, 103, 0.2);
    position: relative;
    overflow: hidden;
}

.nav-btn::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 ease;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover, .nav-btn.active {
    background: linear-gradient(45deg, #2d5016, #3d6b1f);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(45, 80, 22, 0.4);
}

.nav-btn.active {
    background: linear-gradient(45deg, #2d5016, #3d6b1f, #4a7c23);
    box-shadow: 0 6px 20px rgba(45, 80, 22, 0.5);
}

main {
    padding: 1.5rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
}

/* General page heading styles for better visibility */
.page h2 {
    color: #1a2e0f;
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(139, 148, 103, 0.3);
}

.page {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.page.active {
    display: block;
}

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

/* Home Page Styles */
.hero {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(139, 148, 103, 0.2);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 148, 103, 0.05) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-20px, -20px) rotate(180deg); }
}

.hero h2 {
    font-size: 2rem;
    color: #2d5016;
    margin-bottom: 1rem;
    font-weight: 600;
    position: relative;
    z-index: 2;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.hero p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 2;
}

.cta-btn {
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    background: linear-gradient(45deg, #8b9467, #a8b582, #c4d19e);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 148, 103, 0.3);
    font-weight: 500;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

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

.cta-btn:hover::before {
    left: 100%;
}

.cta-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 35px rgba(139, 148, 103, 0.5);
}

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

.feature-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 148, 103, 0.2);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #8b9467, #a8b582, #c4d19e);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.feature-card h3 {
    color: #2d5016;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

/* Oracle Page Styles */
.oracle-container {
    text-align: center;
    max-width: 600px;
    margin: 1rem auto;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(139, 148, 103, 0.3);
}

.oracle-container h2 {
    color: #1a2e0f;
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.8);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.oracle-container p {
    color: #2d3e1f;
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.card-deck {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.oracle-card {
    width: 320px;
    height: 450px;
    margin: 0 auto;
    perspective: 1000px;
    cursor: pointer;
    position: relative;
    display: block;
}

.card-back {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8b9467 0%, #a8b582 50%, #c4d19e 100%);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    color: white;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.4s ease;
    border: 3px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.card-back::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: cardGlow 4s ease-in-out infinite;
}

@keyframes cardGlow {
    0%, 100% { transform: rotate(0deg) scale(1); opacity: 0.5; }
    50% { transform: rotate(180deg) scale(1.1); opacity: 0.8; }
}

.card-back::after {
    content: '✨ Click to Reveal ✨';
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    letter-spacing: 1.2px;
}

.card-back:hover {
    transform: rotateY(15deg) scale(1.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.drawn-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: cardReveal 1s ease-out;
    border: 2px solid rgba(139, 148, 103, 0.3);
    position: relative;
    overflow: hidden;
}

.drawn-card .botanical {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    margin-bottom: 0.7rem;
}

.drawn-card .spiritual {
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 0.7rem;
}

.drawn-card #cardMessage {
    font-size: 0.8rem;
    line-height: 1.4;
    margin-top: 0.7rem;
    color: #555;
}

.drawn-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8b9467, #a8b582, #c4d19e, #a8b582, #8b9467);
}

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: rotateY(180deg) scale(0.8);
    }
    to {
        opacity: 1;
        transform: rotateY(0deg) scale(1);
    }
}

.drawn-card h3 {
    color: #2d5016;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.oracle-card-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(139, 148, 103, 0.2);
    justify-content: center;
}

.oracle-card-buttons .primary-btn,
.oracle-card-buttons .secondary-btn {
    flex: 0 0 auto;
    min-width: 140px;
}

/* Browse Page Styles */
.browse-controls {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(139, 148, 103, 0.2);
}

.browse-controls h2 {
    color: #1a2e0f;
    margin-bottom: 1.2rem;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.8);
}

.search-container {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.search-container input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #8b9467;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.search-container input:focus {
    outline: none;
    border-color: #a8b582;
    box-shadow: 0 0 0 3px rgba(139, 148, 103, 0.2);
    background: white;
    transform: translateY(-1px);
}

.search-btn, .clear-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.search-btn {
    background: linear-gradient(45deg, #8b9467, #a8b582);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 148, 103, 0.3);
}

.clear-btn {
    background: linear-gradient(45deg, #ddd, #f0f0f0);
    color: #666;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-btn:hover, .clear-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 148, 103, 0.4);
}

.herb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.herb-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(139, 148, 103, 0.2);
    overflow: hidden;
}

.herb-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #8b9467, #a8b582, #c4d19e);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.herb-card:hover::before {
    transform: scaleX(1);
}

.herb-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.herb-card h3 {
    color: #2d5016;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.herb-card .botanical {
    color: #666;
    font-style: italic;
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
}

.herb-card .uses {
    color: #555;
    line-height: 1.4;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
}

.herb-card .spiritual-preview {
    color: #666;
    line-height: 1.4;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.more-btn, .ask-ai-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
}

.more-btn {
    background: linear-gradient(45deg, #8b9467, #a8b582);
    color: white;
}

.ask-ai-btn {
    background: linear-gradient(45deg, #6b8e56, #7a9d68);
    color: white;
}

.more-btn:hover, .ask-ai-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 148, 103, 0.3);
}

.favorite-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #ccc;
    transition: color 0.3s ease;
}

.favorite-btn.favorited {
    color: #e74c3c;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    margin: 1rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(139, 148, 103, 0.2);
    animation: modalSlideIn 0.4s ease-out;
}

.modal-content img {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    background: linear-gradient(135deg, #f5f7f0, #e8ede0);
}

.modal-content img.loaded {
    opacity: 1;
}

@keyframes modalSlideIn {
    from { 
        opacity: 0; 
        transform: translateY(-50px) scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 2.5rem;
    cursor: pointer;
    color: #999;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
}

.close:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

/* Journal Styles */
.journal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 20px;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(139, 148, 103, 0.2);
}

.journal-header h2 {
    color: #1a2e0f;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.8);
    background: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
    border: none;
}

.journal-editor {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.journal-editor h3 {
    color: #2d5016;
    margin-bottom: 1rem;
}

.journal-editor input, .journal-editor textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #8b9467;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-family: inherit;
    font-size: 1rem;
}

.journal-editor textarea {
    min-height: 150px;
    resize: vertical;
}

.editor-buttons {
    display: flex;
    gap: 1rem;
}

.primary-btn, .secondary-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.primary-btn {
    background: linear-gradient(45deg, #8b9467, #a8b582);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 148, 103, 0.3);
}

.secondary-btn {
    background: linear-gradient(45deg, #ddd, #f0f0f0);
    color: #666;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.primary-btn:hover, .secondary-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(139, 148, 103, 0.4);
}

.journal-entries {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.journal-entry {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.journal-entry h4 {
    color: #2d5016;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.journal-entry .date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.journal-entry .content {
    line-height: 1.6;
    color: #555;
    margin-bottom: 1rem;
}

.entry-actions {
    display: flex;
    gap: 1rem;
}

.edit-btn, .delete-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

.edit-btn {
    background: #8b9467;
    color: white;
}

.delete-btn {
    background: #e74c3c;
    color: white;
}

/* Footer Styles */
footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 2rem;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
    border-top: 3px solid rgba(139, 148, 103, 0.3);
    position: relative;
    margin-top: 3rem;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8b9467, #a8b582, #c4d19e, #a8b582, #8b9467);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-link {
    text-decoration: none;
    color: #2d5016;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.footer-link:hover {
    background: rgba(139, 148, 103, 0.1);
    color: #1a2e0f;
    transform: translateY(-2px);
}

.footer-link.active {
    background: linear-gradient(45deg, #8b9467, #a8b582);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 148, 103, 0.3);
}

.footer-info {
    text-align: center;
    color: #666;
    font-size: 0.75rem;
    border-top: 1px solid rgba(139, 148, 103, 0.2);
    padding-top: 1rem;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 1.2rem 1rem 0.8rem 1rem;
    }
    
    header h1 {
        font-size: 1.4rem;
    }
    
    .nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .journal-header {
        flex-direction: column;
        text-align: center;
    }
    
    .editor-buttons {
        flex-direction: column;
    }
    
    .herb-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1rem;
    }
    
    /* For smaller phones - ensure at least 2 columns when possible */
    @media (max-width: 480px) {
        .herb-grid {
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            gap: 0.8rem;
        }
    }
    
    /* Oracle Card Mobile Responsiveness */
    .oracle-container {
        padding: 1rem;
        max-width: calc(100vw - 2rem);
        margin: 0.5rem;
    }
    
    .oracle-container h2 {
        font-size: 2.2rem;
    }
    
    .oracle-container p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .oracle-card {
        width: 180px;
        height: 260px;
    }
    
    .card-back {
        font-size: 3.5rem;
    }
    
    .card-back::after {
        font-size: 0.8rem;
        bottom: 15px;
    }
    
    .drawn-card {
        padding: 2rem 1.5rem;
        margin-top: 2rem;
    }
    
    .drawn-card h3 {
        font-size: 1.6rem;
        margin-bottom: 0.8rem;
    }
    
    .drawn-card .botanical {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
    }
    
    .drawn-card .spiritual {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .drawn-card #cardMessage {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .oracle-card-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .oracle-card-buttons .primary-btn,
    .oracle-card-buttons .secondary-btn {
        min-width: auto;
        width: 100%;
    }
}

/* AI Assistant Styles */
.assistant-container {
    max-width: 900px;
    margin: 0 auto;
}

.assistant-container h2 {
    color: #1a2e0f;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.8);
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5rem 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(139, 148, 103, 0.3);
}

.assistant-container > p {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.chat-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    border: 1px solid rgba(139, 148, 103, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.chat-messages {
    max-height: 500px;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.user-message, .assistant-message {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.user-message {
    justify-content: flex-end;
}

.assistant-message {
    justify-content: flex-start;
}

/* Message Wrapper overrides the flex layout for external buttons */
.message-wrapper .assistant-message {
    display: block !important;
    width: 100% !important;
    margin-bottom: 0;
    justify-content: unset !important;
    align-items: unset !important;
    gap: unset !important;
}

.message-wrapper .assistant-message .message-content {
    max-width: 100% !important;
    display: block;
    margin-left: 0;
    float: none !important;
    width: 100%;
}

.message-wrapper .user-message {
    display: flex;
    justify-content: flex-end;
}

.message-content {
    max-width: 75%;
    padding: 1rem 1.5rem;
    border-radius: 18px;
    position: relative;
}

.user-message .message-content {
    background: linear-gradient(135deg, #8b9467, #a8b582);
    color: white;
    border-bottom-right-radius: 5px;
}

.assistant-message .message-content {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 5px;
}

.assistant-message .message-content.ai-enhanced {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f1f3f4 100%);
    border: 1px solid rgba(139, 148, 103, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 1.5rem 2rem;
}

.message-content p {
    margin: 0;
    line-height: 1.5;
}

.message-content p:not(:last-child) {
    margin-bottom: 0.8rem;
}

/* Enhanced AI Response Readability Styles */
.ai-enhanced .ai-paragraph {
    margin: 0 0 1.2rem 0;
    line-height: 1.7;
    color: #2d3748;
    font-size: 1rem;
}

.ai-enhanced .ai-paragraph:last-child {
    margin-bottom: 0;
}

.ai-enhanced .ai-heading {
    color: #2d5016;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(139, 148, 103, 0.3);
}

.ai-enhanced .ai-heading:first-child {
    margin-top: 0;
}

.ai-enhanced .ai-subheading {
    color: #4a7c59;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.2rem 0 0.8rem 0;
}

.ai-enhanced .ai-bold {
    color: #2d5016;
    font-weight: 700;
}

.ai-enhanced .ai-italic {
    color: #4a7c59;
    font-style: italic;
}

.ai-enhanced .ai-code {
    background: rgba(139, 148, 103, 0.1);
    border: 1px solid rgba(139, 148, 103, 0.2);
    border-radius: 4px;
    padding: 0.2rem 0.4rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #2d5016;
}

.ai-enhanced .ai-list {
    margin: 1rem 0;
    padding-left: 0;
    list-style: none;
}

.ai-enhanced .ai-list-item {
    position: relative;
    padding: 0.4rem 0 0.4rem 1.5rem;
    margin-bottom: 0.3rem;
    line-height: 1.6;
    color: #2d3748;
}

.ai-enhanced .ai-list-item:before {
    content: '🌿';
    position: absolute;
    left: 0;
    top: 0.4rem;
    font-size: 0.9rem;
}

.ai-enhanced .ai-list-item:nth-child(even):before {
    content: '🍃';
}

.ai-enhanced .ai-list-item:nth-child(3n):before {
    content: '✨';
}

/* Additional readability enhancements */
.ai-enhanced blockquote,
.ai-enhanced .ai-quote {
    background: rgba(139, 148, 103, 0.05);
    border-left: 4px solid rgba(139, 148, 103, 0.4);
    margin: 1rem 0;
    padding: 1rem 1.5rem;
    font-style: italic;
    color: #4a7c59;
}

.ai-enhanced .ai-emphasis {
    background: linear-gradient(120deg, rgba(139, 148, 103, 0.1) 0%, transparent 100%);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-weight: 600;
}

.ai-enhanced .ai-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 6px;
    padding: 0.8rem 1rem;
    margin: 1rem 0;
    color: #856404;
}

.ai-enhanced .ai-info {
    background: rgba(0, 123, 255, 0.05);
    border: 1px solid rgba(0, 123, 255, 0.2);
    border-radius: 6px;
    padding: 0.8rem 1rem;
    margin: 1rem 0;
    color: #004085;
}

.ai-enhanced br {
    line-height: 1.8;
}

/* Elemental Correspondence Enhancement */
.elemental-correspondence {
    margin: 0.5rem 0;
}

.element-display {
    background: linear-gradient(135deg, rgba(139, 148, 103, 0.1), rgba(168, 181, 130, 0.1));
    border: 2px solid rgba(139, 148, 103, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin: 0.5rem 0;
}

.element-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.element-icon {
    font-size: 1.8rem;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.element-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d5016;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.element-meaning {
    color: #4a5d3a;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    font-style: italic;
}

.element-not-specified,
.element-unknown {
    color: #666;
    font-style: italic;
    margin: 0;
}

/* Fire element specific styling */
.element-display:has(.element-icon:contains('🔥')) {
    background: linear-gradient(135deg, rgba(255, 69, 0, 0.1), rgba(255, 140, 0, 0.1));
    border-color: rgba(255, 69, 0, 0.3);
}

/* Water element specific styling */
.element-display:has(.element-icon:contains('💧')) {
    background: linear-gradient(135deg, rgba(0, 119, 190, 0.1), rgba(100, 149, 237, 0.1));
    border-color: rgba(0, 119, 190, 0.3);
}

/* Earth element specific styling */
.element-display:has(.element-icon:contains('🌍')) {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.1), rgba(160, 82, 45, 0.1));
    border-color: rgba(139, 69, 19, 0.3);
}

/* Air element specific styling */
.element-display:has(.element-icon:contains('💨')) {
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.1), rgba(173, 216, 230, 0.1));
    border-color: rgba(135, 206, 235, 0.3);
}

/* Ether element specific styling */
.element-display:has(.element-icon:contains('✨')) {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.1), rgba(186, 85, 211, 0.1));
    border-color: rgba(138, 43, 226, 0.3);
}

/* Mobile responsiveness for elemental correspondence */
@media (max-width: 768px) {
    .element-display {
        padding: 0.8rem 1rem;
    }
    
    .element-header {
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .element-icon {
        font-size: 1.5rem;
    }
    
    .element-name {
        font-size: 1.1rem;
    }
    
    .element-meaning {
        font-size: 0.9rem;
    }
}

/* Chakra Correspondence Enhancement */
.chakra-correspondence {
    margin: 0.5rem 0;
}

.chakra-display {
    background: linear-gradient(135deg, rgba(139, 148, 103, 0.1), rgba(168, 181, 130, 0.1));
    border: 2px solid rgba(139, 148, 103, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin: 0.5rem 0;
}

.chakra-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.chakra-icon {
    font-size: 1.8rem;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chakra-names {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.chakra-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d5016;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chakra-sanskrit {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    opacity: 0.8;
}

.chakra-meaning {
    color: #4a5d3a;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    font-style: italic;
}

.chakra-not-specified,
.chakra-unknown {
    color: #666;
    font-style: italic;
    margin: 0;
}

/* Root Chakra specific styling */
.chakra-display:has(.chakra-icon:contains('🔴')) {
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.1), rgba(255, 69, 0, 0.1));
    border-color: rgba(220, 20, 60, 0.3);
}

/* Sacral Chakra specific styling */
.chakra-display:has(.chakra-icon:contains('🟠')) {
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.1), rgba(255, 165, 0, 0.1));
    border-color: rgba(255, 140, 0, 0.3);
}

/* Solar Plexus Chakra specific styling */
.chakra-display:has(.chakra-icon:contains('🟡')) {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 255, 0, 0.1));
    border-color: rgba(255, 215, 0, 0.3);
}

/* Heart Chakra specific styling */
.chakra-display:has(.chakra-icon:contains('💚')) {
    background: linear-gradient(135deg, rgba(0, 128, 0, 0.1), rgba(34, 139, 34, 0.1));
    border-color: rgba(0, 128, 0, 0.3);
}

/* Throat Chakra specific styling */
.chakra-display:has(.chakra-icon:contains('💙')) {
    background: linear-gradient(135deg, rgba(30, 144, 255, 0.1), rgba(0, 191, 255, 0.1));
    border-color: rgba(30, 144, 255, 0.3);
}

/* Third Eye Chakra specific styling */
.chakra-display:has(.chakra-icon:contains('💜')) {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.1), rgba(147, 112, 219, 0.1));
    border-color: rgba(138, 43, 226, 0.3);
}

/* Crown Chakra specific styling */
.chakra-display:has(.chakra-icon:contains('🤍')) {
    background: linear-gradient(135deg, rgba(240, 248, 255, 0.1), rgba(255, 255, 255, 0.1));
    border-color: rgba(200, 200, 200, 0.3);
}

/* All Chakras specific styling */
.chakra-display:has(.chakra-icon:contains('🌈')) {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.05), rgba(255, 165, 0, 0.05), rgba(255, 255, 0, 0.05), rgba(0, 128, 0, 0.05), rgba(0, 0, 255, 0.05), rgba(75, 0, 130, 0.05), rgba(238, 130, 238, 0.05));
    border-color: rgba(128, 128, 128, 0.3);
}

/* Mobile responsiveness for chakra correspondence */
@media (max-width: 768px) {
    .chakra-display {
        padding: 0.8rem 1rem;
    }
    
    .chakra-header {
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .chakra-icon {
        font-size: 1.5rem;
    }
    
    .chakra-name {
        font-size: 1.1rem;
    }
    
    .chakra-sanskrit {
        font-size: 0.8rem;
    }
    
    .chakra-meaning {
        font-size: 0.9rem;
    }
}

/* Parts Used Correspondence Enhancement */
.parts-used-correspondence {
    margin: 0.5rem 0;
}

.part-display {
    background: linear-gradient(135deg, rgba(139, 148, 103, 0.1), rgba(168, 181, 130, 0.1));
    border: 2px solid rgba(139, 148, 103, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin: 0.5rem 0;
}

.part-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.part-icon {
    font-size: 1.8rem;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.part-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d5016;
    text-transform: capitalize;
    letter-spacing: 0.5px;
}

.part-meaning {
    color: #4a5d3a;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    font-style: italic;
}

.parts-not-specified,
.part-unknown {
    color: #666;
    font-style: italic;
    margin: 0;
}

/* Specific plant part styling */
.part-display:has(.part-icon:contains('🍃')) {
    background: linear-gradient(135deg, rgba(34, 139, 34, 0.1), rgba(0, 128, 0, 0.1));
    border-color: rgba(34, 139, 34, 0.3);
}

.part-display:has(.part-icon:contains('🌸')) {
    background: linear-gradient(135deg, rgba(255, 192, 203, 0.1), rgba(255, 182, 193, 0.1));
    border-color: rgba(255, 192, 203, 0.3);
}

.part-display:has(.part-icon:contains('🌱')) {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.1), rgba(160, 82, 45, 0.1));
    border-color: rgba(139, 69, 19, 0.3);
}

.part-display:has(.part-icon:contains('🌳')) {
    background: linear-gradient(135deg, rgba(101, 67, 33, 0.1), rgba(139, 69, 19, 0.1));
    border-color: rgba(101, 67, 33, 0.3);
}

.part-display:has(.part-icon:contains('🌰')) {
    background: linear-gradient(135deg, rgba(210, 180, 140, 0.1), rgba(222, 184, 135, 0.1));
    border-color: rgba(210, 180, 140, 0.3);
}

.part-display:has(.part-icon:contains('🍇')) {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.1), rgba(153, 50, 204, 0.1));
    border-color: rgba(138, 43, 226, 0.3);
}

.part-display:has(.part-icon:contains('🫐')) {
    background: linear-gradient(135deg, rgba(25, 25, 112, 0.1), rgba(72, 61, 139, 0.1));
    border-color: rgba(25, 25, 112, 0.3);
}

.part-display:has(.part-icon:contains('🥔')) {
    background: linear-gradient(135deg, rgba(218, 165, 32, 0.1), rgba(184, 134, 11, 0.1));
    border-color: rgba(218, 165, 32, 0.3);
}

.part-display:has(.part-icon:contains('🧅')) {
    background: linear-gradient(135deg, rgba(255, 248, 220, 0.1), rgba(255, 228, 181, 0.1));
    border-color: rgba(255, 248, 220, 0.3);
}

.part-display:has(.part-icon:contains('🌿')) {
    background: linear-gradient(135deg, rgba(154, 205, 50, 0.1), rgba(124, 252, 0, 0.1));
    border-color: rgba(154, 205, 50, 0.3);
}

.part-display:has(.part-icon:contains('💧')) {
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.1), rgba(135, 206, 235, 0.1));
    border-color: rgba(0, 191, 255, 0.3);
}

/* Mobile responsiveness for parts used correspondence */
@media (max-width: 768px) {
    .part-display {
        padding: 0.8rem 1rem;
    }
    
    .part-header {
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .part-icon {
        font-size: 1.5rem;
    }
    
    .part-name {
        font-size: 1.1rem;
    }
    
    .part-meaning {
        font-size: 0.9rem;
    }
}

/* Enhanced Energetics Display Styles */
.energetics-card, .tissue-state-card, .constitution-card {
    background: linear-gradient(135deg, rgba(139, 148, 103, 0.1), rgba(168, 181, 130, 0.1));
    border: 2px solid rgba(139, 148, 103, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin: 0.5rem 0;
}

.energetics-header, .tissue-state-header, .constitution-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.energetics-icon, .tissue-state-icon, .constitution-icon {
    font-size: 1.8rem;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.energetics-name, .tissue-state-name, .constitution-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d5016;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.energetics-description, .tissue-state-description, .constitution-description {
    color: #4a5d3a;
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

.energetics-not-specified, .tissue-state-not-specified, .constitution-not-specified {
    color: #666;
    font-style: italic;
    margin: 0;
    font-size: 1.1rem;
}

/* Enhanced Celestial Display Styles */
.celestial-display {
    margin-top: 0.5rem;
}

.celestial-card {
    background: linear-gradient(135deg, rgba(139, 148, 103, 0.08), rgba(168, 181, 130, 0.08));
    border: 2px solid rgba(139, 148, 103, 0.25);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin: 0.3rem 0;
    transition: all 0.3s ease;
}

.celestial-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 148, 103, 0.15);
    border-color: rgba(139, 148, 103, 0.4);
}

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

.celestial-icon {
    font-size: 2rem;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 2rem;
}

.celestial-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d5016;
    letter-spacing: 0.3px;
}

.celestial-description {
    color: #4a5d3a;
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0;
}

.celestial-not-specified {
    color: #666;
    font-style: italic;
    margin: 0;
    font-size: 1.1rem;
}

/* Enhanced Dosage Display Styles */
.dosage-display {
    margin-top: 0.5rem;
}

.dosage-card {
    background: linear-gradient(135deg, rgba(139, 148, 103, 0.08), rgba(168, 181, 130, 0.08));
    border: 2px solid rgba(139, 148, 103, 0.25);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin: 0.3rem 0;
    transition: all 0.3s ease;
}

.dosage-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 148, 103, 0.15);
    border-color: rgba(139, 148, 103, 0.4);
}

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

.dosage-icon {
    font-size: 2rem;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 2rem;
}

.dosage-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d5016;
    letter-spacing: 0.3px;
}

.dosage-description {
    color: #4a5d3a;
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0 0 0.8rem 0;
    font-weight: 600;
}

.dosage-note {
    color: #5a6b4a;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    font-style: italic;
}

.dosage-not-specified {
    color: #666;
    font-style: italic;
    margin: 0;
    font-size: 1.1rem;
}

/* Compact Therapeutic Actions Display for Better Column Balance */
.therapeutic-actions-compact {
    display: grid;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.compact-action-item {
    background: linear-gradient(135deg, rgba(139, 148, 103, 0.06), rgba(168, 181, 130, 0.06));
    border: 1px solid rgba(139, 148, 103, 0.2);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    transition: all 0.3s ease;
}

.compact-action-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 148, 103, 0.12);
    border-color: rgba(139, 148, 103, 0.3);
}

.compact-action-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.compact-action-icon {
    font-size: 1.3rem;
    line-height: 1;
    min-width: 1.3rem;
}

.compact-action-name {
    font-size: 1rem;
    font-weight: 600;
    color: #2d5016;
    text-transform: capitalize;
}

.compact-action-desc {
    color: #4a5d3a;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

/* Safety & Compounds Combined Section */
.safety-compounds-section {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.compounds-subsection, .contraindications-subsection {
    background: rgba(248, 250, 245, 0.8);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(139, 148, 103, 0.15);
}

.compounds-subsection h4, .contraindications-subsection h4 {
    color: #2d5016;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.8rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.compounds-subsection h4::before {
    content: '⚗️';
    font-size: 1.2rem;
}

.contraindications-subsection h4::before {
    content: '⚠️';
    font-size: 1.2rem;
}

.compound-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.compound-tag {
    background: linear-gradient(45deg, rgba(139, 148, 103, 0.1), rgba(168, 181, 130, 0.1));
    color: #2d5016;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(139, 148, 103, 0.2);
    transition: all 0.3s ease;
}

.compound-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(139, 148, 103, 0.2);
}

.contraindications {
    margin: 0;
    padding-left: 1.2rem;
}

.contraindications li {
    color: #5a4a2a;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 0.4rem;
}

/* Enhanced Therapeutic Actions Display Styles (original detailed version) */
.therapeutic-actions-display {
    display: grid;
    gap: 1rem;
    margin-top: 0.5rem;
}

.therapeutic-action-card {
    background: linear-gradient(135deg, rgba(139, 148, 103, 0.08), rgba(168, 181, 130, 0.08));
    border: 2px solid rgba(139, 148, 103, 0.25);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin: 0.3rem 0;
    transition: all 0.3s ease;
}

.therapeutic-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 148, 103, 0.15);
    border-color: rgba(139, 148, 103, 0.4);
}

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

.action-icon {
    font-size: 2rem;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 2rem;
}

.action-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d5016;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

.action-definition {
    color: #5a6b4a;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.6rem 0;
    line-height: 1.5;
    font-style: italic;
}

.action-explanation {
    color: #4a5d3a;
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0;
}

.actions-not-specified {
    color: #666;
    font-style: italic;
    margin: 0;
    font-size: 1.1rem;
}

/* Mobile responsiveness for enhanced displays */
@media (max-width: 768px) {
    .energetics-card, .tissue-state-card, .constitution-card {
        padding: 0.8rem 1rem;
    }
    
    .energetics-header, .tissue-state-header, .constitution-header {
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .energetics-icon, .tissue-state-icon, .constitution-icon {
        font-size: 1.5rem;
    }
    
    .energetics-name, .tissue-state-name, .constitution-name {
        font-size: 1.1rem;
    }
    
    .energetics-description, .tissue-state-description, .constitution-description {
        font-size: 0.95rem;
    }
    
    /* Mobile responsiveness for celestial and dosage displays */
    .celestial-card, .dosage-card {
        padding: 1rem;
        margin: 0.25rem 0;
    }
    
    .celestial-header, .dosage-header {
        gap: 0.75rem;
        margin-bottom: 0.6rem;
    }
    
    .celestial-icon, .dosage-icon {
        font-size: 1.6rem;
        min-width: 1.6rem;
    }
    
    .celestial-name, .dosage-name {
        font-size: 1.2rem;
    }
    
    .celestial-description, .dosage-description {
        font-size: 0.95rem;
    }
    
    .dosage-note {
        font-size: 0.9rem;
    }
    
    /* Mobile responsiveness for compact therapeutic actions */
    .compact-action-item {
        padding: 0.6rem 0.8rem;
    }
    
    .compact-action-header {
        gap: 0.5rem;
        margin-bottom: 0.3rem;
    }
    
    .compact-action-icon {
        font-size: 1.1rem;
        min-width: 1.1rem;
    }
    
    .compact-action-name {
        font-size: 0.9rem;
    }
    
    .compact-action-desc {
        font-size: 0.85rem;
    }
    
    /* Mobile responsiveness for safety & compounds */
    .compounds-subsection, .contraindications-subsection {
        padding: 0.8rem;
    }
    
    .compounds-subsection h4, .contraindications-subsection h4 {
        font-size: 1rem;
        margin-bottom: 0.6rem;
    }
    
    .compound-tag {
        font-size: 0.8rem;
        padding: 0.25rem 0.6rem;
    }
    
    .contraindications li {
        font-size: 0.9rem;
    }
    
    /* Mobile responsiveness for therapeutic actions */
    .therapeutic-action-card {
        padding: 1rem;
        margin: 0.25rem 0;
    }
    
    .action-header {
        gap: 0.75rem;
        margin-bottom: 0.6rem;
    }
    
    .action-icon {
        font-size: 1.6rem;
        min-width: 1.6rem;
    }
    
    .action-name {
        font-size: 1.2rem;
    }
    
    .action-definition {
        font-size: 1rem;
        margin: 0 0 0.5rem 0;
    }
    
    .action-explanation {
        font-size: 0.95rem;
    }
}

/* Herbal Terminology Tooltip Styles */
.herbal-term {
    color: #1a5c2e;
    font-weight: 600;
    border-bottom: 1px dotted #4a7c59;
    cursor: help;
    position: relative;
    transition: all 0.3s ease;
}

.herbal-term:hover {
    color: #2d5016;
    border-bottom-color: #2d5016;
    background: rgba(139, 148, 103, 0.15);
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(139, 148, 103, 0.2);
}

/* Enhanced visibility for terminology links in Active Compounds section */
.herb-detail-sections .herbal-term {
    color: #0f4a1f;
    font-weight: 700;
    border-bottom: 2px dotted #4a7c59;
}

.herb-detail-sections .herbal-term:hover {
    color: #333333;
    background: linear-gradient(45deg, #e8e8e8, #d0d0d0);
    border-bottom-color: transparent;
    padding: 0.2rem 0.4rem;
    border-radius: 5px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.herbal-tooltip {
    position: fixed;
    background: linear-gradient(135deg, #2d5016, #4a7c59);
    color: white;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
    max-width: 300px;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

.herbal-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #2d5016;
}

.herbal-tooltip.tooltip-below::before {
    top: -12px;
    border-top-color: transparent;
    border-bottom-color: #2d5016;
}

/* Mobile tooltip adjustments */
@media (max-width: 768px) {
    .herbal-tooltip {
        max-width: 250px;
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }
    
    .herbal-term {
        padding: 0.2rem 0.3rem;
        margin: 0.1rem;
        display: inline-block;
        border-radius: 4px;
        background: rgba(139, 148, 103, 0.15);
        border-bottom: none;
    }
    
    .herbal-term:hover {
        background: rgba(139, 148, 103, 0.25);
    }
}

.chat-input-container {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid rgba(139, 148, 103, 0.2);
    background: rgba(248, 249, 250, 0.5);
}

.chat-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.save-chat-btn, .clear-chat-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.save-chat-btn {
    background: linear-gradient(45deg, #8b9467, #a8b582);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 148, 103, 0.3);
}

.clear-chat-btn {
    background: linear-gradient(45deg, #ff8c42, #ffab66);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 140, 66, 0.3);
}

.save-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 148, 103, 0.4);
}

.clear-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.4);
}

#chatInput {
    flex: 1;
    padding: 1rem;
    border: 2px solid #8b9467;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    transition: border-color 0.3s ease;
}

#chatInput:focus {
    outline: none;
    border-color: #2d5016;
    box-shadow: 0 0 0 3px rgba(139, 148, 103, 0.1);
}

#sendChatBtn {
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #8b9467, #a8b582);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

#sendChatBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 148, 103, 0.4);
}

#sendChatBtn:disabled {
    opacity: 1;
    cursor: not-allowed;
    background: linear-gradient(45deg, #ff8c42, #ffab42, #ffc947) !important;
    animation: strongPulse 0.8s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(255, 140, 66, 0.6);
    transform: scale(1);
}

/* Voice Control Panel Styles */
.voice-control-panel {
    background: linear-gradient(135deg, rgba(139, 148, 103, 0.1), rgba(168, 181, 130, 0.15));
    border: 2px solid rgba(139, 148, 103, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.voice-btn, .speak-btn {
    background: linear-gradient(135deg, #8b9467, #a8b582);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 148, 103, 0.3);
    min-width: 140px;
}

.voice-btn:hover, .speak-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 148, 103, 0.4);
}

.voice-btn.listening {
    background: linear-gradient(135deg, #ff4757, #ff6b7a);
    animation: pulse 1.5s ease-in-out infinite;
}

.speak-btn.enabled {
    background: linear-gradient(135deg, #2ed573, #7bed9f);
}

.voice-status {
    flex: 1;
    font-size: 0.9rem;
    color: #4a5d3a;
    font-style: italic;
    min-width: 200px;
    text-align: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    border: 1px solid rgba(139, 148, 103, 0.2);
}

.voice-status.listening {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.1), rgba(255, 107, 122, 0.1));
    border-color: rgba(255, 71, 87, 0.3);
    color: #c23616;
}

.voice-status.processing {
    background: linear-gradient(135deg, rgba(255, 140, 66, 0.1), rgba(255, 193, 7, 0.1));
    border-color: rgba(255, 140, 66, 0.3);
    color: #e55039;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Mobile responsiveness for voice controls */
@media (max-width: 768px) {
    .voice-control-panel {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .voice-btn, .speak-btn {
        width: 100%;
        max-width: 200px;
        margin: 0.3rem 0;
    }
    
    .voice-status {
        width: 100%;
        min-width: auto;
        margin-top: 0.5rem;
    }
}

.loading-spinner {
    animation: strongPulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes strongPulse {
    0% { 
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 15px rgba(255, 140, 66, 0.6);
    }
    25% {
        opacity: 0.8;
        transform: scale(1.08);
        box-shadow: 0 0 25px rgba(255, 140, 66, 0.9);
    }
    50% { 
        opacity: 0.6;
        transform: scale(1.15);
        box-shadow: 0 0 35px rgba(255, 140, 66, 1.2);
    }
    75% {
        opacity: 0.8;
        transform: scale(1.08);
        box-shadow: 0 0 25px rgba(255, 140, 66, 0.9);
    }
    100% { 
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 15px rgba(255, 140, 66, 0.6);
    }
}

.quick-questions {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(139, 148, 103, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-height: 600px;
    overflow-y: auto;
}

.quick-questions h4 {
    color: #2d5016;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid rgba(139, 148, 103, 0.3);
    padding-bottom: 0.5rem;
}

.quick-btn {
    background: rgba(139, 148, 103, 0.1);
    border: 1px solid rgba(139, 148, 103, 0.3);
    color: #2d5016;
    padding: 0.7rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    margin: 0.25rem;
    transition: all 0.3s ease;
    display: inline-block;
    font-weight: 500;
    text-align: center;
    min-width: 140px;
}

.quick-btn:hover {
    background: linear-gradient(45deg, #8b9467, #a8b582);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 148, 103, 0.3);
}

/* Quick Questions Organization */
.quick-questions div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.quick-questions div:last-child {
    margin-bottom: 0;
}

/* Category styling through comments (invisible to users but organized in code) */

/* Message Action Buttons - Old inline version (hidden) */
.message-actions {
    display: none; /* Hide old inline actions */
}

/* New Message Actions Below Frame */
.message-actions-below {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    justify-content: center;
    padding: 0.5rem;
    background: rgba(139, 148, 103, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(139, 148, 103, 0.15);
    flex-wrap: wrap;
}

/* Message Wrapper for External Actions */
.message-wrapper {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
}

/* External Action Buttons - Completely Outside Message Frame */
.message-actions-external {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.5rem;
    background: rgba(139, 148, 103, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(139, 148, 103, 0.2);
    flex-wrap: wrap;
    margin: 0.75rem 0 0 0;
    max-width: 100%;
    clear: both;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(139, 148, 103, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #2d5016;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.action-btn:hover {
    background: linear-gradient(45deg, #8b9467, #a8b582);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(139, 148, 103, 0.3);
}

.copy-btn:hover {
    background: linear-gradient(45deg, #4a90e2, #357abd);
}

.save-btn:hover {
    background: linear-gradient(45deg, #8b9467, #a8b582);
}

.download-btn:hover {
    background: linear-gradient(45deg, #6c757d, #5a6268);
}

/* Mobile responsive action buttons */
@media (max-width: 768px) {
    .message-actions-below,
    .message-actions-external {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.4rem;
        max-width: 100%;
        margin: 0;
    }
    
    .action-btn {
        flex: 0 1 auto;
        font-size: 0.75rem;
        padding: 0.35rem 0.7rem;
    }
    
    .message-wrapper {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
}

/* Responsive adjustments for AI Assistant */
@media (max-width: 768px) {
    .assistant-container h2 {
        font-size: 2rem;
    }
    
    .message-content {
        max-width: 90%;
    }
    
    .assistant-message .message-content.ai-enhanced {
        padding: 1rem 1.2rem;
    }
    
    .ai-enhanced .ai-heading {
        font-size: 1.2rem;
    }
    
    .ai-enhanced .ai-subheading {
        font-size: 1rem;
    }
    
    .ai-enhanced .ai-paragraph {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .chat-input-container {
        flex-direction: column;
    }
    
    .message-actions {
        justify-content: center;
    }
    
    .action-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .quick-btn {
        display: inline-block;
        width: calc(50% - 0.5rem);
        margin: 0.25rem;
        min-width: auto;
        font-size: 0.8rem;
        padding: 0.6rem 0.4rem;
        text-align: center;
    }
    
    .quick-questions {
        max-height: 400px;
        padding: 1.5rem;
    }
    
    .quick-questions div {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        margin-bottom: 1rem;
        gap: 0.25rem;
    }
}

/* Herb Detail Page Styles */
.back-btn {
    background: rgba(139, 148, 103, 0.1);
    border: 1px solid rgba(139, 148, 103, 0.3);
    color: #2d5016;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.back-btn:hover {
    background: linear-gradient(45deg, #8b9467, #a8b582);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 148, 103, 0.3);
}

.herb-detail-container {
    max-width: 1000px;
    margin: 0 auto;
}

.herb-detail-header {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(139, 148, 103, 0.2);
}

.herb-detail-image {
    flex: 0 0 300px;
}

.herb-detail-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    background: linear-gradient(135deg, #f5f7f0, #e8ede0);
}

.herb-detail-image img.loaded {
    opacity: 1;
}

.herb-detail-image img.error {
    opacity: 1;
    background: linear-gradient(135deg, #f5f7f0, #e8ede0);
    position: relative;
}

.herb-detail-image img.error::after {
    content: attr(alt);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
}

.herb-detail-info {
    flex: 1;
}

.herb-detail-info h1 {
    font-size: 2.5rem;
    color: #1a2e0f;
    margin-bottom: 0.8rem;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.8);
}

.botanical-name {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 0.8rem;
    font-style: italic;
}

.family {
    font-size: 1rem;
    color: #2d5016;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.common-names {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 0;
}

.herb-detail-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.detail-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.8rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(139, 148, 103, 0.2);
}

.detail-section p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
}

.detail-section h3 {
    color: #1a2e0f;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.8);
}

.detail-section ul {
    list-style: none;
    padding: 0;
}

.detail-section li {
    background: rgba(139, 148, 103, 0.1);
    padding: 0.8rem;
    margin: 0.4rem 0;
    border-radius: 8px;
    border-left: 4px solid #8b9467;
    font-size: 1.1rem;
    line-height: 1.5;
}

.contraindications li {
    background: rgba(220, 53, 69, 0.1);
    border-left-color: #dc3545;
}

.action-tags, .compound-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.action-tag, .compound-tag {
    background: linear-gradient(45deg, #8b9467, #a8b582);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(139, 148, 103, 0.3);
}

.compound-tag {
    background: linear-gradient(45deg, #6c757d, #5a6268);
}

.herb-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.herb-actions .star-favorite-btn {
    padding: 0.5rem;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    background: linear-gradient(45deg, #87CEEB, #4682B4);
    color: white;
    box-shadow: 0 4px 15px rgba(135, 206, 235, 0.3);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.herb-actions .star-favorite-btn.favorited {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.herb-actions .ai-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    min-width: 120px;
}

.herb-actions .ai-btn {
    background: linear-gradient(45deg, #8b9467, #a8b582);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 148, 103, 0.3);
}

.herb-actions .star-favorite-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 20px rgba(135, 206, 235, 0.5);
}

.herb-actions .star-favorite-btn.favorited:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.herb-actions .ai-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 148, 103, 0.4);
}

/* Responsive Design for Herb Detail Page */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    main {
        padding: 2rem 1rem;
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    .herb-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1rem;
        max-width: 100%;
    }
    
    .herb-detail-header {
        flex-direction: column;
        text-align: center;
    }
    
    .herb-detail-image {
        flex: none;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .herb-detail-info h1 {
        font-size: 2rem;
    }
    
    .herb-detail-sections {
        grid-template-columns: 1fr;
    }
    
    .herb-actions {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .herb-actions .star-favorite-btn {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .herb-actions .ai-btn {
        width: 100%;
        max-width: 250px;
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        min-width: auto;
    }
    
    .back-btn {
        width: 100%;
        max-width: 250px;
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        text-align: center;
        margin: 0 auto 2rem auto;
        display: block;
    }
    
    #herbDetailPage .container {
        padding: 1rem;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .herb-detail-container {
        padding: 0;
        width: 100%;
    }
    
    /* Modal Mobile Responsiveness */
    .modal-content {
        max-width: calc(100vw - 2rem);
        margin: 1rem;
        padding: 1.5rem;
        max-height: 90vh;
    }
    
    .modal-content h3 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .modal-content .botanical {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .modal-content .uses {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .modal-content .spiritual {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .modal-content .preparations {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .modal-content .contraindications {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .close {
        top: 1rem;
        right: 1rem;
        font-size: 2rem;
        width: 35px;
        height: 35px;
    }
    
    /* Footer Mobile Responsiveness */
    .footer-nav {
        gap: 0.8rem;
        justify-content: space-around;
    }
    
    .footer-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.6rem;
    }
    
    .chat-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .save-chat-btn, .clear-chat-btn {
        width: 100%;
        max-width: 250px;
    }
    
    /* Oracle Card Mobile Responsiveness */
    .oracle-card {
        width: 260px;
        height: 380px;
    }
    
    .card-back::after {
        font-size: 1rem;
        bottom: 20px;
    }
    
    .drawn-card h3 {
        font-size: 1.2rem;
    }
    
    .drawn-card .botanical {
        font-size: 0.8rem;
    }
    
    .drawn-card .spiritual,
    .drawn-card #cardMessage {
        font-size: 0.75rem;
        line-height: 1.3;
    }
}

/* Energy Wheel Styles */
.energy-wheel-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.wheel-frame {
    position: relative;
    width: 600px;
    height: 600px;
    margin: 2rem auto;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(139,148,103,0.2) 40%, transparent 70%);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 50px rgba(139,148,103,0.3), inset 0 0 50px rgba(255,255,255,0.1);
    overflow: hidden;
}

.energy-wheel-main {
    position: relative;
    width: 100%;
    height: 100%;
    animation: wheelRotate 60s linear infinite;
}

@keyframes wheelRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.energy-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.energy-ring {
    position: absolute;
    border: 1px solid rgba(139,148,103,0.3);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: ringPulse 8s ease-in-out infinite;
}

.energy-ring.ring-1 { 
    width: 200px; 
    height: 200px; 
    animation-delay: 0s;
    border-color: rgba(255,215,0,0.4);
}
.energy-ring.ring-2 { 
    width: 350px; 
    height: 350px; 
    animation-delay: 2.5s;
    border-color: rgba(139,148,103,0.4);
}
.energy-ring.ring-3 { 
    width: 500px; 
    height: 500px; 
    animation-delay: 5s;
    border-color: rgba(255,255,255,0.3);
}

@keyframes ringPulse {
    0%, 100% { 
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.center-crystal {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255,255,255,0.9), rgba(255,215,0,0.6));
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(255,215,0,0.6);
    animation: crystalPulse 4s ease-in-out infinite;
    z-index: 10;
}

@keyframes crystalPulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 30px rgba(255,215,0,0.6);
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.2);
        box-shadow: 0 0 50px rgba(255,215,0,0.8);
    }
}

.herb-point {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 0 15px rgba(139,148,103,0.6);
    z-index: 20;
    animation: herbFloat 6s ease-in-out infinite;
}

@keyframes herbFloat {
    0%, 100% { transform: translate(-50%, -50%) translateY(0px); }
    50% { transform: translate(-50%, -50%) translateY(-5px); }
}

.herb-point:hover {
    width: 24px;
    height: 24px;
    box-shadow: 0 0 25px rgba(139,148,103,0.8);
    z-index: 30;
    animation: none;
    transform: translate(-50%, -50%) scale(1.2);
}

.herb-point.active {
    width: 28px;
    height: 28px;
    box-shadow: 0 0 35px rgba(255,215,0,0.9);
    z-index: 40;
    animation: activeHerbPulse 2s ease-in-out infinite;
}

@keyframes activeHerbPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1.2); }
    50% { transform: translate(-50%, -50%) scale(1.4); }
}

.herb-point.fire { background: radial-gradient(circle, #ff6b35, #f7931e); }
.herb-point.water { background: radial-gradient(circle, #4facfe, #00f2fe); }
.herb-point.earth { background: radial-gradient(circle, #8b4513, #daa520); }
.herb-point.air { background: radial-gradient(circle, #e0e0e0, #ffffff); }

.energy-connection {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.6), transparent);
    transform-origin: left center;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    z-index: 5;
}

.energy-connection.active {
    opacity: 1;
    animation: energyFlow 3s ease-in-out infinite;
}

@keyframes energyFlow {
    0%, 100% { 
        background: linear-gradient(90deg, transparent, rgba(139,148,103,0.4), transparent);
    }
    50% { 
        background: linear-gradient(90deg, transparent, rgba(255,215,0,0.8), transparent);
    }
}

.wheel-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 2rem 0;
    gap: 2rem;
}

.element-filters h3 {
    color: #2d5016;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.element-filter-btn {
    padding: 0.8rem 1.2rem;
    border: 2px solid transparent;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
}

.element-filter-btn.fire { border-color: #ff6b35; color: #ff6b35; }
.element-filter-btn.water { border-color: #4facfe; color: #4facfe; }
.element-filter-btn.earth { border-color: #8b4513; color: #8b4513; }
.element-filter-btn.air { border-color: #e0e0e0; color: #666; }
.element-filter-btn.all { border-color: #8b9467; color: #2d5016; }

.element-filter-btn.active {
    background: linear-gradient(45deg, #8b9467, #a8b582);
    color: white;
    border-color: #8b9467;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139,148,103,0.3);
}

.wheel-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.wheel-btn {
    padding: 0.8rem 1.5rem;
    background: linear-gradient(45deg, #8b9467, #a8b582);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(139,148,103,0.2);
}

.wheel-btn:hover {
    background: linear-gradient(45deg, #2d5016, #3d6b1f);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45,80,22,0.4);
}

.herb-info-card {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid rgba(139,148,103,0.2);
    opacity: 0.7;
    transition: all 0.4s ease;
}

.herb-info-card.active {
    opacity: 1;
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.herb-info-card h3 {
    color: #2d5016;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    text-align: center;
}

.herb-details {
    margin-bottom: 1.5rem;
}

.herb-details p {
    margin: 0.8rem 0;
    color: #333;
    line-height: 1.6;
}

.herb-details strong {
    color: #2d5016;
}

.herb-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

.herb-action-btn {
    padding: 0.6rem 1.2rem;
    background: linear-gradient(45deg, #8b9467, #a8b582);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 500;
}

.herb-action-btn:hover {
    background: linear-gradient(45deg, #2d5016, #3d6b1f);
    transform: translateY(-2px);
}

.herb-tooltip {
    position: absolute;
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-size: 0.85rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 100;
    border: 1px solid rgba(139,148,103,0.5);
}

.herb-tooltip.visible {
    opacity: 1;
}

/* Mobile responsiveness for energy wheel */
@media (max-width: 768px) {
    .wheel-frame {
        width: 400px;
        height: 400px;
    }
    
    .energy-ring.ring-1 { width: 140px; height: 140px; }
    .energy-ring.ring-2 { width: 240px; height: 240px; }
    .energy-ring.ring-3 { width: 340px; height: 340px; }
    
    .wheel-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .herb-info-card {
        margin: 1rem;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .wheel-frame {
        width: 300px;
        height: 300px;
    }
    
    .energy-ring.ring-1 { width: 100px; height: 100px; }
    .energy-ring.ring-2 { width: 180px; height: 180px; }
    .energy-ring.ring-3 { width: 260px; height: 260px; }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .element-filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}