:root {
    --explore-bg-soft: #f5f9ff;
    --explore-card-bg: #ffffff;
    --explore-text: #1f2f46;
    --explore-muted: #607189;
    --explore-border: #d4e1f4;
    --explore-shadow: 0 14px 38px rgba(26, 54, 96, 0.12);
    --explore-accent: #2f6cff;
    --explore-accent-2: #0ea5b7;
}

.ideas-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
}

.idea-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1.5rem 2rem;
    border-radius: 18px;
    border: 1px solid var(--explore-border);
    background:
        radial-gradient(circle at 88% 7%, rgba(47, 108, 255, 0.15), transparent 34%),
        radial-gradient(circle at 9% 92%, rgba(14, 165, 183, 0.13), transparent 36%),
        var(--explore-card-bg);
    box-shadow: 0 8px 24px rgba(15, 45, 88, 0.09);
    cursor: pointer;
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.idea-card-link-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
}

.idea-like-form,
.idea-like-link,
.idea-primary-action,
.idea-project-actions {
    position: relative;
    z-index: 3;
}

.idea-card-link-overlay:focus-visible {
    outline: none;
}

.idea-card:has(.idea-card-link-overlay:focus-visible) {
    outline: none;
    border-color: #6c9de0;
    box-shadow:
        0 0 0 3px rgba(47, 108, 255, 0.2),
        var(--explore-shadow),
        0 0 24px rgba(79, 126, 239, 0.2);
}

.idea-card:hover {
    z-index: 6;
    transform: translateY(-3px) scale(1.01);
    border-color: #adc9ef;
    box-shadow:
        var(--explore-shadow),
        0 0 0 1px rgba(79, 126, 239, 0.2),
        0 0 24px rgba(79, 126, 239, 0.22),
        0 0 42px rgba(14, 165, 183, 0.16);
}

.idea-card:focus-visible {
    z-index: 6;
    outline: none;
    border-color: #6c9de0;
    box-shadow:
        0 0 0 3px rgba(47, 108, 255, 0.2),
        var(--explore-shadow),
        0 0 24px rgba(79, 126, 239, 0.2);
}

.idea-card:has(.idea-project-actions.is-open) {
    z-index: 12;
}

.idea-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
}

.idea-score-indicator {
    --score-color: #667eea;
    --score-shadow: rgba(102, 126, 234, 0.34);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.18rem;
    flex: 0 0 auto;
    position: absolute;
    right: 0.8rem;
}

.idea-score-indicator .score-ring {
    position: relative;
    width: 100px;
    aspect-ratio: 1;
    box-sizing: border-box;
    overflow: visible;
    display: grid;
    place-items: center;
}

.idea-score-indicator .score-ring-svg {
    position: absolute;
    inset: 3px;
    transform: rotate(-90deg);
    overflow: visible;
}

.idea-score-indicator .score-ring-track,
.idea-score-indicator .score-ring-progress {
    fill: none;
    stroke-width: 4.6;
}

.idea-score-indicator .score-ring-track {
    stroke: #cbe2ff;
    stroke-linecap: round;
}

.idea-score-indicator .score-ring-progress {
    stroke: var(--score-color);
    stroke-dasharray: calc(var(--score-value, 0) * 10) 100;
    stroke-linecap: round;
    filter: drop-shadow(0 0 3px var(--score-shadow));
}

.idea-score-indicator .score-ring-value {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: baseline;
    gap: 0.06rem;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #213a56;
}

.idea-score-indicator .score-ring-value small {
    font-size: 0.5rem;
    font-weight: 700;
    color: #72839a;
}

.idea-score-label {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #5f7390;
}

.idea-card-title {
    margin: 0;
    color: var(--explore-text);
    font-size: 1.03rem;
    line-height: 1.35;
    animation: idea-title-glow 3.6s ease-in-out infinite;
}

@keyframes idea-title-glow {
    0%,
    100% {
        text-shadow:
            0 0 0 rgba(102, 126, 234, 0),
            0 0 0 rgba(118, 75, 162, 0);
    }

    50% {
        text-shadow:
            0 0 14px rgba(102, 126, 234, 0.34),
            0 0 26px rgba(118, 75, 162, 0.24),
            0 0 38px rgba(102, 126, 234, 0.16);
    }
}

.idea-entity-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.44rem;
    min-height: 1.75rem;
}

.idea-entity-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    border-radius: 999px;
    padding: 0.22rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.badge-key {
    width: 1rem;
    height: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.55);
}

.badge-value {
    line-height: 1;
    font-weight: 700;
}

.badge-industry {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: #667eea;
}

.badge-trend {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    border-color: #f093fb;
}

.badge-business-type {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
    border-color: #4facfe;
}

.idea-description {
    margin: 0;
    color: var(--explore-muted);
    font-size: 0.92rem;
    line-height: 1.57;
    padding-right: 5rem;
}

.idea-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: auto;
    padding-top: 0.2rem;
}

.idea-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.idea-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    position: relative;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.idea-project-primary-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.44rem;
    flex-wrap: wrap;
    background: transparent;
    border: none;
    border-radius: 0;
    color: #5f7390;
    font-size: 0.8rem;
    font-weight: 600;
}

.idea-stat-icon {
    width: 14px;
    height: 14px;
    object-fit: contain;
    opacity: 0.95;
}

.idea-stat-value {
    color: #2d4f78;
    font-weight: 700;
}

.idea-stat-label {
    color: #6f829d;
    font-weight: 600;
}

.idea-like-form {
    margin: 0;
}

.idea-like-button,
.idea-like-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid #c6d9f3;
    background: rgba(255, 255, 255, 0.92);
    color: #305178;
    box-shadow: 0 5px 14px rgba(23, 62, 112, 0.08);
    text-decoration: none;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.idea-like-button {
    cursor: pointer;
    margin-bottom: -1rem;
    margin-top: -1rem;
}

.idea-like-button:hover,
.idea-like-link:hover {
    transform: translateY(-2px) scale(1.14);
    border-color: #7eaee6;
    box-shadow:
        0 12px 24px rgba(23, 62, 112, 0.22),
        0 0 0 2px rgba(126, 174, 230, 0.32),
        0 0 20px rgba(74, 145, 230, 0.36);
}

.idea-like-button.is-liked:hover,
.idea-like-link.is-liked:hover {
    border-color: #7eaee6;
    box-shadow:
        0 12px 24px rgba(23, 62, 112, 0.24),
        0 0 0 2px rgba(126, 174, 230, 0.5),
        0 0 24px rgba(74, 145, 230, 0.42);
}

.idea-like-button.is-liked {
    background: linear-gradient(135deg, #eaf3ff 0%, #f5f9ff 100%);
    border-color: #a9c8ef;
    color: #2a5d93;
}

.idea-like-button:disabled {
    cursor: wait;
    opacity: 0.8;
}

.idea-like-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.idea-primary-action-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    object-position: center;
    margin-right: 0.38rem;
    flex-shrink: 0;
    display: block;
    border-radius: 0;
}

.idea-primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: 1px solid #b6cff0;
    background: linear-gradient(140deg, #eef5ff 0%, #f8fbff 100%);
    color: #1f4f88;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.idea-primary-action:hover {
    transform: translateY(-1px);
    border-color: #7eaee6;
    box-shadow: 0 8px 20px rgba(23, 62, 112, 0.16);
}

.idea-primary-action.is-open {
    background: linear-gradient(140deg, #e9fffa 0%, #f2fffd 100%);
    border-color: #a9dddc;
    color: #0e5f65;
}

.idea-primary-action.is-edit {
    background: linear-gradient(140deg, #edf4ff 0%, #ffffff 100%);
    border-color: #bfd5f2;
    color: #214f81;
}

.idea-project-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    position: relative;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.idea-project-primary-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.44rem;
    flex-wrap: wrap;
}

.idea-actions-toggle {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid #b6cff0;
    background: linear-gradient(145deg, #eff6ff 0%, #f9fbff 100%);
    color: #1f4f88;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.14rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.idea-actions-toggle:hover,
.idea-actions-toggle[aria-expanded="true"] {
    transform: translateY(-1px);
    border-color: #7eaee6;
    box-shadow: 0 8px 18px rgba(23, 62, 112, 0.15);
}

.idea-actions-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
}

.idea-actions-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.45rem);
    z-index: 40;
    min-width: 140px;
    padding: 0.34rem;
    border-radius: 12px;
    border: 1px solid #c8daf3;
    background: #ffffff;
    box-shadow: 0 16px 28px rgba(17, 48, 89, 0.2);
    opacity: 0;
    transform: translateY(-4px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.16s;
}

.idea-project-actions.is-open .idea-actions-menu {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.idea-actions-menu form {
    margin: 0;
}

.idea-actions-menu-item {
    display: block;
    width: 100%;
    border: 1px solid transparent;
    background: #f8fbff;
    color: #214b7f;
    border-radius: 9px;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
    padding: 0.45rem 0.6rem;
    cursor: pointer;
}

.idea-actions-menu-item:hover {
    background: #edf5ff;
    border-color: #d4e3f7;
}

.idea-actions-menu-item.danger {
    color: #a12828;
    background: #fff6f6;
}

.idea-actions-menu-item.danger:hover {
    background: #ffefef;
    border-color: #f0d2d2;
}

.ideas-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem 1.2rem;
    border-radius: 16px;
    border: 1px dashed #bcd3ef;
    background: linear-gradient(135deg, #f6fbff 0%, #edf5ff 100%);
}

.ideas-empty-state h3 {
    margin: 0;
    color: #204474;
}

.ideas-empty-state p {
    margin: 0.5rem 0 0;
    color: #5f7390;
}

.ideas-empty-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.9rem;
    min-height: 38px;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid #7fb2ea;
    background: linear-gradient(140deg, #dceeff 0%, #f1f8ff 56%, #e5f2ff 100%);
    color: #184f8f;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 18px rgba(47, 108, 255, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ideas-empty-cta:hover {
    transform: translateY(-1px);
    border-color: #5f9ee4;
    box-shadow: 0 12px 24px rgba(47, 108, 255, 0.24);
}

.ideas-pagination {
    margin-top: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ideas-pagination a,
.ideas-pagination span {
    border-radius: 999px;
    padding: 0.38rem 0.8rem;
    font-size: 0.84rem;
}

.ideas-pagination a {
    text-decoration: none;
    border: 1px solid #c8daf6;
    color: #1d4f89;
    background: #f2f8ff;
    font-weight: 700;
}

.ideas-pagination a:hover {
    background: #e6f1ff;
}

.ideas-pagination span {
    color: #516887;
    background: #f6f9fe;
    border: 1px solid #dde7f6;
    font-weight: 600;
}

@media (max-width: 768px) {
    .idea-card {
        padding: 1.2rem;
    }

    .idea-card-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .idea-score-indicator .score-ring {
        width: 100px;
    }

    .idea-stats {
        justify-content: flex-start;
    }

    .idea-like-button,
    .idea-like-link,
    .idea-primary-action,
    .idea-project-actions {
        width: auto;
        align-self: flex-start;
    }

    .idea-project-primary-actions {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .idea-card-title {
        animation: none;
    }
}
