.ide-widget {
    margin: 1.5rem 0;
    padding: 1.2rem;
    border-radius: 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.ide-feature-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.ide-feature-btn {
    border: 1px solid #cbd5e1;
    background: white;
    color: #334155;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ide-feature-btn:hover,
.ide-feature-btn.active {
    background: #0f172a;
    border-color: #0f172a;
    color: white;
}

.ide-widget-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
    gap: 1rem;
    align-items: stretch;
}

.ide-editor-card,
.ide-explanation-card {
    border-radius: 22px;
    border: 1px solid #e2e8f0;
    background: white;
    overflow: hidden;
}

.ide-editor-top {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.75rem 1rem;
    background: #e2e8f0;
    color: #334155;
}

.ide-dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: #94a3b8;
}

.ide-editor-top strong {
    margin-left: 0.45rem;
    font-size: 0.9rem;
}

.ide-code-window {
    margin: 0;
    padding: 1.1rem;
    min-height: 240px;
    overflow: auto;
    background: #0f172a;
    color: #e5e7eb;
    font-size: 0.95rem;
    line-height: 1.65;
    border-radius: 0;
    position: relative;
}

.ide-code-window code {
    font-family: "Courier New", monospace;
}

.ide-keyword {
    color: #93c5fd;
    font-weight: 800;
}

.ide-string {
    color: #fbbf24;
}

.ide-comment {
    color: #86efac;
}

.ide-error {
    text-decoration: underline wavy #fb7185;
    text-underline-offset: 0.2rem;
}

.ide-highlight-line {
    display: block;
    background: rgba(250, 204, 21, 0.18);
    border-left: 4px solid #facc15;
    padding-left: 0.5rem;
    margin-left: -0.5rem;
}

.ide-collapsed-line {
    display: inline-block;
    margin: 0.25rem 0;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.22);
    color: #cbd5e1;
}

.ide-floating-panel {
    display: none;
    margin: 0.8rem;
    padding: 0.8rem 1rem;
    border-radius: 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    font-size: 0.92rem;
    font-weight: 700;
}

.ide-floating-panel.active {
    display: block;
}

.ide-explanation-card {
    padding: 1.2rem;
}

.ide-feature-label {
    display: inline-flex;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(91, 95, 168, 0.10);
    color: #4b4f9c;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ide-explanation-card h3 {
    margin: 0.9rem 0 0.6rem;
}

.ide-explanation-card p {
    margin: 0;
    color: #475569;
}

.ide-mini-check {
    margin-top: 1rem;
    padding: 0.8rem;
    border-radius: 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #14532d;
}

.ide-mini-check strong,
.ide-mini-check span {
    display: block;
}

@media (max-width: 820px) {
    .ide-widget-layout {
        grid-template-columns: 1fr;
    }
}
