/* ========================================
   ELpop Home Assistant - Frontend CSS v2
   Dark theme + Neumorphism + Glow + Stars
   ======================================== */

/* === ROOT / WRAPPER === */
.elpop-home-assistant {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        border-radius: var(--eha-radius, 14px);
        border: 10px solid var(--eha-wrapper-border-10px, #0a0e27);
        background: linear-gradient(135deg, #0a0e27 0%, #1a1040 35%, #0d1b3e 70%, #0a0e27 100%);
        color: var(--eha-text, #e5e7eb);
        font-family: var(--eha-font-family, inherit);
        font-size: var(--eha-font-size-base, 16px);
        box-sizing: border-box;
        position: relative;
        overflow-x: hidden;
        overflow-y: auto;
        min-height: 100vh;
}

/* Mobile: remove heavy border, reduce radius */
@media (max-width: 720px) {
        .elpop-home-assistant {
                border-width: 4px;
                border-radius: 8px;
        }
}

/* Stars Canvas */
.elpop-home-assistant .eha-stars-canvas {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        z-index: 0;
}

.elpop-home-assistant > *:not(.eha-stars-canvas):not(.eha-modal) {
        position: relative;
        z-index: 1;
}

/* Modal must always use fixed positioning */
.elpop-home-assistant .eha-modal {
        position: fixed !important;
        z-index: 9999999;
}

/* === SECTION BASE === */
.elpop-home-assistant .eha-section {
        padding: 40px 24px;
        max-width: 1200px;
        margin: 0 auto;
        border-bottom: 1px solid var(--eha-section-divider, rgba(255, 255, 255, 0.06));
        box-sizing: border-box;
        width: 100%;
        clear: both;
        position: relative;
        overflow: visible;
}

.elpop-home-assistant .eha-section:last-of-type {
        border-bottom: none;
}

/* Ensure spacing between consecutive sections */
.elpop-home-assistant .eha-section + .eha-section {
        margin-top: 16px;
}

/* CRITICAL: Prevent overlap between most-viewed, tools, and cat-tools sections */
.elpop-home-assistant .eha-most-viewed-section + .eha-tools-section,
.elpop-home-assistant .eha-most-viewed-section + .eha-ad + .eha-tools-section,
.elpop-home-assistant .eha-tools-section + .eha-cat-tools-section,
.elpop-home-assistant .eha-tools-section + .eha-ad + .eha-cat-tools-section,
.elpop-home-assistant .eha-most-viewed-section + .eha-cat-tools-section {
        margin-top: 0;
        clear: both;
}

/* Ensure sections with ad slots between them don't overlap */
.elpop-home-assistant .eha-section + .eha-ad {
        clear: both;
}
.elpop-home-assistant .eha-ad + .eha-section {
        clear: both;
        margin-top: 8px;
}

/* Shortcuts section has less padding */
.elpop-home-assistant .eha-shortcuts-section {
        padding: 16px 24px;
}
.elpop-home-assistant .eha-shortcuts-section + .eha-section {
        margin-top: 8px;
}

.elpop-home-assistant .eha-title {
        font-size: 28px;
        line-height: 1.4;
        margin: 0 0 24px 0;
        font-weight: 800;
        color: var(--eha-title-color, #f1f5f9);
        text-align: center;
}

/* === ANIMATIONS === */
@keyframes eha-fade-up {
        from { opacity: 0; transform: translateY(30px); }
        to { opacity: 1; transform: translateY(0); }
}

@keyframes eha-fade-down {
        from { opacity: 0; transform: translateY(-30px); }
        to { opacity: 1; transform: translateY(0); }
}

@keyframes eha-fade-in {
        from { opacity: 0; }
        to { opacity: 1; }
}

.elpop-home-assistant.eha-effects--animate .eha-animate-item {
        opacity: 0;
}

.elpop-home-assistant.eha-effects--animate .eha-animate-item.eha-visible {
        opacity: 1;
}

.elpop-home-assistant.eha-effects--animate .eha-animate-item.eha-visible[data-animate="fade-up"] {
        animation: eha-fade-up 0.6s ease-out forwards;
}

.elpop-home-assistant.eha-effects--animate .eha-animate-item.eha-visible[data-animate="fade-down"] {
        animation: eha-fade-down 0.6s ease-out forwards;
}

.elpop-home-assistant.eha-effects--animate .eha-animate-item.eha-visible[data-animate="fade-in"] {
        animation: eha-fade-in 0.6s ease-out forwards;
}

/* Existing animation effects preserved */
@keyframes eha-pulse {
        0% { transform: translateY(0); }
        50% { transform: translateY(-2px); }
        100% { transform: translateY(0); }
}

@keyframes eha-float {
        0% { transform: translateY(0); }
        50% { transform: translateY(-6px); }
        100% { transform: translateY(0); }
}

@keyframes eha-shine {
        0% { box-shadow: 0 0 var(--eha-neon-blur, 20px) var(--eha-neon-color, #60a5fa); }
        50% { box-shadow: 0 0 calc(var(--eha-neon-blur, 20px) * 1.2) var(--eha-neon-color, #60a5fa); }
        100% { box-shadow: 0 0 var(--eha-neon-blur, 20px) var(--eha-neon-color, #60a5fa); }
}

.elpop-home-assistant.eha-effects--animate.eha-anim--pulse .eha-tool-card,
.elpop-home-assistant.eha-effects--animate.eha-anim--pulse .eha-btn {
        animation: eha-pulse 2.3s ease-in-out infinite;
}

.elpop-home-assistant.eha-effects--animate.eha-anim--float .eha-tool-card {
        animation: eha-float 3.2s ease-in-out infinite;
}

.elpop-home-assistant.eha-effects--animate.eha-anim--shine .eha-btn {
        animation: eha-shine 2s ease-in-out infinite;
}

/* === NEUMORPHISM CARD STYLE === */
.eha-neu-card {
        background: linear-gradient(145deg, rgba(30, 25, 60, 0.8), rgba(15, 12, 35, 0.9));
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 16px;
        box-shadow:
                6px 6px 12px rgba(0, 0, 0, 0.5),
                -3px -3px 8px rgba(255, 255, 255, 0.03);
        transition: all 0.3s ease;
}

.eha-neu-card:hover {
        border-color: rgba(255, 255, 255, 0.15);
        box-shadow:
                6px 6px 12px rgba(0, 0, 0, 0.5),
                -3px -3px 8px rgba(255, 255, 255, 0.03),
                0 0 20px rgba(100, 150, 255, 0.1);
}

/* Glow on hover */
.elpop-home-assistant.eha-effects--glow .eha-neu-card:hover {
        box-shadow:
                6px 6px 12px rgba(0, 0, 0, 0.5),
                -3px -3px 8px rgba(255, 255, 255, 0.03),
                0 0 var(--eha-glow-blur, 26px) var(--eha-glow-color, rgba(34, 197, 94, 0.3));
}

/* === HEADER SECTION === */
.elpop-home-assistant .eha-header-section {
        padding: 60px 24px 40px;
        text-align: center;
}

.elpop-home-assistant .eha-header-title {
        font-size: 42px;
        font-weight: 900;
        background: linear-gradient(135deg, #22c55e, #facc15);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        color: transparent;
        margin: 0 0 12px 0;
        text-shadow: none;
        letter-spacing: -0.5px;
}

.elpop-home-assistant .eha-header-subtitle {
        font-size: 18px;
        color: rgba(255, 255, 255, 0.75);
        margin: 0;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
        line-height: 1.6;
}

/* Header mobile responsive */
@media (max-width: 720px) {
        .elpop-home-assistant .eha-header-section {
                padding: 36px 16px 24px;
        }
}

@media (max-width: 480px) {
        .elpop-home-assistant .eha-header-section {
                padding: 28px 12px 20px;
        }
}

.elpop-home-assistant .eha-back-link {
        display: block;
        text-align: center;
        color: #ef4444;
        font-size: 14px;
        font-weight: 700;
        text-decoration: none;
        margin-bottom: 16px;
        transition: color 0.3s;
}

.elpop-home-assistant .eha-back-link:hover {
        color: #f87171;
}

/* === SEARCH SECTION === */
.elpop-home-assistant .eha-search-title {
        margin-bottom: 20px;
}

.elpop-home-assistant .eha-search-box {
        max-width: 700px;
        margin: 0 auto;
}

/* Search section mobile responsive */
@media (max-width: 720px) {
        .elpop-home-assistant .eha-search-section {
                padding: 28px 16px;
        }
}

@media (max-width: 480px) {
        .elpop-home-assistant .eha-search-section {
                padding: 20px 12px;
        }
}

.elpop-home-assistant .eha-input {
        width: 100%;
        resize: vertical;
        padding: 16px 18px;
        border-radius: 14px;
        background: var(--eha-form-bg, rgba(10, 15, 40, 0.85));
        border: 1px solid var(--eha-form-border, rgba(255, 255, 255, 0.12));
        color: var(--eha-form-text, #fff);
        outline: none;
        font-size: 16px;
        box-shadow:
                inset 3px 3px 6px rgba(0, 0, 0, 0.4),
                inset -2px -2px 4px rgba(255, 255, 255, 0.02);
        transition: border-color 0.3s, box-shadow 0.3s;
}

.elpop-home-assistant .eha-input:focus {
        border-color: rgba(100, 150, 255, 0.4);
        box-shadow:
                inset 3px 3px 6px rgba(0, 0, 0, 0.4),
                inset -2px -2px 4px rgba(255, 255, 255, 0.02),
                0 0 15px rgba(100, 150, 255, 0.15);
}

.elpop-home-assistant .eha-search-controls {
        margin-top: 14px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        align-items: center;
}

.elpop-home-assistant .eha-search-execute-btn {
        grid-column: 1 / -1;
        width: 100%;
        padding: 14px;
        font-size: 17px;
        font-weight: 800;
        border-radius: 14px;
        background: linear-gradient(135deg, var(--eha-btn-recommend-bg, #2563eb), #1d4ed8);
        color: var(--eha-btn-recommend-text, #ffffff);
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow:
                4px 4px 10px rgba(0, 0, 0, 0.4),
                -2px -2px 6px rgba(255, 255, 255, 0.03);
}

.elpop-home-assistant .eha-search-execute-btn:hover {
        transform: translateY(-2px);
        box-shadow:
                4px 4px 10px rgba(0, 0, 0, 0.4),
                -2px -2px 6px rgba(255, 255, 255, 0.03),
                0 0 20px rgba(37, 99, 235, 0.4);
}

.elpop-home-assistant .eha-select {
        width: 100%;
        padding: 12px 14px;
        border-radius: 12px;
        background: var(--eha-form-bg, rgba(10, 15, 40, 0.85));
        border: 1px solid var(--eha-form-border, rgba(255, 255, 255, 0.12));
        color: var(--eha-form-text, #fff);
        font-size: 14px;
}

/* Shortcuts Section (below header) */
.elpop-home-assistant .eha-shortcuts-section {
        padding: 20px 24px;
}
.elpop-home-assistant .eha-shortcuts-section .eha-shortcuts {
        margin-top: 0;
}

/* Shortcuts (Chips) */
.elpop-home-assistant .eha-shortcuts {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
}

.elpop-home-assistant .eha-shortcut-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 16px;
        border-radius: 50px;
        background: rgba(30, 25, 60, 0.7);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #e5e7eb;
        text-decoration: none;
        font-size: 14px;
        font-weight: 600;
        transition: all 0.3s ease;
        box-shadow:
                3px 3px 6px rgba(0, 0, 0, 0.3),
                -2px -2px 4px rgba(255, 255, 255, 0.02);
}

.elpop-home-assistant .eha-shortcut-chip:hover {
        border-color: rgba(100, 150, 255, 0.3);
        box-shadow:
                3px 3px 6px rgba(0, 0, 0, 0.3),
                -2px -2px 4px rgba(255, 255, 255, 0.02),
                0 0 12px rgba(100, 150, 255, 0.2);
        transform: translateY(-2px);
        color: #fff;
}

.elpop-home-assistant .eha-shortcut-emoji {
        font-size: 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.08);
}

.elpop-home-assistant .eha-shortcut-text {
        font-size: 13px;
}

/* Recommendation area */
.elpop-home-assistant .eha-recommendation,
.elpop-home-assistant .eha-alternatives {
        margin-top: 16px;
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
}

.eha-rec {
        padding: 16px;
        border-radius: 14px;
        border: 1px solid rgba(255, 255, 255, 0.10);
        background: rgba(20, 15, 50, 0.6);
        box-shadow:
                4px 4px 10px rgba(0, 0, 0, 0.4),
                -2px -2px 6px rgba(255, 255, 255, 0.02);
}
.eha-rec__name { font-weight: 800; margin-bottom: 8px; color: #fff; }
.eha-rec__desc { color: rgba(255, 255, 255, 0.75); margin-bottom: 12px; }

.eha-alt__wrap { display: grid; grid-template-columns: 1fr; gap: 10px; }
.eha-alt {
        padding: 12px 14px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.10);
        background: rgba(20, 15, 50, 0.4);
}
.eha-alt__title { font-weight: 800; color: #fff; margin-bottom: 4px; }
.eha-alt__desc { color: rgba(255, 255, 255, 0.75); margin-bottom: 8px; }
.eha-alt__link { color: var(--eha-link-color, #93c5fd); text-decoration: underline; font-weight: 700; }

/* === TOOLS GRID === */
.elpop-home-assistant .eha-tools-section {
        position: relative;
        overflow: visible;
        clear: both;
}

.elpop-home-assistant .eha-tools-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
}

/* Tools section mobile responsive */
@media (max-width: 720px) {
        .elpop-home-assistant .eha-tools-section {
                padding: 28px 16px;
        }
}

@media (max-width: 480px) {
        .elpop-home-assistant .eha-tools-section {
                padding: 20px 12px;
        }
}

.elpop-home-assistant .eha-tool-card {
        background: linear-gradient(145deg, rgba(30, 25, 60, 0.8), rgba(15, 12, 35, 0.9));
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 18px;
        overflow: hidden;
        box-shadow:
                6px 6px 12px rgba(0, 0, 0, 0.5),
                -3px -3px 8px rgba(255, 255, 255, 0.03);
        transition: all 0.3s ease;
}

.elpop-home-assistant .eha-tool-card:hover {
        transform: translateY(-4px);
        border-color: rgba(255, 255, 255, 0.18);
        box-shadow:
                6px 6px 12px rgba(0, 0, 0, 0.5),
                -3px -3px 8px rgba(255, 255, 255, 0.03),
                0 0 24px rgba(100, 150, 255, 0.15);
}

.elpop-home-assistant.eha-effects--glow .eha-tool-card:hover {
        box-shadow:
                6px 6px 12px rgba(0, 0, 0, 0.5),
                -3px -3px 8px rgba(255, 255, 255, 0.03),
                0 0 var(--eha-glow-blur, 26px) var(--eha-glow-color, rgba(34, 197, 94, 0.25));
}

.elpop-home-assistant .eha-tool-card-image {
        width: 100%;
        height: 160px;
        background-size: cover;
        background-position: center;
        border-radius: 18px 18px 0 0;
}

.elpop-home-assistant .eha-tool-card-body {
        padding: 18px;
        text-align: center;
}

.elpop-home-assistant .eha-tool-card-icon {
        font-size: 36px;
        width: 64px;
        height: 64px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 12px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.06);
        box-shadow:
                inset 2px 2px 4px rgba(0, 0, 0, 0.3),
                inset -1px -1px 3px rgba(255, 255, 255, 0.03);
}

.elpop-home-assistant .eha-tool-card-title {
        font-size: 16px;
        font-weight: 800;
        color: #ffffff;
        margin: 0 0 8px;
}

.elpop-home-assistant .eha-tool-card-desc {
        font-size: 13px;
        color: rgba(255, 255, 255, 0.65);
        margin: 0 0 16px;
        line-height: 1.5;
}

.elpop-home-assistant .eha-tool-card-btn {
        display: inline-block;
        padding: 10px 24px;
        border-radius: 12px;
        background: var(--eha-btn-open-bg, #22c55e);
        color: var(--eha-btn-open-text, #062113);
        font-weight: 700;
        text-decoration: none;
        font-size: 14px;
        transition: all 0.3s ease;
        box-shadow:
                3px 3px 8px rgba(0, 0, 0, 0.3),
                -2px -2px 4px rgba(255, 255, 255, 0.02);
}

.elpop-home-assistant .eha-tool-card-btn:hover {
        transform: translateY(-2px);
        box-shadow:
                3px 3px 8px rgba(0, 0, 0, 0.3),
                -2px -2px 4px rgba(255, 255, 255, 0.02),
                0 0 16px rgba(34, 197, 94, 0.35);
}

/* === POSTS GRID === */
.elpop-home-assistant .eha-posts-grid {
        display: grid;
        gap: 20px;
}

/* Posts section mobile responsive */
@media (max-width: 720px) {
        .elpop-home-assistant .eha-posts-section {
                padding: 28px 16px;
        }
}

@media (max-width: 480px) {
        .elpop-home-assistant .eha-posts-section {
                padding: 20px 12px;
        }
}

.elpop-home-assistant .eha-posts-cols-3 { grid-template-columns: repeat(3, 1fr); }
.elpop-home-assistant .eha-posts-cols-4 { grid-template-columns: repeat(4, 1fr); }
.elpop-home-assistant .eha-posts-cols-5 { grid-template-columns: repeat(5, 1fr); }

.elpop-home-assistant .eha-post-card {
        background: linear-gradient(145deg, rgba(30, 25, 60, 0.8), rgba(15, 12, 35, 0.9));
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 16px;
        overflow: hidden;
        box-shadow:
                5px 5px 10px rgba(0, 0, 0, 0.4),
                -3px -3px 6px rgba(255, 255, 255, 0.02);
        transition: all 0.3s ease;
}

.elpop-home-assistant .eha-post-card:hover {
        transform: translateY(-3px);
        border-color: rgba(255, 255, 255, 0.15);
        box-shadow:
                5px 5px 10px rgba(0, 0, 0, 0.4),
                -3px -3px 6px rgba(255, 255, 255, 0.02),
                0 0 16px rgba(100, 150, 255, 0.12);
}

.elpop-home-assistant .eha-post-card-image {
        width: 100%;
        height: 180px;
        overflow: hidden;
}

.elpop-home-assistant .eha-post-card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.4s ease;
}

.elpop-home-assistant .eha-post-card:hover .eha-post-card-image img {
        transform: scale(1.05);
}

.elpop-home-assistant .eha-post-card-body {
        padding: 16px;
}

.elpop-home-assistant .eha-post-card-title {
        font-size: 15px;
        font-weight: 800;
        margin: 0 0 8px;
        line-height: 1.4;
}

.elpop-home-assistant .eha-post-card-title a {
        color: #ffffff;
        text-decoration: none;
        transition: color 0.3s;
}

.elpop-home-assistant .eha-post-card-title a:hover {
        color: var(--eha-link-color, #93c5fd);
}

.elpop-home-assistant .eha-post-card-excerpt {
        font-size: 13px;
        color: rgba(255, 255, 255, 0.6);
        margin: 0 0 12px;
        line-height: 1.5;
}

.elpop-home-assistant .eha-btn-read-more {
        display: inline-block;
        padding: 8px 18px;
        border-radius: 10px;
        background: rgba(100, 150, 255, 0.15);
        border: 1px solid rgba(100, 150, 255, 0.25);
        color: var(--eha-link-color, #93c5fd);
        font-size: 13px;
        font-weight: 700;
        text-decoration: none;
        transition: all 0.3s ease;
}

.elpop-home-assistant .eha-btn-read-more:hover {
        background: rgba(100, 150, 255, 0.25);
        border-color: rgba(100, 150, 255, 0.4);
        box-shadow: 0 0 12px rgba(100, 150, 255, 0.15);
}

/* === TOOL TYPE BADGE === */
.elpop-home-assistant .eha-tool-type-badge {
        display: inline-block;
        padding: 3px 10px;
        border-radius: 20px;
        font-size: 11px;
        font-weight: 700;
        margin-bottom: 8px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
}

.elpop-home-assistant .eha-tool-type-video { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.elpop-home-assistant .eha-tool-type-image { background: rgba(34, 197, 94, 0.15); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.3); }
.elpop-home-assistant .eha-tool-type-audio { background: rgba(168, 85, 247, 0.15); color: #c4b5fd; border: 1px solid rgba(168, 85, 247, 0.3); }
.elpop-home-assistant .eha-tool-type-text { background: rgba(96, 165, 250, 0.15); color: #93c5fd; border: 1px solid rgba(96, 165, 250, 0.3); }
.elpop-home-assistant .eha-tool-type-ai { background: rgba(245, 158, 11, 0.15); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.3); }
.elpop-home-assistant .eha-tool-type-social { background: rgba(236, 72, 153, 0.15); color: #f9a8d4; border: 1px solid rgba(236, 72, 153, 0.3); }
.elpop-home-assistant .eha-tool-type-other { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }

/* === TOOL FEATURES LIST === */
.elpop-home-assistant .eha-tool-features-list {
        list-style: none;
        padding: 0;
        margin: 0 0 14px;
        text-align: right;
}

.elpop-home-assistant .eha-tool-features-list li {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.55);
        padding: 2px 0;
        position: relative;
        padding-right: 16px;
}

.elpop-home-assistant .eha-tool-features-list li::before {
        content: "✓";
        position: absolute;
        right: 0;
        color: #22c55e;
        font-size: 11px;
        font-weight: 700;
}

/* === COMPARISON TABLE === */
.elpop-home-assistant .eha-comparison-section {
        text-align: center;
}

/* Comparison section mobile responsive */
@media (max-width: 720px) {
        .elpop-home-assistant .eha-comparison-section {
                padding: 28px 16px;
        }
}

@media (max-width: 480px) {
        .elpop-home-assistant .eha-comparison-section {
                padding: 20px 12px;
        }
}

.elpop-home-assistant .eha-comparison-title {
        background: linear-gradient(135deg, #facc15, #f59e0b);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        color: transparent;
        margin-bottom: 8px;
}

.elpop-home-assistant .eha-comparison-subtitle {
        display: block;
        font-size: 16px;
        -webkit-text-fill-color: rgba(255, 255, 255, 0.65);
        margin-top: 4px;
        font-weight: 600;
}

.elpop-home-assistant .eha-comparison-table-wrap {
        border-radius: 18px;
        overflow: hidden;
        max-width: 800px;
        margin: 0 auto;
        box-shadow:
                6px 6px 12px rgba(0, 0, 0, 0.5),
                -3px -3px 8px rgba(255, 255, 255, 0.03);
}

.elpop-home-assistant .eha-comparison-table {
        width: 100%;
        border-collapse: collapse;
        border-spacing: 0;
}

.elpop-home-assistant .eha-comparison-table th,
.elpop-home-assistant .eha-comparison-table td {
        padding: 14px 18px;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.elpop-home-assistant .eha-comparison-table th {
        font-weight: 800;
        font-size: 16px;
        padding: 18px;
}

.elpop-home-assistant .eha-comp-feature-col {
        text-align: right;
        font-weight: 700;
        color: rgba(255, 255, 255, 0.85);
        width: 30%;
}

.elpop-home-assistant .eha-comp-header-emoji {
        display: block;
        font-size: 24px;
        margin-bottom: 6px;
}

.elpop-home-assistant .eha-comp-row-emoji {
        margin-left: 6px;
        font-size: 16px;
}

.elpop-home-assistant .eha-comp-val-emoji {
        margin-left: 4px;
        font-size: 14px;
}

.elpop-home-assistant .eha-comp-elpop-cell,
.elpop-home-assistant .eha-comp-canva-cell {
        font-weight: 600;
        font-size: 14px;
}

.elpop-home-assistant .eha-comp-feature-cell {
        font-size: 14px;
        font-weight: 700;
}

.elpop-home-assistant .eha-comparison-table tbody tr:hover {
        background: rgba(255, 255, 255, 0.03);
}

.elpop-home-assistant .eha-comparison-table tbody tr:last-child td {
        border-bottom: none;
}

/* === COMPARISON STATS === */
.elpop-home-assistant .eha-comparison-stats {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
        max-width: 800px;
        margin: 32px auto 0;
}

.elpop-home-assistant .eha-stat-card {
        background: linear-gradient(145deg, rgba(30, 25, 60, 0.8), rgba(15, 12, 35, 0.9));
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 16px;
        padding: 24px 16px;
        text-align: center;
        box-shadow:
                5px 5px 10px rgba(0, 0, 0, 0.4),
                -3px -3px 6px rgba(255, 255, 255, 0.02);
        transition: all 0.3s ease;
}

.elpop-home-assistant .eha-stat-card:hover {
        transform: translateY(-4px);
        border-color: rgba(255, 255, 255, 0.18);
        box-shadow:
                5px 5px 10px rgba(0, 0, 0, 0.4),
                -3px -3px 6px rgba(255, 255, 255, 0.02),
                0 0 20px rgba(100, 150, 255, 0.12);
}

.elpop-home-assistant .eha-stat-value {
        font-size: 32px;
        font-weight: 900;
        line-height: 1.2;
        margin-bottom: 8px;
        text-shadow: 0 0 20px currentColor;
}

.elpop-home-assistant .eha-stat-label {
        font-size: 14px;
        color: rgba(255, 255, 255, 0.65);
        font-weight: 600;
}

/* Comparison CTA */
.elpop-home-assistant .eha-comparison-cta {
        margin-top: 28px;
        text-align: center;
}

.elpop-home-assistant .eha-comparison-cta-text {
        font-size: 20px;
        font-weight: 800;
        color: #fff;
        margin: 0 0 16px;
}

.elpop-home-assistant .eha-comparison-cta-btn {
        display: inline-block;
        padding: 14px 36px;
        border-radius: 14px;
        font-size: 17px;
        font-weight: 800;
        text-decoration: none;
        transition: all 0.3s ease;
        box-shadow:
                4px 4px 10px rgba(0, 0, 0, 0.4),
                -2px -2px 6px rgba(255, 255, 255, 0.03);
}

.elpop-home-assistant .eha-comparison-cta-btn:hover {
        transform: translateY(-3px);
        box-shadow:
                4px 4px 10px rgba(0, 0, 0, 0.4),
                -2px -2px 6px rgba(255, 255, 255, 0.03),
                0 0 24px rgba(34, 197, 94, 0.4);
}

/* === FEATURES (WHY ELPOP) === */
.elpop-home-assistant .eha-features-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
}

/* Features section mobile responsive */
@media (max-width: 720px) {
        .elpop-home-assistant .eha-features-section {
                padding: 28px 16px;
        }
}

@media (max-width: 480px) {
        .elpop-home-assistant .eha-features-section {
                padding: 20px 12px;
        }
}

.elpop-home-assistant .eha-features-cols-3 { grid-template-columns: repeat(3, 1fr); }
.elpop-home-assistant .eha-features-cols-4 { grid-template-columns: repeat(4, 1fr); }
.elpop-home-assistant .eha-features-cols-5 { grid-template-columns: repeat(5, 1fr); }

.elpop-home-assistant .eha-feature-card {
        background: linear-gradient(145deg, rgba(30, 25, 60, 0.8), rgba(15, 12, 35, 0.9));
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 16px;
        padding: 28px 20px;
        text-align: center;
        box-shadow:
                5px 5px 10px rgba(0, 0, 0, 0.4),
                -3px -3px 6px rgba(255, 255, 255, 0.02);
        transition: all 0.3s ease;
}

.elpop-home-assistant .eha-feature-card:hover {
        transform: translateY(-4px);
        border-color: rgba(255, 255, 255, 0.18);
        box-shadow:
                5px 5px 10px rgba(0, 0, 0, 0.4),
                -3px -3px 6px rgba(255, 255, 255, 0.02),
                0 0 20px rgba(100, 150, 255, 0.12);
}

.elpop-home-assistant.eha-effects--glow .eha-feature-card:hover {
        box-shadow:
                5px 5px 10px rgba(0, 0, 0, 0.4),
                -3px -3px 6px rgba(255, 255, 255, 0.02),
                0 0 var(--eha-glow-blur, 26px) var(--eha-glow-color, rgba(34, 197, 94, 0.2));
}

.elpop-home-assistant .eha-feature-card-icon {
        font-size: 40px;
        width: 72px;
        height: 72px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 16px;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.06);
        box-shadow:
                inset 2px 2px 4px rgba(0, 0, 0, 0.3),
                inset -1px -1px 3px rgba(255, 255, 255, 0.03);
}

.elpop-home-assistant .eha-feature-card-title {
        font-size: 17px;
        font-weight: 800;
        color: #ffffff;
        margin: 0 0 8px;
}

.elpop-home-assistant .eha-feature-card-desc {
        font-size: 14px;
        color: rgba(255, 255, 255, 0.65);
        margin: 0;
        line-height: 1.5;
}

/* === FAQ ACCORDION === */
.elpop-home-assistant .eha-faq-list {
        max-width: 800px;
        margin: 0 auto;
}

/* FAQ section mobile responsive */
@media (max-width: 720px) {
        .elpop-home-assistant .eha-faq-section {
                padding: 28px 16px;
        }
        .elpop-home-assistant .eha-faq-question {
                padding: 14px 16px;
                font-size: 14px;
        }
}

@media (max-width: 480px) {
        .elpop-home-assistant .eha-faq-section {
                padding: 20px 12px;
        }
}

.elpop-home-assistant .eha-faq-item {
        background: linear-gradient(145deg, rgba(30, 25, 60, 0.7), rgba(15, 12, 35, 0.8));
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 14px;
        margin-bottom: 12px;
        overflow: hidden;
        box-shadow:
                4px 4px 8px rgba(0, 0, 0, 0.35),
                -2px -2px 5px rgba(255, 255, 255, 0.02);
        transition: all 0.3s ease;
}

.elpop-home-assistant .eha-faq-item:hover {
        border-color: rgba(255, 255, 255, 0.15);
}

.elpop-home-assistant .eha-faq-question {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 18px 20px;
        background: transparent;
        border: none;
        color: #f1f5f9;
        font-size: 16px;
        font-weight: 700;
        cursor: pointer;
        text-align: right;
        gap: 12px;
        transition: color 0.3s;
}

.elpop-home-assistant .eha-faq-question:hover {
        color: #93c5fd;
}

.elpop-home-assistant .eha-faq-arrow {
        font-size: 12px;
        transition: transform 0.3s ease;
        flex-shrink: 0;
}

.elpop-home-assistant .eha-faq-open .eha-faq-arrow {
        transform: rotate(180deg);
}

.elpop-home-assistant .eha-faq-answer {
        padding: 0 20px 18px;
        color: rgba(255, 255, 255, 0.75);
        font-size: 15px;
        line-height: 1.7;
}

/* === FOOTER === */
.elpop-home-assistant .eha-footer-section {
        background: linear-gradient(180deg, transparent, rgba(5, 5, 20, 0.6));
        padding: 48px 24px 24px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Footer section mobile responsive */
@media (max-width: 720px) {
        .elpop-home-assistant .eha-footer-section {
                padding: 28px 16px 20px;
        }
}

@media (max-width: 480px) {
        .elpop-home-assistant .eha-footer-section {
                padding: 20px 12px 16px;
        }
}

.elpop-home-assistant .eha-footer-grid {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 32px;
        max-width: 1200px;
        margin: 0 auto;
}

.elpop-home-assistant .eha-footer-logo {
        max-width: 120px;
        margin-bottom: 12px;
}

.elpop-home-assistant .eha-footer-site-name {
        font-size: 22px;
        font-weight: 900;
        color: #ffffff;
        margin: 0 0 8px;
}

.elpop-home-assistant .eha-footer-desc {
        font-size: 14px;
        color: rgba(255, 255, 255, 0.6);
        line-height: 1.6;
        margin: 0;
}

.elpop-home-assistant .eha-footer-col-title {
        font-size: 16px;
        font-weight: 800;
        color: #ffffff;
        margin: 0 0 16px;
}

.elpop-home-assistant .eha-footer-links {
        list-style: none;
        padding: 0;
        margin: 0;
}

.elpop-home-assistant .eha-footer-links li {
        margin-bottom: 8px;
}

.elpop-home-assistant .eha-footer-links a {
        color: rgba(255, 255, 255, 0.6);
        text-decoration: none;
        font-size: 14px;
        transition: color 0.3s;
}

.elpop-home-assistant .eha-footer-links a:hover {
        color: var(--eha-link-color, #93c5fd);
}

.elpop-home-assistant .eha-footer-copyright {
        text-align: center;
        margin-top: 32px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        color: rgba(255, 255, 255, 0.4);
        font-size: 13px;
}

/* === BUTTONS === */
.elpop-home-assistant .eha-btn {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        padding: 11px 14px;
        border-radius: 12px;
        border: 0;
        text-decoration: none;
        font-weight: 700;
        cursor: pointer;
        white-space: nowrap;
        transition: all 0.3s ease;
}

.elpop-home-assistant .eha-btn-recommend {
        width: 100%;
        background: var(--eha-btn-recommend-bg, #2563eb);
        color: var(--eha-btn-recommend-text, #ffffff);
}

.elpop-home-assistant .eha-btn-open {
        background: var(--eha-btn-open-bg, #22c55e);
        color: var(--eha-btn-open-text, #062113);
}

.elpop-home-assistant .eha-btn-next {
        background: var(--eha-btn-next-bg, #60a5fa);
        color: var(--eha-btn-next-text, #071427);
}

.elpop-home-assistant .eha-btn-finish {
        background: var(--eha-btn-finish-bg, #a78bfa);
        color: var(--eha-btn-finish-text, #151024);
}

.elpop-home-assistant .eha-btn-banner {
        background: var(--eha-btn-banner-bg, #f59e0b);
        color: var(--eha-btn-banner-text, #231404);
}

/* Banner */
.eha-banner {
        margin-bottom: 14px;
        padding: 12px 16px;
        border-radius: 12px;
        border: 1px solid rgba(245, 158, 11, 0.35);
        background: rgba(245, 158, 11, 0.12);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
}
.eha-banner__text { font-weight: 800; color: #fff; line-height: 1.35; }

/* Modal */
.eha-modal {
        position: fixed;
        inset: 0;
        z-index: 999999;
        display: none;
}
.eha-modal.is-open { display: block; }
.eha-modal__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.7); }
.eha-modal__content {
        position: relative;
        max-width: 900px;
        margin: 40px auto;
        top: 0;
        padding: 20px;
        border-radius: 18px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        background: linear-gradient(145deg, rgba(25, 20, 55, 0.95), rgba(12, 10, 30, 0.98));
        color: #fff;
        box-shadow:
                8px 8px 16px rgba(0, 0, 0, 0.6),
                -4px -4px 10px rgba(255, 255, 255, 0.03);
}
.eha-modal__close {
        position: absolute;
        left: 14px;
        top: 14px;
        width: 38px;
        height: 38px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        background: rgba(255, 255, 255, 0.06);
        color: #fff;
        cursor: pointer;
        font-size: 18px;
        line-height: 1;
}
.eha-modal__progress { font-weight: 900; margin-bottom: 6px; color: rgba(255, 255, 255, 0.9); }
.eha-modal__title { margin: 14px 0 6px 0; font-size: 20px; font-weight: 900; }
.eha-modal__desc { color: rgba(255, 255, 255, 0.75); margin-bottom: 14px; }

.eha-steps { display: grid; gap: 12px; }
.eha-step {
        padding: 14px;
        border-radius: 14px;
        border: 1px solid rgba(255, 255, 255, 0.10);
        background: rgba(255, 255, 255, 0.04);
}
.eha-step__header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px; }
.eha-step__num { font-weight: 900; color: #fff; }
.eha-step__tool { font-weight: 800; color: rgba(255, 255, 255, 0.85); }
.eha-step__label { margin-top: 6px; color: rgba(255, 255, 255, 0.78); }
.eha-step__preset { margin-top: 8px; font-size: 12px; color: rgba(255, 255, 255, 0.75); }
.eha-step__actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 10px; }
.eha-step__status { font-weight: 800; color: rgba(255, 255, 255, 0.65); }

/* Preset & Workflow cards (hidden but preserved for JS) */
.eha-workflow-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.eha-workflow-card { text-align: right; padding: 14px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.10); background: rgba(2, 6, 23, 0.45); color: #fff; cursor: pointer; }
.eha-workflow-card__title { font-weight: 900; margin-bottom: 6px; }
.eha-workflow-card__desc { color: rgba(255, 255, 255, 0.7); font-size: 13px; line-height: 1.35; }

.eha-presets-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.eha-preset { padding: 14px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.10); background: rgba(2, 6, 23, 0.45); }
.eha-preset__label { font-weight: 900; margin-bottom: 6px; }
.eha-preset__desc { color: rgba(255, 255, 255, 0.75); font-size: 13px; line-height: 1.35; }
.eha-preset__tool { margin-top: 8px; color: rgba(255, 255, 255, 0.65); font-size: 12px; }

/* === NOISE OVERLAY === */
.elpop-home-assistant.eha-effects--noise::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='220'%20height='220'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='.8'%20numOctaves='3'%20stitchTiles='stitch'/%3E%3C/filter%3E%3Crect%20width='220'%20height='220'%20filter='url(%23n)'%20opacity='.55'/%3E%3C/svg%3E");
        opacity: var(--eha-noise-opacity, 0.08);
        mix-blend-mode: overlay;
        z-index: 0;
}

/* Neon shadows on cards */
.elpop-home-assistant.eha-effects--neon .eha-tool-card,
.elpop-home-assistant.eha-effects--neon .eha-feature-card,
.elpop-home-assistant.eha-effects--neon .eha-post-card {
        box-shadow: 0 0 var(--eha-neon-blur, 20px) var(--eha-neon-color, #60a5fa);
}

.elpop-home-assistant.eha-effects--neon .eha-btn {
        box-shadow: 0 0 var(--eha-neon-blur, 20px) var(--eha-neon-color, #60a5fa);
}

.elpop-home-assistant.eha-effects--glow .eha-btn,
.elpop-home-assistant.eha-effects--glow .eha-feature-card,
.elpop-home-assistant.eha-effects--glow .eha-post-card {
        filter: drop-shadow(0 0 6px var(--eha-glow-color, rgba(34, 197, 94, 0.15)));
}

/* === RESPONSIVE === */
@media (max-width: 720px) {
        .elpop-home-assistant .eha-header-section {
                padding: 30px 16px 20px;
        }
        .elpop-home-assistant .eha-header-title { font-size: 28px; }
        .elpop-home-assistant .eha-header-subtitle { font-size: 15px; }

        .elpop-home-assistant .eha-section {
                padding: 28px 16px;
        }
        .elpop-home-assistant .eha-shortcuts-section {
                padding: 12px 16px;
        }
        .elpop-home-assistant .eha-title { font-size: 22px; margin-bottom: 16px; }

        .elpop-home-assistant .eha-search-controls { grid-template-columns: 1fr; }
        .elpop-home-assistant .eha-search-execute-btn { grid-column: 1; }

        /* SHORTCUTS - horizontally scrollable below header */
        .elpop-home-assistant .eha-shortcuts {
                flex-wrap: nowrap;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                padding-bottom: 6px;
                justify-content: flex-start;
                gap: 8px;
        }
        .elpop-home-assistant .eha-shortcut-chip {
                flex-shrink: 0;
                padding: 6px 12px;
                font-size: 12px;
        }

        /* TOOLS GRID - 2 cols on tablet */
        .elpop-home-assistant .eha-tools-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 14px;
        }

        .elpop-home-assistant .eha-posts-grid { grid-template-columns: 1fr !important; }
        .elpop-home-assistant .eha-features-grid { grid-template-columns: repeat(2, 1fr) !important; }

        .elpop-home-assistant .eha-footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }

        /* Comparison table responsive */
        .elpop-home-assistant .eha-comparison-table-wrap { border-radius: 12px; }
        .elpop-home-assistant .eha-comparison-table th,
        .elpop-home-assistant .eha-comparison-table td { padding: 10px 12px; font-size: 13px; }
        .elpop-home-assistant .eha-comp-header-emoji { font-size: 18px; }
        .elpop-home-assistant .eha-comparison-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
        .elpop-home-assistant .eha-stat-value { font-size: 24px; }
}

@media (min-width: 721px) and (max-width: 1024px) {
        .elpop-home-assistant .eha-tools-grid { grid-template-columns: repeat(3, 1fr); }
        .elpop-home-assistant .eha-posts-cols-4,
        .elpop-home-assistant .eha-posts-cols-5 { grid-template-columns: repeat(2, 1fr); }
        .elpop-home-assistant .eha-features-cols-4,
        .elpop-home-assistant .eha-features-cols-5 { grid-template-columns: repeat(3, 1fr); }
        .elpop-home-assistant .eha-footer-grid { grid-template-columns: 2fr 1fr 1fr; }
        .elpop-home-assistant .eha-footer-col-4 { grid-column: 1 / -1; }
}

/* SMALL MOBILE: every tool in its own row */
@media (max-width: 480px) {
        .elpop-home-assistant .eha-header-section {
                padding: 24px 12px 16px;
        }
        .elpop-home-assistant .eha-header-title { font-size: 24px; }
        .elpop-home-assistant .eha-header-subtitle { font-size: 14px; }

        .elpop-home-assistant .eha-section {
                padding: 20px 12px;
        }
        .elpop-home-assistant .eha-shortcuts-section {
                padding: 8px 12px;
        }
        .elpop-home-assistant .eha-title { font-size: 18px; margin-bottom: 14px; }

        /* EVERY TOOL CARD = FULL WIDTH ROW */
        .elpop-home-assistant .eha-tools-grid {
                grid-template-columns: 1fr;
                gap: 12px;
        }
        .elpop-home-assistant .eha-features-grid { grid-template-columns: 1fr !important; }
        .elpop-home-assistant .eha-footer-grid { grid-template-columns: 1fr; }

        .elpop-home-assistant .eha-shortcut-chip { padding: 5px 10px; font-size: 11px; }
}

/* === PROMO SECTION REMOVED === */

/* === RATING STARS === */
.elpop-home-assistant .eha-rating {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 0 4px;
        direction: ltr;
}
.elpop-home-assistant .eha-rating-stars {
        display: inline-flex;
        gap: 1px;
}
.elpop-home-assistant .eha-star {
        font-size: 16px;
        line-height: 1;
        display: inline-block;
}
.elpop-home-assistant .eha-star--full {
        color: #facc15;
        text-shadow: 0 0 6px rgba(250, 204, 21, 0.5);
}
.elpop-home-assistant .eha-star--half {
        color: #facc15;
        text-shadow: 0 0 6px rgba(250, 204, 21, 0.5);
        position: relative;
        opacity: 0.6;
}
.elpop-home-assistant .eha-star--empty {
        color: rgba(255, 255, 255, 0.2);
}
.elpop-home-assistant .eha-rating-text {
        font-size: 13px;
        font-weight: 700;
        color: #facc15;
        margin-left: 2px;
}
.elpop-home-assistant .eha-rating-count {
        font-size: 11px;
        color: rgba(255, 255, 255, 0.5);
}

/* ========== Interactive Rating Widget ========== */
.elpop-home-assistant .eha-rating-section {
        text-align: center;
        padding: 30px 20px;
}

.elpop-home-assistant .eha-rating-widget {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        padding: 28px 40px;
        background: linear-gradient(145deg, rgba(30, 25, 60, 0.8), rgba(15, 12, 35, 0.9));
        border: 1px solid rgba(252, 211, 77, 0.15);
        border-radius: 20px;
        box-shadow:
                6px 6px 16px rgba(0, 0, 0, 0.5),
                -3px -3px 10px rgba(255, 255, 255, 0.02),
                0 0 30px rgba(252, 211, 77, 0.06);
        position: relative;
        overflow: hidden;
        transition: all 0.3s ease;
}

/* Rating widget mobile responsive */
@media (max-width: 720px) {
        .elpop-home-assistant .eha-rating-widget {
                padding: 20px 24px;
        }
}

@media (max-width: 480px) {
        .elpop-home-assistant .eha-rating-widget {
                padding: 16px 18px;
                gap: 12px;
                width: 100%;
                max-width: 100%;
        }
}
.elpop-home-assistant .eha-rating-widget::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, transparent, #facc15, #f59e0b, #facc15, transparent);
        opacity: 0.8;
}
.elpop-home-assistant .eha-rating-widget::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 60%;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(252, 211, 77, 0.3), transparent);
}
.elpop-home-assistant .eha-rating-widget:hover {
        transform: translateY(-2px);
        border-color: rgba(252, 211, 77, 0.25);
        box-shadow:
                6px 6px 16px rgba(0, 0, 0, 0.5),
                -3px -3px 10px rgba(255, 255, 255, 0.02),
                0 0 40px rgba(252, 211, 77, 0.1);
}

.elpop-home-assistant .eha-rating-current {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 14px;
}

.elpop-home-assistant .eha-rating-current-stars .eha-star {
        font-size: 20px;
        margin: 0 1px;
}

.elpop-home-assistant .eha-rating-current-value {
        font-size: 22px;
        font-weight: 800;
        color: #facc15;
        text-shadow: 0 0 12px rgba(252, 211, 77, 0.3);
}

.elpop-home-assistant .eha-rating-current-count {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.5);
}

.elpop-home-assistant .eha-rating-input-area {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
}

.elpop-home-assistant .eha-rating-prompt {
        font-size: 14px;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.8);
        margin: 0;
}

.elpop-home-assistant .eha-stars-input {
        display: flex;
        gap: 6px;
        direction: ltr;
        cursor: pointer;
}

.elpop-home-assistant .eha-star-input {
        font-size: 32px;
        color: rgba(255, 255, 255, 0.15);
        transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        user-select: none;
        cursor: pointer;
        text-shadow: none;
}

.elpop-home-assistant .eha-star-input:hover,
.elpop-home-assistant .eha-star-input--active {
        color: #facc15;
        text-shadow: 0 0 12px rgba(252, 211, 77, 0.6), 0 0 24px rgba(252, 211, 77, 0.3);
        transform: scale(1.2) translateY(-2px);
}

.elpop-home-assistant .eha-rating-feedback {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.6);
        min-height: 18px;
}

/* === AD SLOTS === */
.elpop-home-assistant .eha-ad {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        text-align: center;
        padding: 16px 0;
        margin: 0;
}

/* =========================================================================
   DYNAMIC CATEGORIES SECTION - Premium Redesign
   ========================================================================= */

/* --- Section --- */
.elpop-home-assistant .eha-cat-tools-section {
        padding: 20px 24px;
        position: relative;
        overflow: visible;
        clear: both;
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
}

.elpop-home-assistant .eha-cat-tools-section .eha-title {
        text-align: center;
        margin-bottom: 24px;
        font-size: 32px;
        font-weight: 800;
        color: #ffffff;
        text-shadow: 0 2px 16px rgba(0,0,0,0.5);
        letter-spacing: -0.5px;
        position: relative;
        display: inline-block;
}
.elpop-home-assistant .eha-cat-tools-section .eha-title::after {
        content: '';
        position: absolute;
        bottom: -12px;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 3px;
        border-radius: 2px;
        background: linear-gradient(90deg, #a855f7, #3b82f6, #22c55e);
}

.elpop-home-assistant .eha-cat-tools-list {
        display: flex;
        flex-direction: column;
        gap: 20px;
        max-width: 1200px;
        margin: 0 auto;
}

/* =========================================================================
   CATEGORY GROUP
   ========================================================================= */
.elpop-home-assistant .eha-cat-tools-group {
        border-radius: 24px;
        overflow: hidden;
        position: relative;
        background: linear-gradient(160deg, rgba(22, 18, 50, 0.95), rgba(10, 8, 25, 0.98));
        border: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow:
                0 8px 32px rgba(0, 0, 0, 0.5),
                0 2px 8px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.04);
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.elpop-home-assistant .eha-cat-tools-group:hover {
        transform: translateY(-4px);
        box-shadow:
                0 12px 40px rgba(0, 0, 0, 0.6),
                0 4px 12px rgba(0, 0, 0, 0.4),
                0 0 40px var(--cat-glow, rgba(100, 150, 255, 0.1)),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* --- Category Colors --- */
.elpop-home-assistant .eha-cat-tools-red { --cat-primary: #ef4444; --cat-light: #fca5a5; --cat-bg: rgba(239,68,68,0.08); --cat-glow: rgba(239,68,68,0.12); --cat-btn-from: #ef4444; --cat-btn-to: #dc2626; }
.elpop-home-assistant .eha-cat-tools-purple { --cat-primary: #a855f7; --cat-light: #d8b4fe; --cat-bg: rgba(168,85,247,0.08); --cat-glow: rgba(168,85,247,0.12); --cat-btn-from: #a855f7; --cat-btn-to: #9333ea; }
.elpop-home-assistant .eha-cat-tools-green { --cat-primary: #22c55e; --cat-light: #86efac; --cat-bg: rgba(34,197,94,0.08); --cat-glow: rgba(34,197,94,0.12); --cat-btn-from: #22c55e; --cat-btn-to: #16a34a; }
.elpop-home-assistant .eha-cat-tools-blue { --cat-primary: #3b82f6; --cat-light: #93c5fd; --cat-bg: rgba(59,130,246,0.08); --cat-glow: rgba(59,130,246,0.12); --cat-btn-from: #3b82f6; --cat-btn-to: #2563eb; }
.elpop-home-assistant .eha-cat-tools-yellow { --cat-primary: #f59e0b; --cat-light: #fcd34d; --cat-bg: rgba(245,158,11,0.08); --cat-glow: rgba(245,158,11,0.12); --cat-btn-from: #f59e0b; --cat-btn-to: #d97706; }
.elpop-home-assistant .eha-cat-tools-pink { --cat-primary: #ec4899; --cat-light: #f9a8d4; --cat-bg: rgba(236,72,153,0.08); --cat-glow: rgba(236,72,153,0.12); --cat-btn-from: #ec4899; --cat-btn-to: #db2777; }
.elpop-home-assistant .eha-cat-tools-teal { --cat-primary: #14b8a6; --cat-light: #5eead4; --cat-bg: rgba(20,184,166,0.08); --cat-glow: rgba(20,184,166,0.12); --cat-btn-from: #14b8a6; --cat-btn-to: #0d9488; }

/* --- Category Header --- */
.elpop-home-assistant .eha-cat-tools-header {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 16px 24px;
        background: linear-gradient(135deg, var(--cat-bg, rgba(255,255,255,0.02)), rgba(255,255,255,0.01));
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        position: relative;
}
.elpop-home-assistant .eha-cat-tools-header::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg, transparent 10%, var(--cat-primary, #3b82f6) 50%, transparent 90%);
        opacity: 0.3;
}

.elpop-home-assistant .eha-cat-tools-icon {
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        font-size: 17px;
        width: 40px;
        height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        flex-shrink: 0;
        color: var(--cat-primary, #3b82f6);
        background: var(--cat-bg, rgba(59,130,246,0.1));
        border: 1px solid rgba(255,255,255,0.06);
        transition: all 0.3s ease;
}
.elpop-home-assistant .eha-cat-tools-group:hover .eha-cat-tools-icon {
        transform: scale(1.1) rotate(-3deg);
        box-shadow: 0 0 16px var(--cat-glow, rgba(59,130,246,0.25));
}
.elpop-home-assistant .eha-cat-tools-icon img {
        width: 24px;
        height: 24px;
        object-fit: contain;
}

.elpop-home-assistant .eha-cat-tools-title {
        margin: 0;
        font-size: 16px;
        font-weight: 800;
        color: #ffffff;
        flex: 1;
        letter-spacing: -0.3px;
}

.elpop-home-assistant .eha-cat-tools-count {
        font-size: 12px;
        font-weight: 700;
        padding: 5px 14px;
        border-radius: 20px;
        white-space: nowrap;
        color: var(--cat-light, #93c5fd);
        background: var(--cat-bg, rgba(59,130,246,0.1));
        border: 1px solid rgba(255,255,255,0.06);
        letter-spacing: 0.3px;
}

/* =========================================================================
   TOOLS GRID
   ========================================================================= */
.elpop-home-assistant .eha-cat-tools-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
        padding: 24px;
}

/* =========================================================================
   TOOL CARD
   ========================================================================= */
.elpop-home-assistant .eha-cat-tool-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding: 28px 16px 20px;
        background: linear-gradient(165deg, rgba(40, 32, 80, 0.6), rgba(18, 14, 42, 0.8));
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 18px;
        text-align: center;
        position: relative;
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        box-shadow:
                0 4px 16px rgba(0, 0, 0, 0.4),
                0 1px 4px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.elpop-home-assistant .eha-cat-tool-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, transparent, var(--cat-primary, #3b82f6), transparent);
        opacity: 0;
        transition: opacity 0.3s;
}
.elpop-home-assistant .eha-cat-tool-card::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 18px;
        background: radial-gradient(circle at 50% 0%, var(--cat-glow, rgba(59,130,246,0.08)), transparent 70%);
        opacity: 0;
        transition: opacity 0.4s;
        pointer-events: none;
}
.elpop-home-assistant .eha-cat-tool-card:hover {
        transform: translateY(-8px) scale(1.02);
        border-color: rgba(255, 255, 255, 0.12);
        box-shadow:
                0 12px 32px rgba(0, 0, 0, 0.5),
                0 4px 12px rgba(0, 0, 0, 0.4),
                0 0 32px var(--cat-glow, rgba(59,130,246,0.15)),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.elpop-home-assistant .eha-cat-tool-card:hover::before { opacity: 1; }
.elpop-home-assistant .eha-cat-tool-card:hover::after { opacity: 1; }

/* --- Tool Icon --- */
.elpop-home-assistant .eha-cat-tool-icon {
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        font-size: 30px;
        width: 56px;
        height: 56px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 16px;
        flex-shrink: 0;
        color: var(--cat-primary, #3b82f6);
        background: linear-gradient(135deg, var(--cat-bg, rgba(59,130,246,0.12)), rgba(255,255,255,0.02));
        border: 1px solid rgba(255,255,255,0.06);
        box-shadow:
                inset 2px 2px 6px rgba(0, 0, 0, 0.3),
                inset -1px -1px 4px rgba(255, 255, 255, 0.03),
                0 2px 8px rgba(0, 0, 0, 0.2);
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.elpop-home-assistant .eha-cat-tool-card:hover .eha-cat-tool-icon {
        transform: scale(1.12) rotate(-5deg);
        box-shadow:
                inset 2px 2px 6px rgba(0, 0, 0, 0.3),
                inset -1px -1px 4px rgba(255, 255, 255, 0.03),
                0 4px 16px var(--cat-glow, rgba(59,130,246,0.3));
}
.elpop-home-assistant .eha-cat-tool-icon img {
        width: 36px;
        height: 36px;
        object-fit: contain;
}

/* --- Tool Name --- */
.elpop-home-assistant .eha-cat-tool-name {
        margin: 0;
        font-size: 15px;
        font-weight: 800;
        line-height: 1.3;
        color: #ffffff;
        letter-spacing: -0.2px;
}

/* --- Tool Description --- */
.elpop-home-assistant .eha-cat-tool-desc {
        margin: 0;
        font-size: 13px;
        font-weight: 400;
        line-height: 1.6;
        color: rgba(255, 255, 255, 0.65);
        min-height: 42px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
}

/* =========================================================================
   BUTTON - Premium Design
   ========================================================================= */
.elpop-home-assistant .eha-cat-tool-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 10px 24px;
        margin-top: auto;
        border: none;
        border-radius: 12px;
        background: linear-gradient(135deg, var(--cat-btn-from, #3b82f6), var(--cat-btn-to, #2563eb));
        color: #ffffff;
        font-family: inherit;
        font-size: 14px;
        font-weight: 700;
        text-decoration: none;
        cursor: pointer;
        position: relative;
        overflow: hidden;
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        box-shadow:
                0 4px 12px rgba(0, 0, 0, 0.3),
                0 0 0 0 var(--cat-glow, rgba(59,130,246,0.3)),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
        letter-spacing: 0.3px;
}
.elpop-home-assistant .eha-cat-tool-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
        transition: left 0.6s;
}
.elpop-home-assistant .eha-cat-tool-btn::after {
        content: '\f061';
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        font-size: 11px;
        transition: transform 0.3s;
}
.elpop-home-assistant .eha-cat-tool-btn:hover {
        transform: translateY(-3px) scale(1.06);
        box-shadow:
                0 6px 20px rgba(0, 0, 0, 0.4),
                0 0 24px var(--cat-glow, rgba(59,130,246,0.4)),
                0 0 48px var(--cat-glow, rgba(59,130,246,0.15)),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.elpop-home-assistant .eha-cat-tool-btn:hover::before { left: 100%; }
.elpop-home-assistant .eha-cat-tool-btn:hover::after { transform: translateX(3px); }
.elpop-home-assistant .eha-cat-tool-btn:active {
        transform: translateY(0) scale(0.97);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Button pulse glow on hover */
@keyframes ehaBtnPulse {
        0%, 100% { box-shadow: 0 4px 12px rgba(0,0,0,0.3), 0 0 0 0 var(--cat-glow, rgba(59,130,246,0.3)); }
        50% { box-shadow: 0 4px 12px rgba(0,0,0,0.3), 0 0 0 8px transparent; }
}
.elpop-home-assistant .eha-cat-tool-btn:hover {
        animation: ehaBtnPulse 1.8s ease-in-out infinite;
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 1024px) {
        .elpop-home-assistant .eha-cat-tools-grid {
                grid-template-columns: repeat(3, 1fr);
        }
}

@media (max-width: 768px) {
        .elpop-home-assistant .eha-cat-tools-section {
                padding: 16px 16px;
        }
        .elpop-home-assistant .eha-cat-tools-list {
                gap: 16px;
        }
        .elpop-home-assistant .eha-cat-tools-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 14px;
                padding: 16px;
        }
        .elpop-home-assistant .eha-cat-tools-header {
                padding: 14px 16px;
        }
        .elpop-home-assistant .eha-cat-tools-title {
                font-size: 14px;
        }
        .elpop-home-assistant .eha-cat-tool-card {
                padding: 18px 10px 14px;
        }
        .elpop-home-assistant .eha-cat-tool-btn {
                padding: 8px 16px;
                font-size: 13px;
        }
}

@media (max-width: 480px) {
        .elpop-home-assistant .eha-cat-tools-section {
                padding: 12px 12px;
        }
        .elpop-home-assistant .eha-cat-tools-list {
                gap: 12px;
        }
        .elpop-home-assistant .eha-cat-tools-grid {
                grid-template-columns: 1fr;
                gap: 12px;
                padding: 14px;
        }
        .elpop-home-assistant .eha-cat-tool-icon {
                width: 42px;
                height: 42px;
                font-size: 22px;
        }
        .elpop-home-assistant .eha-cat-tool-name {
                font-size: 13px;
        }
        .elpop-home-assistant .eha-cat-tool-desc {
                font-size: 12px;
        }
        .elpop-home-assistant .eha-cat-tool-btn {
                padding: 7px 14px;
                font-size: 12px;
        }
}

/* =============================================
   MOST VIEWED TOOLS - Badge + Frame + Grid
   Same structure as cat-tools-group
   ============================================= */

.elpop-home-assistant .eha-most-viewed-section {
        padding: 20px 24px;
        position: relative;
        overflow: visible;
        clear: both;
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
}

.elpop-home-assistant .eha-most-viewed-section .eha-title {
        display: none;
}

.elpop-home-assistant .eha-most-viewed-frame {
        border-radius: 24px;
        overflow: hidden;
        position: relative;
        background: linear-gradient(160deg, rgba(22, 18, 50, 0.95), rgba(10, 8, 25, 0.98));
        border: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow:
                0 8px 32px rgba(0, 0, 0, 0.5),
                0 2px 8px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.04);
        max-width: var(--mv-frame-width, 100%);
        margin: 0 auto;
}

.elpop-home-assistant .eha-most-viewed-frame-header {
        padding: 20px 28px;
        background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(249, 115, 22, 0.15));
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        text-align: center;
        position: relative;
}
.elpop-home-assistant .eha-most-viewed-frame-header::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg, transparent 10%, #f59e0b 50%, transparent 90%);
        opacity: 0.5;
}

.elpop-home-assistant .eha-most-viewed-frame-title {
        font-size: 26px;
        font-weight: 800;
        background: linear-gradient(135deg, #facc15, #f97316);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        color: transparent;
        margin: 0;
        padding: 0;
        letter-spacing: -0.5px;
}

.elpop-home-assistant .eha-most-viewed-frame:hover {
        border-color: rgba(255, 255, 255, 0.10);
}

.elpop-home-assistant .eha-most-viewed-frame .eha-tool-card-btn {
        background: linear-gradient(135deg, #f59e0b, #f97316);
        color: #1a1a2e;
}

.elpop-home-assistant .eha-most-viewed-frame .eha-tool-card-btn:hover {
        box-shadow:
                3px 3px 8px rgba(0, 0, 0, 0.3),
                -2px -2px 4px rgba(255, 255, 255, 0.02),
                0 0 16px rgba(245, 158, 11, 0.45);
}

.elpop-home-assistant .eha-most-viewed-grid {
        display: grid;
        grid-template-columns: var(--mv-cols, repeat(4, 1fr));
        gap: 18px;
        padding: 24px;
}

.elpop-home-assistant .eha-most-viewed-frame .eha-tool-card {
        position: relative;
}

.elpop-home-assistant .eha-most-viewed-badge {
        position: absolute;
        top: 12px;
        left: 12px;
        background: linear-gradient(135deg, #f59e0b, #f97316);
        color: #fff;
        padding: 4px 10px;
        border-radius: 20px;
        font-size: 11px;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 4px;
        z-index: 2;
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.elpop-home-assistant .eha-views-count {
        font-size: 13px;
        font-weight: 800;
}

.elpop-home-assistant .eha-views-label {
        font-size: 10px;
        opacity: 0.9;
}

/* Most Viewed Responsive */
@media (max-width: 1024px) {
        .elpop-home-assistant .eha-most-viewed-grid {
                grid-template-columns: repeat(3, 1fr) !important;
        }
}

@media (max-width: 768px) {
        .elpop-home-assistant .eha-most-viewed-section {
                padding: 16px 16px;
                clear: both;
        }
        .elpop-home-assistant .eha-most-viewed-frame-header {
                padding: 16px 20px;
        }
        .elpop-home-assistant .eha-most-viewed-frame-title {
                font-size: 22px;
        }
        .elpop-home-assistant .eha-most-viewed-grid {
                grid-template-columns: repeat(2, 1fr) !important;
                gap: 14px;
                padding: 16px;
        }
}

@media (max-width: 480px) {
        .elpop-home-assistant .eha-most-viewed-section {
                padding: 12px 12px;
                margin-bottom: 12px;
                clear: both;
        }
        .elpop-home-assistant .eha-most-viewed-frame-header {
                padding: 14px 16px;
        }
        .elpop-home-assistant .eha-most-viewed-frame-title {
                font-size: 18px;
        }
        .elpop-home-assistant .eha-most-viewed-grid {
                grid-template-columns: 1fr !important;
                gap: 12px;
                padding: 12px;
        }
}
